/* ============================================
   MISSIONS.CSS - Premium Redesign
   Responsivo e proporcional (max 6.9")
============================================ */

/* IMPORTS & VARS FROM SETTINGS */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Luckiest+Guy&display=swap');

:root {
    --gold-light: #fef08a;
    --gold-dark: #a16207;
    --wood-depth: #2a1a0c;
}

/* Container */
.missions-box {
    /* BACKGROUND IMAGE FUNDO1 */
    background-image: url('../../../assets/images/home/fundo1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #fdf6e3;

    width: calc(100% - var(--space-lg) * 2);
    max-width: calc(var(--max-app-width) - var(--space-xl) * 2);
    height: 80dvh;
    max-height: 80dvh;

    border: 4px solid var(--wood-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- 1. CABEÇALHO --- */
.missions-header {
    display: flex;
    flex-direction: column;
    padding: var(--space-md, 16px);

    /* HEADER BACKGROUND BARRA REMOVED */
    background-color: transparent;

    border-bottom: none;
    flex-shrink: 0;
    min-height: 110px;
    justify-content: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* TITLE STYLE */
.modal-title {
    margin: 0;
    font-family: 'Luckiest Guy', cursive;
    /* Updated Font */
    font-weight: 400;
    font-size: clamp(20px, 6vw, 24px);
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: #ffffff;
    text-shadow:
        0 2px 0 #5d4037,
        0 4px 4px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 1));
}

.missions-header .close-btn {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s;
}

.missions-header .close-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.missions-header .close-btn:hover {
    transform: scale(1.1);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.5) 0%, transparent 70%);
}

.missions-header .close-btn:active {
    transform: scale(0.95);
    background: radial-gradient(circle, rgba(255, 0, 0, 0.7) 0%, transparent 70%);
}

.reset-indicator {
    margin-top: 5px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    /* White indicator on bar */
    font-family: monospace;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Nova Barra de Stats */
.missions-stats-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    margin-top: 10px;
}

.m-stat {
    font-family: 'Luckiest Guy', cursive;
    color: #ffffff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* --- LISTAS --- */
.missions-scroll-area {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    background: transparent;
}

.mission-section {
    margin-bottom: 25px;
}

.section-label {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.4rem;
    /* Um pouco menor que o título */
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    -webkit-text-fill-color: #ffffff;
    /* Efeito de contorno e profundidade estilo titulo */
    text-shadow:
        0 2px 0 #5d4037,
        0 3px 3px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.8));
}

.event-label {
    color: #845EC2;
}

/* --- CARD DE MISSÃO --- */
.mission-card {
    background: rgba(255, 255, 255, 0.7);
    /* Transparent Premium */
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid rgba(139, 69, 19, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s;
}

.m-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.m-desc {
    font-weight: 700;
    color: #374151;
    font-size: 0.95rem;
    margin: 0;
}

.m-reward {
    background: rgba(0, 201, 167, 0.1);
    /* Fundo Teal suavel */
    color: #009688;
    /* Texto Teal escuro */
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(0, 201, 167, 0.3);
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Barra de Progresso */
.m-progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bg {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #00C9A7;
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 5px rgba(0, 201, 167, 0.5);
}

.progress-text {
    font-size: 0.75rem;
    color: #4b5563;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
}

/* Botão Coletar */
.btn-claim {
    background: #00C9A7;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.2s;
    font-family: 'Luckiest Guy', cursive;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.mission-card.completed {
    border: 2px solid #00C9A7;
    background: rgba(255, 255, 255, 0.9);
}

.mission-card.claimed {
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.5);
    border: 1px dashed #9ca3af;
}

.btn-claim:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: default;
    box-shadow: none;
    text-shadow: none;
}

.mission-card.event-type {
    border-left: 4px solid #845EC2;
}