/* Arquivo: popup.css */

/* ===== OVERLAY (Fundo escuro semitransparente) ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 66, 44, 0.65); /* Verde escuro institucional translúcido */
    backdrop-filter: blur(4px);
    z-index: 1050;
    animation: popupFadeIn 0.3s ease;
}

/* ===== POPUP CONTAINER ===== */
.popup-noticia {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1051;
    padding: 16px;
}

/* ===== CONTEÚDO DO POPUP ===== */
.popup-conteudo {
    background: linear-gradient(160deg, #ffffff 0%, #f4fbf7 100%);
    border-radius: 16px;
    padding: 26px 28px 24px 28px;
    max-width: 530px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(6, 66, 44, 0.30), 0 0 0 1px rgba(14, 122, 77, 0.12);
    position: relative;
    border-top: 6px solid #0E7A4D;
    animation: popupSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1052;
    overflow: hidden; /* Mantém a marca d'água dentro das bordas arredondadas */
}

/* ===== MARCA D'ÁGUA COM OS BONECOS CENTRALIZADOS ===== */
.popup-conteudo::before {
    content: "";
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 240px;
    background-image: url('assets/imgs/bonecos_fpmns.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.12; /* Visível, elegante e sem interferir na leitura */
    pointer-events: none;
    z-index: 1;
}

/* Garante que todo o conteúdo fique acima da marca d'água */
.popup-conteudo > * {
    position: relative;
    z-index: 2;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popupSlideDown {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== TOPO INSTITUCIONAL COM LOGO E BADGE ===== */
.popup-cabecalho-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(14, 122, 77, 0.12);
}

.popup-logo-topo {
    max-height: 44px;
    width: auto;
    object-fit: contain;
}

.popup-badge-oficial {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #E3F5EC;
    color: #0E7A4D;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BOTÃO FECHAR (X) ===== */
.popup-fechar {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f3;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #55605b;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 10;
}

.popup-fechar:hover {
    background: #e2ece7;
    color: #0E7A4D;
    transform: rotate(90deg);
}

/* ===== TÍTULO ===== */
.popup-titulo {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #06422C;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== MENSAGEM / TEXTO ===== */
.popup-mensagem {
    margin: 0 0 18px 0;
    font-size: 14.5px;
    color: #3b4540;
    line-height: 1.6;
}

.popup-mensagem p {
    margin-bottom: 10px;
}

/* ===== LISTA DE DATAS DESTACADAS ===== */
.popup-datas-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 18px 0;
}

.popup-data-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    background-color: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(14, 122, 77, 0.16);
    border-left: 4px solid #0E7A4D;
    border-radius: 8px;
    gap: 12px;
    backdrop-filter: blur(3px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.popup-data-card.feriado {
    border-left-color: #C9A227;
}

.popup-data-info {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.popup-status-facultativo {
    background-color: #E3F5EC;
    color: #0E7A4D;
}

.popup-status-feriado {
    background-color: #FFF3CD;
    color: #856404;
}

/* ===== BOTÃO DE AÇÃO ===== */
.popup-botao {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0E7A4D, #06422C);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(14, 122, 77, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.popup-botao:hover {
    background: linear-gradient(135deg, #12935d, #085337);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 122, 77, 0.35);
    color: #ffffff;
}

/* ===== ANIMAÇÃO DE SAÍDA ===== */
.popup-saindo .popup-overlay {
    animation: popupFadeOut 0.25s ease forwards;
}

.popup-saindo .popup-conteudo {
    animation: popupSlideUp 0.25s ease forwards;
}

@keyframes popupFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes popupSlideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-25px);
    }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 576px) {
    .popup-conteudo {
        padding: 22px 18px 18px 18px;
    }

    .popup-conteudo::before {
        width: 250px;
        height: 190px;
    }

    .popup-titulo {
        font-size: 17px;
    }

    .popup-mensagem {
        font-size: 13.5px;
    }

    .popup-data-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .popup-status-badge {
        align-self: flex-start;
    }
}
