/* 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;
}

/* ==========================================
   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
   ========================================== */
.lhf-redemption-widget {
    padding: 8px 0;
}

.lhf-redemption-options {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.lhf-redemption-options select {
    min-width: 250px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

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

.lhf-applied-discount {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #d4edda;
    padding: 10px 14px;
    border-radius: 8px;
    color: #155724;
    font-size: 14px;
}

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

.lhf-remove-redemption {
    margin-left: auto;
}

/* ==========================================
   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-redemption-options {
        flex-direction: column;
        align-items: stretch;
    }

    .lhf-redemption-options select {
        width: 100%;
        min-width: unset;
    }

    .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;
    }
}
