/* /assets/css/quests-widget.css */
/* Виджет ежедневных заданий */

#quests-widget-root {
    margin-bottom: 2rem;
}

.quests-loading,
.quests-error {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.quests-loading .loader-spinner {
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   Основной блок
   ═══════════════════════════════════════════════════════════ */
.quests-widget {
    padding: 1.75rem;
    background: linear-gradient(145deg,
        rgba(20, 24, 54, 0.85) 0%,
        rgba(13, 17, 40, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.quests-widget.quests-bump {
    animation: questsBump 0.6s ease;
}

@keyframes questsBump {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.02); box-shadow: 0 0 40px rgba(124, 58, 237, 0.4); }
    100% { transform: scale(1); }
}

/* ═══════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════ */
.quests-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.quests-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: #fff;
}

.quests-progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.85rem;
    background: rgba(124, 58, 237, 0.15);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 999px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #a78bfa;
}

.quests-progress-badge .sep {
    opacity: 0.5;
}

.quests-progress-badge .done {
    color: #10b981;
}

/* ═══════════════════════════════════════════════════════════
   Стрик
   ═══════════════════════════════════════════════════════════ */
.quests-streak {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(239, 68, 68, 0.1));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 12px;
    color: #fbbf24;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quests-streak b {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    color: #f59e0b;
}

.quests-streak-best {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   Список заданий
   ═══════════════════════════════════════════════════════════ */
.quests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quest-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.quest-item:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(3px);
}

.quest-item.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.05));
    border-color: rgba(16, 185, 129, 0.35);
}

.quest-item.claimed {
    opacity: 0.65;
}

.quest-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    flex-shrink: 0;
}

.quest-body {
    min-width: 0;
}

.quest-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.quest-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quest-diff {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.quest-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quest-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quest-progress-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 52px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════
   Награды и кнопка
   ═══════════════════════════════════════════════════════════ */
.quest-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.quest-rewards {
    display: flex;
    gap: 0.65rem;
    font-size: 0.85rem;
}

.quest-reward {
    color: var(--text-secondary);
    white-space: nowrap;
}

.quest-reward b {
    color: #fff;
    font-weight: 700;
}

.quest-claim-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #10b981, #22d3ee);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.quest-claim-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.quest-claim-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.quest-claim-badge {
    padding: 0.35rem 0.75rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 8px;
    color: #34d399;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   Адаптив
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .quests-widget {
        padding: 1.25rem;
    }

    .quest-item {
        grid-template-columns: 44px 1fr;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }

    .quest-icon {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .quest-side {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-top: 0.5rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    .quest-rewards {
        gap: 1rem;
    }
}