/*
 * modules/home.css — extracted from bfStyle.css §7752-8137 on 2026-05-24
 *
 * Sprint 1C: CSS Module Split. Loaded on `/screen` (index) only.
 * Selector namespace: `.home-hero`, `.home-featured`, `.home-row`, `.home-section-title`.
 * Tokens: --primary-gold, --c-loyalty/store/leader/ticket/prediction/wheel/bonus/call/livechat.
 */
/* ==========================================================================
   HOME (Index/Dashboard) — Apple Felsefesi
   "Basit olmak karmaşık olmaktan zordur." — Steve Jobs
   Minimum şey, maksimum hiyerarşi. Tek odak: HERO + FEATURED + compact rows.
   ========================================================================== */

.home-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0;
}

/* ----- HERO: Tier Status Block (single point of focus) ------------------ */
.home-hero {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
    cursor: pointer;
    width: 100%;

    display: flex;
    flex-direction: column;
    gap: 10px;

    padding: 18px 18px 16px;
    border-radius: 20px;
    background:
        radial-gradient(ellipse at top right, rgba(var(--tier-rgb), 0.18) 0%, transparent 55%),
        linear-gradient(180deg, rgba(var(--card-rgb, 20, 20, 25), 0.92) 0%, rgba(var(--card-rgb, 20, 20, 25), 0.98) 100%);
    border: 1px solid rgba(var(--tier-rgb), 0.28);
    box-shadow: 0 0 24px rgba(var(--tier-rgb), 0.12);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.home-hero:active {
    transform: scale(0.99);
    box-shadow: 0 0 32px rgba(var(--tier-rgb), 0.2);
}

.home-hero__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.home-hero__emoji {
    font-size: 1.8rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(var(--tier-rgb), 0.18);
    border: 1px solid rgba(var(--tier-rgb), 0.32);
    flex-shrink: 0;
}

.home-hero__tier-name {
    flex: 1;
    min-width: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--tier-color, var(--text-primary));
    text-transform: uppercase;
}

.home-hero__streak {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 159, 64, 0.18);
    border: 1px solid rgba(255, 159, 64, 0.35);
    letter-spacing: 0.3px;
}

.home-hero__xp {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-top: 2px;
}

.home-hero__xp-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    margin-left: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    vertical-align: middle;
}

.home-hero__progress {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(var(--text-rgb, 255, 255, 255), 0.08);
    overflow: hidden;
    margin-top: 2px;
}

.home-hero__progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tier-color, var(--primary-gold)) 0%, rgba(var(--tier-rgb), 0.7) 100%);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.home-hero__next {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.home-hero__next--max {
    color: var(--tier-color);
    font-weight: 800;
}

.home-hero__balance {
    margin-top: 2px;
    font-size: 0.78rem;
    color: var(--primary-gold, var(--text-primary));
    font-weight: 700;
    letter-spacing: 0.2px;
}

@media (min-width: 480px) {
    .home-hero { padding: 22px 24px 20px; gap: 12px; }
    .home-hero__emoji { width: 56px; height: 56px; font-size: 2.2rem; border-radius: 16px; }
    .home-hero__tier-name { font-size: 1.15rem; }
    .home-hero__xp { font-size: 2.6rem; }
    .home-hero__xp-label { font-size: 0.78rem; }
    .home-hero__streak { font-size: 0.82rem; padding: 5px 12px; }
    .home-hero__progress { height: 7px; }
    .home-hero__next, .home-hero__balance { font-size: 0.85rem; }
}

@media (min-width: 768px) {
    .home-hero { padding: 26px 28px 24px; }
    .home-hero__emoji { width: 64px; height: 64px; font-size: 2.5rem; }
    .home-hero__tier-name { font-size: 1.3rem; }
    .home-hero__xp { font-size: 3rem; }
}

/* ----- FEATURED ACTION: tek high-priority CTA --------------------------- */
.home-featured {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 16px 18px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(var(--primary-gold-rgb, 255, 199, 0), 0.22) 0%, rgba(var(--primary-gold-rgb, 255, 199, 0), 0.08) 100%);
    border: 1px solid rgba(var(--primary-gold-rgb, 255, 199, 0), 0.45);
    box-shadow:
        0 0 20px rgba(var(--primary-gold-rgb, 255, 199, 0), 0.18),
        inset 0 1px 0 rgba(var(--primary-gold-rgb, 255, 199, 0), 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.home-featured:active {
    transform: scale(0.98);
    box-shadow:
        0 0 28px rgba(var(--primary-gold-rgb, 255, 199, 0), 0.28),
        inset 0 1px 0 rgba(var(--primary-gold-rgb, 255, 199, 0), 0.35);
}

.home-featured__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(var(--primary-gold-rgb, 255, 199, 0), 0.22);
    border: 1px solid rgba(var(--primary-gold-rgb, 255, 199, 0), 0.4);
}

.home-featured__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-featured__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-featured__subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-featured__badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--btn-text, #000);
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--primary-gold, #FFC700);
    letter-spacing: 0.3px;
    box-shadow: 0 0 12px rgba(var(--primary-gold-rgb, 255, 199, 0), 0.4);
}

@media (min-width: 480px) {
    .home-featured { padding: 18px 22px; gap: 16px; }
    .home-featured__icon { width: 52px; height: 52px; font-size: 2rem; }
    .home-featured__title { font-size: 1.1rem; }
    .home-featured__subtitle { font-size: 0.85rem; }
    .home-featured__badge { font-size: 0.85rem; padding: 7px 14px; }
}

/* ----- SECTION TITLE: küçük caps, sessiz hiyerarşi (iOS Settings) ------- */
.home-section-title {
    margin: 14px 4px 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-tertiary);
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

@media (min-width: 480px) {
    .home-section-title { margin: 16px 6px 6px; font-size: 0.78rem; }
}

/* ----- ROW GROUP: section içi liste container --------------------------- */
.home-row-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ----- ROW: compact list item (icon + text + badge? + chevron) ---------- */
.home-row {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(var(--card-rgb, 20, 20, 25), 0.55);
    border: 1px solid rgba(var(--text-rgb, 255, 255, 255), 0.06);
    transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.home-row:active {
    transform: scale(0.99);
    background: rgba(var(--card-rgb, 20, 20, 25), 0.75);
    border-color: rgba(var(--text-rgb, 255, 255, 255), 0.12);
}

.home-row__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(var(--primary-gold-rgb, 255, 199, 0), 0.18);
    border: 1px solid rgba(var(--primary-gold-rgb, 255, 199, 0), 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-row__icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-gold, var(--text-primary));
    stroke-width: 2.25;
    fill: none;
}

.home-row__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.home-row__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-row__subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-row__badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--primary-gold, var(--text-primary));
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(var(--primary-gold-rgb, 255, 199, 0), 0.15);
    border: 1px solid rgba(var(--primary-gold-rgb, 255, 199, 0), 0.3);
    letter-spacing: 0.3px;
}

.home-row__chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    fill: var(--text-tertiary);
    opacity: 0.7;
}

@media (min-width: 480px) {
    .home-row { padding: 14px 16px; gap: 14px; }
    .home-row__icon { width: 44px; height: 44px; border-radius: 13px; }
    .home-row__icon svg { width: 22px; height: 22px; }
    .home-row__title { font-size: 1rem; }
    .home-row__subtitle { font-size: 0.78rem; }
    .home-row__badge { font-size: 0.78rem; padding: 5px 11px; }
    .home-row__chevron { width: 18px; height: 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .home-hero,
    .home-featured,
    .home-row,
    .home-hero__progress-fill {
        transition: none !important;
    }
}

/* ==========================================================================
   FEATURED: Comeback Bonus variant — Faz 2 Sprint 2F
   Rose/red accent + subtle pulsing glow so it visually outranks the
   default gold Featured Action when a returning player lands here.
   ========================================================================== */
.home-featured--comeback {
    background: linear-gradient(
        135deg,
        rgba(244, 63, 94, 0.32) 0%,
        rgba(251, 146, 60, 0.18) 100%
    );
    border-color: rgba(244, 63, 94, 0.55);
    box-shadow:
        0 0 24px rgba(244, 63, 94, 0.28),
        inset 0 1px 0 rgba(244, 63, 94, 0.32);
    animation: cb-pulse 2.4s ease-in-out infinite;
}
.home-featured--comeback .home-featured__icon {
    background: rgba(244, 63, 94, 0.28);
    border-color: rgba(244, 63, 94, 0.55);
}
.home-featured--comeback .home-featured__icon svg {
    stroke: #f43f5e;
}
.home-featured--comeback .home-featured__badge {
    background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px -4px rgba(244, 63, 94, 0.5);
    letter-spacing: 0.6px;
    font-weight: 800;
}

@keyframes cb-pulse {
    0%, 100% {
        box-shadow:
            0 0 24px rgba(244, 63, 94, 0.28),
            inset 0 1px 0 rgba(244, 63, 94, 0.32);
    }
    50% {
        box-shadow:
            0 0 36px rgba(244, 63, 94, 0.45),
            inset 0 1px 0 rgba(244, 63, 94, 0.42);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-featured--comeback { animation: none; }
}

/* ==========================================================================
   COMEBACK TOAST + CONFETTI (rendered into document.body by the inline
   JS in index.php; styles live here because home.css is loaded on the
   dashboard where the comeback Featured Action surfaces).
   ========================================================================== */
.cb-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translate(-50%, -16px);
    padding: 14px 22px;
    border-radius: 16px;
    background: rgba(22, 22, 26, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(244, 63, 94, 0.55);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow:
        0 14px 32px -10px rgba(244, 63, 94, 0.5),
        0 2px 0 rgba(255, 255, 255, 0.04) inset;
    z-index: 10001;
    opacity: 0;
    transition: opacity 240ms ease, transform 240ms ease;
    max-width: calc(100vw - 32px);
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
}
.cb-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}
.cb-toast.is-error {
    border-color: rgba(244, 63, 94, 0.7);
    box-shadow: 0 14px 32px -10px rgba(244, 63, 94, 0.5);
}
.cb-toast.is-success strong { color: #fda4af; }

.cb-confetti {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}
.cb-confetti__bit {
    position: absolute;
    top: -10vh;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.9;
    animation: cb-confetti-fall 1.8s cubic-bezier(0.4, 0.1, 0.3, 1) forwards;
}
@keyframes cb-confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    8% { opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .cb-toast { transition: none !important; }
    .cb-confetti { display: none !important; }
}

