/* =========================================================
   JOGO-POPUPS.CSS — POP-UPS E DIÁRIO DE BORDO
========================================================= */

/* =========================================================
   POP-UP ENTRE TAREFAS
========================================================= */

.popup-proxima-tarefa {
    position: absolute;
    inset: 0;

    z-index: 60;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    background: rgba(45, 32, 18, 0.24);
    backdrop-filter: blur(2px);
}

.popup-proxima-tarefa.hidden {
    display: none !important;
}

.popup-proxima-caixa {
    position: relative;

    width: min(390px, 96vw);
    min-height: 500px;

    padding: 34px 24px 28px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;

    border-radius: 34px;

    background: #fff8ea;
    border: 5px solid #e4a12d;

    box-shadow:
        0 10px 0 rgba(184, 107, 47, 0.24),
        0 22px 38px rgba(92, 61, 26, 0.20),
        inset 0 0 0 4px rgba(255, 255, 255, 0.58);

    text-align: center;
    overflow: hidden;
}

.popup-proxima-caixa::before {
    content: "";
    position: absolute;
    inset: 12px;

    border-radius: 26px;
    border: 2px solid rgba(231, 195, 123, 0.45);

    pointer-events: none;
}

.popup-topo-faixa {
    position: relative;
    z-index: 1;

    margin-top: -8px;
    margin-bottom: 4px;
}

.popup-topo-img {
    display: block;
    width: min(280px, 74vw);
    height: auto;
    object-fit: contain;
}

.popup-tutor-circulo {
    position: relative;
    z-index: 1;

    width: 132px;
    height: 132px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: linear-gradient(180deg, #27a8ff, #1575d1);
    border: 6px solid #f2b238;

    box-shadow:
        0 8px 0 rgba(184, 107, 47, 0.20),
        0 10px 22px rgba(0, 0, 0, 0.12);

    overflow: hidden;
}

.popup-proxima-tutor-img {
    width: 106px;
    height: 106px;
    object-fit: contain;
}

#popup-proxima-titulo {
    position: relative;
    z-index: 1;

    margin: 6px 0 0;

    font-size: 2.3rem;
    line-height: 1.05;
    font-weight: 900;
    color: #143f79;
}

#popup-proxima-texto {
    position: relative;
    z-index: 1;

    max-width: 300px;
    margin: 0;

    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
    color: #143f79;
}

#popup-proxima-subtexto {
    position: relative;
    z-index: 1;

    margin: 4px 0 8px;

    font-size: 0.96rem;
    line-height: 1.3;
    font-weight: 800;
    color: #6d4217;
}

#btn-prosseguir-tarefa {
    position: relative;
    z-index: 1;

    min-width: 250px;
    min-height: 68px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin-top: auto;
    padding: 14px 28px;

    border-radius: 999px;
    border: 4px solid #0e66c4;

    background: linear-gradient(180deg, #2da2ff, #0f6ad4);
    color: #ffffff;

    font-size: 1.05rem;
    font-weight: 900;

    box-shadow:
        0 8px 0 #0d4e99,
        0 12px 20px rgba(0, 0, 0, 0.16);

    cursor: pointer;
}

#btn-prosseguir-tarefa span {
    display: inline-block;
    transform: translateY(-1px);
}

.icone-btn-popup {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

#btn-prosseguir-tarefa:active {
    transform: translateY(3px);
    box-shadow:
        0 4px 0 #0d4e99,
        0 7px 12px rgba(0, 0, 0, 0.14);
}

/* =========================================================
   DIÁRIO DE BORDO — BOTÃO
========================================================= */

.diario-bordo {
    width: 100%;
    margin: 8px auto 10px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-diario-bordo {
    position: relative;

    width: min(290px, 92%);
    min-height: 46px;
    padding: 0 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 0;
    border-radius: 999px;

    background: linear-gradient(180deg, #fff1ac, #ffd96f);
    color: #5a3511;

    box-shadow:
        0 5px 0 rgba(184, 107, 47, 0.28),
        0 10px 18px rgba(92, 61, 26, 0.12),
        inset 0 0 0 2px rgba(255, 255, 255, 0.52);

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.btn-diario-bordo img {
    width: 142px;
    max-width: 58%;
    height: auto;

    display: block;
    object-fit: contain;

    filter: drop-shadow(0 2px 2px rgba(70, 38, 9, 0.18));
}

.btn-diario-bordo small {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 24px;
    padding: 4px 9px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.45);
    color: #086b7d;

    font-size: 0.66rem;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
}

.btn-diario-bordo:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.015);
    filter: brightness(1.03);
}

.btn-diario-bordo:active:not(:disabled) {
    transform: translateY(2px) scale(0.985);
    box-shadow:
        0 3px 0 rgba(184, 107, 47, 0.28),
        0 6px 12px rgba(92, 61, 26, 0.12),
        inset 0 0 0 2px rgba(255, 255, 255, 0.52);
}

/* =========================================================
   DIÁRIO DE BORDO — MODAL
========================================================= */

.modal-diario-bordo {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: grid;
    place-items: center;

    padding: 18px;
}

.modal-diario-bordo.hidden {
    display: none !important;
}

.modal-diario-overlay {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(circle at center, rgba(18, 67, 93, 0.26), rgba(7, 25, 38, 0.62));
    backdrop-filter: blur(2px);
}

.modal-diario-box {
    position: relative;
    z-index: 1;

    width: min(490px, 95vw);
    max-height: min(92dvh, 760px);

    padding: 32px 26px 28px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    border-radius: 34px;

    background-color: #fff4cf;
    background-image: url("../assets/fundos/fundo_popup.webp");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    border: 5px solid #e4a12d;

    box-shadow:
        0 10px 0 rgba(130, 72, 20, 0.30),
        0 24px 42px rgba(13, 42, 61, 0.34),
        inset 0 0 0 4px rgba(255, 255, 255, 0.40);

    color: #143f79;
    text-align: center;

    overflow: hidden;
}

.modal-diario-box::before {
    content: "";
    position: absolute;
    inset: 13px;

    border-radius: 24px;
    border: 2px dashed rgba(221, 168, 77, 0.72);

    pointer-events: none;
}

.modal-diario-cabecalho,
.modal-diario-conteudo,
.btn-entendi-diario {
    position: relative;
    z-index: 1;
}

.btn-fechar-diario {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;

    width: 42px;
    height: 42px;
    padding: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;
    border: 4px solid #d08a25;

    background: linear-gradient(180deg, #fff8dd, #ffd98a);
    color: #7b4314;

    font-size: 1.35rem;
    line-height: 1;
    font-weight: 900;

    box-shadow:
        0 5px 0 rgba(126, 68, 17, 0.32),
        0 9px 14px rgba(0, 0, 0, 0.14);

    cursor: pointer;
}

.btn-fechar-diario:active {
    transform: translateY(2px);
    box-shadow:
        0 3px 0 rgba(126, 68, 17, 0.32),
        0 5px 9px rgba(0, 0, 0, 0.14);
}

.modal-diario-cabecalho {
    width: 100%;
    padding: 2px 50px 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.modal-diario-banner {
    width: min(255px, 74vw);
    height: auto;

    display: block;
    object-fit: contain;

    filter: drop-shadow(0 4px 4px rgba(94, 50, 12, 0.20));
}

.modal-diario-cabecalho small {
    display: block;

    margin-top: -2px;

    color: #0c8b97;

    font-size: 0.98rem;
    line-height: 1.1;
    font-weight: 900;

    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.76);
}

.modal-diario-conteudo {
    width: 100%;
    margin-top: 2px;
    padding: 22px 20px 24px;

    border-radius: 24px;

    background: rgba(255, 250, 230, 0.64);
    border: 2px dashed rgba(221, 168, 77, 0.82);

    box-shadow:
        0 6px 0 rgba(184, 107, 47, 0.12),
        0 12px 20px rgba(92, 61, 26, 0.08),
        inset 0 0 0 2px rgba(255, 255, 255, 0.34);

    text-align: left;

    max-height: 380px;
    overflow-y: auto;
}

.modal-diario-titulo-linha {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 10px;
}

.modal-diario-titulo-linha span {
    flex: 0 0 auto;

    color: #d28b21;
    font-size: 1.25rem;
    line-height: 1;

    filter: drop-shadow(0 1px 0 #ffffff);
}

.modal-diario-conteudo h3 {
    margin: 0;

    color: #5a3511;

    font-size: 1.12rem;
    line-height: 1.15;
    font-weight: 900;
}

.modal-diario-conteudo p {
    margin: 0;

    color: #143f79;

    font-size: 1rem;
    line-height: 1.5;
    font-weight: 900;
}

.btn-entendi-diario {
    width: 100%;
    min-height: 64px;
    margin-top: 2px;
    padding: 13px 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    border-radius: 999px;
    border: 4px solid #0e66c4;

    background: linear-gradient(180deg, #2da2ff, #0f6ad4);
    color: #ffffff;

    font-family: inherit;
    font-size: 1rem;
    line-height: 1.1;
    font-weight: 900;

    box-shadow:
        0 7px 0 #0d4e99,
        0 12px 20px rgba(0, 0, 0, 0.16);

    cursor: pointer;
}

.icone-btn-entendi-diario {
    width: 24px;
    height: 24px;

    display: inline-block;
    flex-shrink: 0;

    object-fit: contain;

    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.20));
}

.btn-entendi-diario:active {
    transform: translateY(3px);
    box-shadow:
        0 4px 0 #0d4e99,
        0 7px 12px rgba(0, 0, 0, 0.14);
}