/* ==========================================================================
   css/passaporte-vistos.css
   Passaporte Global de Vistos — Modal de coleção
   ========================================================================== */

.passaporte-vistos-modal-global {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
}

.passaporte-vistos-modal-global.hidden {
    display: none;
}

.passaporte-vistos-modal-global .modal-passaporte-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(34, 27, 18, 0.52);
    backdrop-filter: blur(5px);
}

/* Card principal */

.passaporte-vistos-card {
    position: relative;
    z-index: 2;

    width: min(94vw, 430px);
    max-height: calc(100vh - 28px);
    overflow-y: auto;

    padding: 22px 18px 18px;
    box-sizing: border-box;

    border-radius: 30px;
    background-color: #fff7df;
    background-image:
        linear-gradient(to bottom, rgba(255, 251, 236, 0.96), rgba(255, 244, 211, 0.96)),
        url('../img/fundos/fundo-popup.webp');
    background-size: 100% 100%, 100% 100%;
    background-position: center;
    background-repeat: no-repeat;

    border: 3px solid rgba(221, 172, 66, 0.78);
    box-shadow:
        0 10px 0 rgba(174, 122, 28, 0.55),
        0 24px 46px rgba(38, 24, 9, 0.34);
}

/* Botão fechar */

.passaporte-vistos-fechar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;
    background: rgba(229, 224, 211, 0.95);
    color: #25457d;

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

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

    cursor: pointer;
    box-shadow: 0 4px 8px rgba(65, 43, 16, 0.12);
}

/* Topo */

.passaporte-vistos-topo {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 14px;
    align-items: center;

    padding: 6px 48px 12px 4px;
}

.passaporte-vistos-avatar {
    width: 74px;
    height: 74px;

    border-radius: 22px;
    overflow: hidden;

    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 12px rgba(53, 34, 10, 0.18);

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

    color: #24477f;
    font-size: 2rem;
    font-weight: 900;
}

.passaporte-vistos-avatar img,
.passaporte-vistos-avatar .pais-avatar-img,
.passaporte-vistos-avatar .rodape-unificado__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.passaporte-vistos-avatar .pais-avatar-placeholder,
.passaporte-vistos-avatar .rodape-unificado__avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.passaporte-vistos-identidade h2 {
    margin: 0;
    color: #183b7d;
    font-size: clamp(2rem, 8vw, 2.65rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.passaporte-vistos-identidade p {
    margin: 8px 0 0;
    color: #657394;
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 800;
    line-height: 1.15;
}

/* Contador */

.passaporte-vistos-contador {
    width: fit-content;
    max-width: calc(100% - 12px);
    margin: 12px auto -8px;
    padding: 10px 18px;

    position: relative;
    z-index: 3;

    border-radius: 999px;
    background: rgba(255, 250, 236, 0.98);
    border: 2px dashed rgba(221, 172, 66, 0.72);
    box-shadow:
        0 3px 0 rgba(198, 150, 58, 0.20),
        0 8px 16px rgba(62, 42, 16, 0.08);

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

    color: #2f4165;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
    line-height: 1.1;
}

.passaporte-vistos-contador span,
.passaporte-vistos-contador strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.passaporte-vistos-contador strong {
    color: #27963a;
    font-size: 1.45rem;
    line-height: 1;
}

.passaporte-vistos-contador-icone {
    font-size: 1.45rem;
    line-height: 1;
}

/* Grade */

.passaporte-vistos-grade {
    margin-top: 0;
    padding: 34px 12px 14px;

    border-radius: 22px;
    background: rgba(255, 248, 225, 0.78);
    border: 1px solid rgba(203, 158, 67, 0.28);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.56),
        0 4px 12px rgba(64, 42, 12, 0.06);

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.passaporte-visto-card {
    min-height: 112px;
    padding: 8px 5px 7px;
    box-sizing: border-box;

    border-radius: 16px;
    background: rgba(255, 252, 242, 0.96);
    border: 1.5px dashed rgba(205, 162, 81, 0.38);
    box-shadow: 0 3px 8px rgba(59, 38, 11, 0.06);

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

.passaporte-visto-card--conquistado {
    background: rgba(255, 252, 244, 0.98);
    border-style: solid;
    padding: 4px;
    justify-content: center;
}

.passaporte-visto-card--conquistado .passaporte-visto-nome {
    display: none;
}

.passaporte-visto-img {
    width: 100%;
    max-width: 96px;
    height: auto;
    max-height: 96px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 7px rgba(60, 40, 12, 0.16));
}

.passaporte-visto-nome {
    display: block;
    margin-top: 6px;

    color: #536176;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}

/* Bloqueados */

.visto-nome-pais {
  font-size: 0.68rem;
  font-weight: 800;
  color: #5a3200;
  text-align: center;
  line-height: 1.2;
  max-width: 78px;
}

.passaporte-visto-card--bloqueado {
    opacity: 0.72;
}

.passaporte-visto-placeholder {
    width: 72px;
    height: 72px;

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

.passaporte-visto-circulo {
    position: relative;

    width: 66px;
    height: 66px;
    border-radius: 50%;

    border: 3px dashed rgba(196, 153, 77, 0.52);
    background: rgba(255, 247, 225, 0.72);

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

.passaporte-visto-icone {
    opacity: 0.28;
    font-size: 1.8rem;
}

.passaporte-visto-cadeado {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);

    width: 26px;
    height: 26px;

    border-radius: 8px;
    background: rgba(128, 98, 48, 0.92);
    color: #fff;

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

    font-size: 0.86rem;
    box-shadow: 0 3px 6px rgba(60, 38, 10, 0.15);
}

/* Rodapé */

.passaporte-vistos-rodape {
    margin-top: 14px;
    padding: 13px 16px;

    border-radius: 18px;
    background: rgba(255, 239, 190, 0.62);
    border: 1px solid rgba(210, 165, 73, 0.24);

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

    color: #5a3a12;
    text-align: center;
}

.passaporte-vistos-rodape strong {
    font-size: 0.92rem;
    font-weight: 900;
    line-height: 1.25;
}

.passaporte-vistos-rodape-icone {
    font-size: 1.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.passaporte-vistos-brilho {
    color: #e2a320;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Scroll */

.passaporte-vistos-card::-webkit-scrollbar {
    width: 7px;
}

.passaporte-vistos-card::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(162, 116, 39, 0.28);
}

.passaporte-vistos-card::-webkit-scrollbar-track {
    background: transparent;
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (max-width: 380px) {
    .passaporte-vistos-modal-global {
        padding: 8px;
    }

    .passaporte-vistos-card {
        width: min(96vw, 430px);
        max-height: calc(100vh - 16px);
        padding: 18px 12px 14px;
        border-radius: 26px;
    }

    .passaporte-vistos-fechar {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    .passaporte-vistos-topo {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 10px;
        padding: 4px 42px 10px 2px;
    }

    .passaporte-vistos-avatar {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .passaporte-vistos-identidade h2 {
        font-size: 1.8rem;
    }

    .passaporte-vistos-identidade p {
        font-size: 0.92rem;
    }

    .passaporte-vistos-contador {
        padding: 8px 14px;
        gap: 6px;
        font-size: 0.82rem;
        margin: 10px auto -6px;
        justify-content: center;
    }

    .passaporte-vistos-contador strong {
        font-size: 1.18rem;
    }

    .passaporte-vistos-grade {
        padding: 30px 8px 10px;
        gap: 7px;
        border-radius: 18px;
    }

    .passaporte-visto-card {
        min-height: 98px;
        border-radius: 14px;
        padding: 7px 4px 6px;
    }

    .passaporte-visto-card--conquistado {
        padding: 3px;
    }

    .passaporte-visto-placeholder {
        width: 58px;
        height: 58px;
    }

    .passaporte-visto-img {
        width: 100%;
        max-width: 78px;
        height: auto;
        max-height: 78px;
    }

    .passaporte-visto-circulo {
        width: 54px;
        height: 54px;
    }

    .passaporte-visto-nome {
        font-size: 0.72rem;
    }

    .passaporte-visto-cadeado {
        width: 22px;
        height: 22px;
        font-size: 0.72rem;
    }

    .passaporte-vistos-rodape {
        padding: 11px 10px;
        gap: 7px;
    }

    .passaporte-vistos-rodape strong {
        font-size: 0.78rem;
    }

    .passaporte-vistos-rodape-icone {
        font-size: 1.45rem;
    }
}

@media (orientation: landscape) and (max-height: 540px) {
    .passaporte-vistos-modal-global {
        align-items: flex-start;
        padding: 10px;
        overflow-y: auto;
    }

    .passaporte-vistos-card {
        max-width: 760px;
        width: min(96vw, 760px);
        max-height: none;
        padding: 18px 20px;
    }

    .passaporte-vistos-topo {
        grid-template-columns: 62px minmax(0, 1fr);
        padding-right: 48px;
    }

    .passaporte-vistos-avatar {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .passaporte-vistos-identidade h2 {
        font-size: 1.9rem;
    }

    .passaporte-vistos-identidade p {
        font-size: 0.95rem;
    }

    .passaporte-vistos-grade {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 28px 10px 10px;
    }

    .passaporte-visto-card {
        min-height: 92px;
    }

    .passaporte-visto-card--conquistado {
        padding: 3px;
    }

    .passaporte-visto-placeholder {
        width: 54px;
        height: 54px;
    }

    .passaporte-visto-img {
        width: 100%;
        max-width: 72px;
        height: auto;
        max-height: 72px;
    }

    .passaporte-visto-circulo {
        width: 50px;
        height: 50px;
    }

    .passaporte-visto-nome {
        font-size: 0.68rem;
    }

    .passaporte-vistos-rodape {
        margin-top: 10px;
        padding: 10px;
    }
}