/* LalloHallo Fidelity Card - Frontend CSS */

/* ==========================================
   Account Page - Balance Card
   ========================================== */
.lhf-account-page {
    max-width: 800px;
}

.lhf-balance-card {
    background: linear-gradient(135deg, #225d55 0%, #1a4a44 100%);
    color: #fff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(34, 93, 85, 0.3);
}

.lhf-balance-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.lhf-balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.lhf-tier-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.lhf-tier-platinum { background: linear-gradient(135deg, #e5e4e2, #b0b0b0); color: #333; }
.lhf-tier-gold { background: linear-gradient(135deg, #ffbd59, #f0a500); color: #333; }
.lhf-tier-silver { background: linear-gradient(135deg, #c0c0c0, #a8a8a8); color: #333; }
.lhf-tier-bronze { background: linear-gradient(135deg, #cd7f32, #a0612b); color: #fff; }

.lhf-balance-label {
    font-size: 14px;
    opacity: 0.8;
}

.lhf-balance-value {
    font-size: 56px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 5px;
}

.lhf-balance-sub {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 15px;
}

.lhf-balance-equivalent {
    font-size: 13px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.9;
}

.lhf-balance-link {
    margin-top: 12px;
    font-size: 13px;
}

.lhf-balance-link a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}

.lhf-balance-link a:hover {
    color: #fff;
    border-bottom-color: #fff;
}

/* ==========================================
   Account Page - Rules Info
   ========================================== */
.lhf-rules-info {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.lhf-rules-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
}

.lhf-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.lhf-rule-info {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.lhf-rule-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.lhf-rule-text strong {
    display: block;
    margin-bottom: 2px;
}

.lhf-rule-text p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.lhf-rules-table {
    width: 100%;
    border-collapse: collapse;
}

.lhf-rules-table th,
.lhf-rules-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.lhf-rules-table th {
    font-weight: 600;
    color: #888;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lhf-rule-available { background-color: #f0faf8; }
.lhf-rule-locked { opacity: 0.6; }

.lhf-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f0f0f0;
    color: #666;
}

.lhf-badge-success {
    background: #d4edda;
    color: #155724;
}

/* ==========================================
   Account Page - Transactions
   ========================================== */
.lhf-transactions {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
}

.lhf-transactions h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
}

.lhf-transactions-table {
    width: 100%;
    border-collapse: collapse;
}

.lhf-transactions-table th,
.lhf-transactions-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.lhf-transactions-table th {
    font-weight: 600;
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lhf-points-cell {
    font-weight: 700;
    font-size: 15px;
}

.lhf-transaction-earned .lhf-points-cell,
.lhf-transaction-manual_add .lhf-points-cell {
    color: #28a745;
}

.lhf-transaction-redeemed .lhf-points-cell,
.lhf-transaction-manual_subtract .lhf-points-cell {
    color: #dc3545;
}

.lhf-empty {
    text-align: center;
    color: #999;
    padding: 30px 0;
    font-style: italic;
}

/* ==========================================
   Checkout - Banner
   ========================================== */
.lhf-checkout-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f0faf8, #e8f5f2);
    border: 1px solid #c8e6e0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.lhf-checkout-banner-icon {
    font-size: 28px;
}

.lhf-checkout-banner-text {
    font-size: 15px;
    color: #225d55;
}

.lhf-checkout-banner-text strong {
    font-size: 18px;
}

.lhf-checkout-banner-sub {
    display: block;
    font-size: 13px;
    color: #6b9e97;
    margin-top: 2px;
}

/* ==========================================
   Checkout - Redemption Widget (multi-checkbox)
   ========================================== */
.lhf-redemption-widget {
    padding: 8px 0;
}

.lhf-redemption-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lhf-rules-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lhf-rule-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.lhf-rule-checkbox:hover {
    border-color: #225d55;
    background: #f0faf8;
}

.lhf-rule-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #225d55;
    cursor: pointer;
    flex-shrink: 0;
}

.lhf-rule-checkbox input[type="checkbox"]:checked + .lhf-rule-label {
    font-weight: 600;
}

.lhf-rule-checkbox:has(input:checked) {
    border-color: #225d55;
    background: #e8f5f2;
}

.lhf-rule-label {
    font-size: 14px;
    color: #333;
    flex: 1;
}

.lhf-rule-label strong {
    color: #225d55;
}

.lhf-rule-label small {
    color: #999;
    margin-left: 6px;
}

.lhf-rule-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
}

.lhf-rule-disabled:hover {
    border-color: #e0e0e0;
    background: #f9f9f9;
}

.lhf-redemption-summary {
    background: #f0faf8;
    border: 1px solid #c8e6e0;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: #225d55;
}

.lhf-balance-hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    margin-bottom: 0;
}

.lhf-applied-discount {
    background: #d4edda;
    padding: 14px;
    border-radius: 8px;
    color: #155724;
    font-size: 14px;
}

.lhf-applied-rule {
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 13px;
}

.lhf-applied-rule:last-of-type {
    border-bottom: none;
}

.lhf-applied-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 2px solid rgba(0,0,0,0.1);
    font-size: 15px;
}

.lhf-applied-total strong {
    color: #225d55;
}

.lhf-applied-total small {
    display: block;
    color: #666;
    font-size: 12px;
}

.lhf-applied-discount strong {
    color: #225d55;
}

.lhf-remove-redemption {
    margin-top: 10px;
}

/* ==========================================
   Redemption Widget - Stepper
   ========================================== */
.lhf-rq {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lhf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8faf9;
    border: 1px solid #e2e8e6;
    border-radius: 10px;
}

.lhf-row-info {
    font-size: 14px;
    color: #333;
}

.lhf-row-info strong,
.lhf-row-info bdi {
    color: #225d55;
    font-weight: 700;
}

.lhf-row-info small {
    color: #999;
    font-size: 12px;
}

.lhf-row-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.lhf-minus,
.lhf-plus {
    width: 32px;
    height: 32px;
    border: 1px solid #cdd5d2;
    background: #fff;
    color: #225d55;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
    padding: 0;
}

.lhf-minus {
    border-radius: 8px 0 0 8px;
    border-right: none;
}

.lhf-plus {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

.lhf-minus:hover,
.lhf-plus:hover {
    background: #225d55;
    color: #fff;
    border-color: #225d55;
}

.lhf-minus:disabled,
.lhf-plus:disabled {
    background: #f0f0f0;
    color: #ccc;
    border-color: #ddd;
    cursor: not-allowed;
}

.lhf-qty {
    width: 40px;
    height: 32px;
    border: 1px solid #cdd5d2;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #225d55;
    background: #fff;
    padding: 0;
    -moz-appearance: textfield;
}

.lhf-qty::-webkit-inner-spin-button,
.lhf-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lhf-qty:disabled {
    background: #f0f0f0;
    color: #ccc;
}

.lhf-rq.has-items .lhf-row-active {
    background: #e8f5f2;
    border-color: #225d55;
}

/* ==========================================
   Cart - Points per item
   ========================================== */
.lhf-item-points {
    color: #225d55;
    font-weight: 600;
    font-size: 12px;
}

.lhf-earned-points {
    color: #225d55;
    font-weight: 700;
    font-size: 16px;
}

/* ==========================================
   Order - Points summary
   ========================================== */
.lhf-order-points {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
}

.lhf-order-points p {
    margin: 4px 0;
    font-size: 14px;
}

.lhf-order-points-earned {
    color: #28a745;
}

.lhf-order-points-redeemed {
    color: #dc3545;
}

/* ==========================================
   Mobile Responsive
   ========================================== */
@media (max-width: 767px) {
    .lhf-balance-card {
        padding: 20px;
    }

    .lhf-balance-value {
        font-size: 40px;
    }

    .lhf-rules-grid {
        grid-template-columns: 1fr;
    }

    .lhf-row {
        padding: 10px 12px;
    }

    .lhf-row-info {
        font-size: 13px;
        flex: 1;
        min-width: 0;
    }

    .lhf-transactions-table thead {
        display: none;
    }

    .lhf-transactions-table tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .lhf-transactions-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }

    .lhf-transactions-table td::before {
        content: attr(data-title) ': ';
        font-weight: 600;
        color: #888;
    }

    .lhf-rules-table thead {
        display: none;
    }

    .lhf-rules-table tr {
        display: block;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .lhf-rules-table td {
        display: flex;
        justify-content: space-between;
        padding: 4px 0;
        border: none;
    }
}
