/**
 * Rewards / Loyalty Page Styles
 *
 * @package Smokeboxx
 */

/* ==================== CONTAINER ==================== */

.rewards-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== HERO ==================== */

.rewards-hero {
    background: linear-gradient(135deg, var(--sb-orange) 0%, var(--sb-orange-dark) 100%);
    padding: 60px 0;
    text-align: center;
}

.rewards-hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 48px;
    font-weight: 900;
    color: var(--sb-white);
    margin-bottom: 16px;
}

.rewards-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
}

.hero-cta {
    display: inline-block;
    padding: 16px 40px;
    background: var(--sb-white);
    color: var(--sb-orange);
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.15s;
}

.hero-cta:hover {
    transform: scale(1.05);
}

/* ==================== POINTS BALANCE CARD ==================== */

.points-card {
    background: var(--sb-surface);
    border-radius: 16px;
    padding: 40px;
    margin-top: -40px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.points-info {
    text-align: left;
}

.points-label {
    font-size: 14px;
    color: var(--sb-gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.points-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 56px;
    font-weight: 900;
    color: var(--sb-orange);
    line-height: 1;
    margin-bottom: 8px;
}

.points-worth {
    font-size: 16px;
    color: #AAAAAA;
}

.points-worth strong {
    color: var(--sb-white);
}

.points-actions {
    display: flex;
    gap: 12px;
}

/* ==================== BUTTONS ==================== */

.rewards-page .btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    border: none;
    display: inline-block;
    text-align: center;
}

.rewards-page .btn-primary {
    background: var(--sb-orange);
    color: var(--sb-white);
}

.rewards-page .btn-primary:hover {
    background: var(--sb-orange-dark);
    transform: none;
}

.rewards-page .btn-secondary {
    background: var(--sb-dark);
    color: var(--sb-white);
}

.rewards-page .btn-secondary:hover {
    background: var(--sb-dark);
}

/* ==================== MAIN CONTENT ==================== */

.rewards-content {
    padding: 60px 0;
}

/* ==================== SECTION TITLE ==================== */

.rewards-page .section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: var(--sb-white);
    text-align: center;
    margin-bottom: 48px;
}

/* ==================== HOW IT WORKS ==================== */

.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 80px;
}

.step-card {
    background: var(--sb-surface);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--sb-orange);
    color: var(--sb-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin: 0 auto 20px;
}

.step-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--sb-white);
    margin-bottom: 12px;
}

.step-desc {
    font-size: 14px;
    color: var(--sb-gray);
    line-height: 1.6;
}

/* ==================== WAYS TO EARN ==================== */

.earn-section {
    margin-bottom: 80px;
}

.earn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.earn-card {
    background: var(--sb-surface);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.earn-icon {
    width: 56px;
    height: 56px;
    background: var(--sb-dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.earn-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--sb-orange);
}

.earn-info {
    flex: 1;
}

.earn-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--sb-white);
    margin-bottom: 4px;
}

.earn-desc {
    font-size: 13px;
    color: var(--sb-gray);
}

.earn-points {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--sb-orange);
    white-space: nowrap;
}

/* ==================== REWARDS TIERS ==================== */

.tiers-section {
    margin-bottom: 80px;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.tier-card {
    background: var(--sb-surface);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    border: 2px solid transparent;
    transition: border-color 0.15s;
}

.tier-card:hover {
    border-color: var(--sb-orange);
}

.tier-card.current {
    border-color: var(--sb-orange);
    background: rgba(233, 78, 27, 0.1);
}

.tier-badge {
    display: inline-block;
    padding: 6px 12px;
    background: var(--sb-dark);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--sb-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.tier-card.current .tier-badge {
    background: var(--sb-orange);
    color: var(--sb-white);
}

.tier-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--sb-white);
    margin-bottom: 8px;
}

.tier-requirement {
    font-size: 13px;
    color: var(--sb-gray);
    margin-bottom: 20px;
}

.tier-perks {
    text-align: left;
}

.tier-perk {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #AAAAAA;
    margin-bottom: 8px;
}

.tier-perk svg {
    width: 16px;
    height: 16px;
    stroke: var(--sb-success);
    flex-shrink: 0;
}

/* ==================== REDEEM SECTION ==================== */

.redeem-section {
    margin-bottom: 80px;
}

.redeem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.redeem-card {
    background: var(--sb-surface);
    border-radius: 10px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.redeem-card.redeemed {
    opacity: 0.5;
}

.redeem-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.redeem-img-placeholder {
    background: var(--sb-dark);
}

.redeem-content {
    padding: 14px;
}

.redeem-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--sb-white);
    margin-bottom: 8px;
}

.redeem-cost {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.redeem-points {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--sb-orange);
}

.redeem-btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--sb-dark);
    color: var(--sb-white);
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    text-align: center;
}

.redeem-btn:hover {
    background: var(--sb-orange);
}

.redeem-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.redeem-btn:disabled:hover {
    background: var(--sb-dark);
}

.redeem-btn.redeemed {
    background: var(--sb-success);
    color: var(--sb-white);
    cursor: default;
}

a.redeem-btn {
    color: var(--sb-white);
}

a.redeem-btn:hover {
    background: var(--sb-orange);
}

/* ==================== REDEEM TOAST ==================== */

.redeem-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--sb-surface);
    border: 2px solid var(--sb-success);
    border-radius: 10px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.redeem-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.redeem-toast span {
    font-size: 14px;
    font-weight: 600;
    color: var(--sb-white);
    white-space: nowrap;
}

.redeem-toast a {
    font-size: 13px;
    font-weight: 700;
    color: var(--sb-orange);
    text-decoration: none;
    white-space: nowrap;
}

.redeem-toast a:hover {
    text-decoration: underline;
}

/* ==================== FAQ SECTION ==================== */

.faq-section {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: var(--sb-surface);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    color: var(--sb-white);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question svg {
    width: 20px;
    height: 20px;
    stroke: var(--sb-gray);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 24px 20px;
    font-size: 14px;
    color: var(--sb-gray);
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    display: block;
}

/* ==================== FOOTER CTA ==================== */

.footer-cta {
    background: var(--sb-surface);
    padding: 60px 0;
    text-align: center;
    margin-top: 40px;
}

.footer-cta h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--sb-white);
    margin-bottom: 16px;
}

.footer-cta p {
    color: var(--sb-gray);
    margin-bottom: 24px;
}

/* ==================== RESPONSIVE — 900px ==================== */

@media (max-width: 900px) {
    .how-it-works,
    .tiers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .redeem-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .points-card {
        flex-direction: column;
        text-align: center;
    }

    .points-info {
        text-align: center;
    }
}

/* ==================== RESPONSIVE — 600px ==================== */

@media (max-width: 600px) {
    .how-it-works,
    .earn-grid,
    .tiers-grid {
        grid-template-columns: 1fr;
    }

    .rewards-hero-title {
        font-size: 32px;
    }

    .points-value {
        font-size: 40px;
    }
}

/* ==================== RESPONSIVE — 480px ==================== */

@media (max-width: 480px) {
    .rewards-hero {
        padding: 40px 0;
    }

    .rewards-hero-title {
        font-size: 28px;
    }

    .rewards-hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .hero-cta {
        padding: 14px 32px;
        font-size: 14px;
    }

    .points-card {
        padding: 24px;
        margin-top: -30px;
    }

    .points-label {
        font-size: 12px;
    }

    .points-value {
        font-size: 36px;
    }

    .points-worth {
        font-size: 14px;
    }

    .points-actions {
        flex-direction: column;
        width: 100%;
    }

    .rewards-page .btn {
        padding: 12px 20px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }

    .rewards-content {
        padding: 40px 0;
    }

    .rewards-page .section-title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .step-card {
        padding: 24px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .step-title {
        font-size: 16px;
    }

    .earn-card {
        padding: 16px;
        gap: 14px;
    }

    .earn-icon {
        width: 44px;
        height: 44px;
    }

    .earn-icon svg {
        width: 22px;
        height: 22px;
    }

    .earn-title {
        font-size: 14px;
    }

    .earn-points {
        font-size: 16px;
    }

    .tier-card {
        padding: 20px;
    }

    .tier-name {
        font-size: 18px;
    }

    .redeem-grid {
        grid-template-columns: 1fr;
    }

    .redeem-content {
        padding: 14px;
    }

    .redeem-name {
        font-size: 13px;
    }

    .redeem-points {
        font-size: 14px;
    }

    .faq-question {
        padding: 16px;
        font-size: 14px;
    }

    .faq-answer {
        padding: 0 16px 16px;
        font-size: 13px;
    }

    .footer-cta {
        padding: 40px 0;
    }

    .footer-cta h2 {
        font-size: 24px;
    }
}

/* ==================== INSIDE ACCOUNT LAYOUT ==================== */
/* When rewards page is inside the sidebar layout, scale down for narrower column */

.account-main.rewards-page .rewards-container {
    max-width: 100%;
    padding: 0;
}

.account-main.rewards-page .rewards-hero {
    border-radius: 12px;
    padding: 40px 24px;
    margin-bottom: 24px;
}

.account-main.rewards-page .rewards-hero-title {
    font-size: 32px;
}

.account-main.rewards-page .tiers-grid {
    grid-template-columns: repeat(2, 1fr);
}

.account-main.rewards-page .redeem-grid {
    grid-template-columns: repeat(3, 1fr);
}

.account-main.rewards-page .points-card {
    margin-top: 0;
    margin-bottom: 24px;
}

.account-main.rewards-page .rewards-content {
    padding: 0;
}

.account-main.rewards-page .footer-cta {
    border-radius: 12px;
    margin-top: 24px;
}
