/* ═══════════════════════════════════════════
   Quests Panel — 120-quests.css
   ═══════════════════════════════════════════ */

/* ── Modal ─────────────────────────────── */

.quests-content {
    max-width: 520px;
    height: 85vh;
}

/* ── Tabs ──────────────────────────────── */

.quest-tabs {
    display: flex;
    border-bottom: 2px solid #e0d5c1;
    margin-bottom: 0;
    flex-shrink: 0;
}

.quest-tab {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    background: #f5efe0;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #8b7355;
    transition: all 0.2s;
    font-family: inherit;
}

.quest-tab:hover {
    background: #efe5d0;
}

.quest-tab.active {
    color: #5a3e1b;
    border-bottom-color: #c8a96e;
    background: #fff;
}

.quest-tab .tab-badge {
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 11px;
    margin-left: 4px;
}

/* ── Quest list area ───────────────────── */

.quests-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* ── Quest card ────────────────────────── */

.quest-card {
    background: #fdfaf5;
    border: 1px solid #e8ddd0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.quest-card.completed {
    background: #f0faf0;
    border-color: #b8d8b8;
}

.quest-card.claimed {
    opacity: 0.6;
    background: #f5f5f5;
}

.quest-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0ebe0;
    border-radius: 10px;
    flex-shrink: 0;
}

.quest-card.completed .quest-icon {
    background: #d4edda;
}

.quest-info {
    flex: 1;
    min-width: 0;
}

.quest-name {
    font-weight: 700;
    font-size: 15px;
    color: #3e2a14;
    margin-bottom: 2px;
}

.quest-desc {
    font-size: 12px;
    color: #8b7355;
    margin-bottom: 6px;
}

/* ── Progress bar ──────────────────────── */

.quest-progress {
    height: 8px;
    background: #e8ddd0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #c8a96e, #e0c78a);
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 0;
}

.quest-card.completed .quest-progress-fill {
    background: linear-gradient(90deg, #5cb85c, #7dcc7d);
}

.quest-progress-text {
    font-size: 11px;
    color: #8b7355;
    text-align: right;
}

/* ── Reward badge ──────────────────────── */

.quest-reward {
    flex-shrink: 0;
    text-align: center;
    font-size: 12px;
    color: #6b5830;
    min-width: 55px;
}

.quest-reward strong {
    display: block;
    font-size: 13px;
    color: #c8a400;
}

.quest-reward .reward-xp {
    font-size: 11px;
    color: #6f42c1;
}

/* ── Claim button ──────────────────────── */

.quest-claim-btn {
    padding: 6px 14px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    font-family: inherit;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}

.quest-claim-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.quest-claim-btn:active {
    transform: scale(0.97);
}

.quest-claim-btn.claimed {
    background: #aaa;
    cursor: default;
}

/* ── Bonus banner ──────────────────────── */

.quest-bonus-banner {
    background: linear-gradient(135deg, #fff8e1, #ffe0b2);
    border: 2px solid #ffb74d;
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    text-align: center;
}

.quest-bonus-banner.earned {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: #66bb6a;
}

.quest-bonus-banner h4 {
    margin: 0 0 4px;
    font-size: 14px;
    color: #e65100;
}

.quest-bonus-banner.earned h4 {
    color: #2e7d32;
}

.quest-bonus-reward {
    font-size: 13px;
    color: #5d4037;
}

/* ── Progress summary ──────────────────── */

.quest-daily-summary {
    text-align: center;
    font-size: 13px;
    color: #8b7355;
    margin-bottom: 10px;
    padding: 6px;
    background: #fdfaf5;
    border-radius: 8px;
}

/* ── Empty state ───────────────────────── */

.quests-empty {
    text-align: center;
    padding: 30px;
    color: #aaa;
    font-size: 14px;
}

.quests-empty .empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

/* ── Quest complete popup ──────────────── */

.quest-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 5000;
    background: linear-gradient(135deg, #fff8e1, #fff3cd);
    border: 2px solid #ffb74d;
    border-radius: 14px;
    padding: 16px 20px;
    min-width: 260px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.quest-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.quest-popup .popup-header {
    font-weight: 700;
    font-size: 16px;
    color: #5a3e1b;
    margin-bottom: 4px;
}

.quest-popup .popup-reward {
    font-size: 13px;
    color: #8b7355;
}

/* ── Mobile ────────────────────────────── */

@media (max-width: 768px) {
    .quests-content {
        max-width: 100%;
        width: 95%;
        height: 80vh;
        margin: 0 auto;
    }

    .quest-tab {
        font-size: 12px;
        padding: 10px 4px;
    }

    .quest-card {
        padding: 10px 12px;
        gap: 8px;
    }

    .quest-icon {
        font-size: 24px;
        width: 36px;
        height: 36px;
    }

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

    .quest-desc {
        font-size: 11px;
    }

    .quest-reward {
        font-size: 11px;
        min-width: 45px;
    }

    .quest-popup {
        left: 10px;
        right: 10px;
        min-width: unset;
        max-width: unset;
    }
}
