@import "./buttons.css";
@import "./forms.css";
@import "./table.css";
@import "./typography.css";
@import "./print.css";

* {
    font-family: 'DM Sans', Archivo, sans-serif;
    font-size: 16px;
}

body {
    background-color: #f2f2f2;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

body.login {
    background-color: #FAFAFA;
    /* grid-template-rows: 1fr;
    grid-template-columns: fr 3fr; */
}

a, a:hover {
    text-decoration: none;
}


/* UTILS */

.h-0 {
    height: 0 !important;
}

.w-0 {
    width: 0 !important;
}

.w-fit {
    width: fit-content !important;
}

.line-height-normal {
    line-height: normal !important;
}

.w-fit-content {
    width: fit-content !important;
}

.border-card {
    border: 1px solid #AEAEAE !important;
}

.pe-help {
    cursor: help !important;
}

/* BACKGROUND */

.bg-blue-main {
    background-color: #0E4A3C !important;
}

.bg-blue-lighter {
    background-color: #DDEEFF !important;
}

.bg-white-main {
    background: #FAFAFA;
}

.bg-blue-light-2 {
    background: #9CADBF;
}

.bg-blue-light-3 {
    background: #B0CFF1;
}

.bg-red-light {
    background: #FADDE0;
}

.bg-page {
    filter: opacity(.4) blur(4px);
    overflow: hidden;
    z-index: -1;
    left: -100vw;
    width: 100vw;
    height: 100vh;
}

.box-inner-shadow {
    box-shadow: 0 0 1rem #63636333 inset;
}

.big-circle {
    width: 37.5rem;
    height: 37.5rem;
    top: -10rem;
    right: 10rem;
    transition: all .4s ease-in;
    animation: scale 12s ease-in-out infinite alternate;
}

.circle {
    width: 10rem;
    height: 10rem;
    top: -25rem;
    left: 90%;
    animation: scale 6s ease-in-out infinite alternate;
}

.small-circle {
    width: 3.75rem;
    height: 3.75rem;
    top: 5rem;
    left: 20rem;
    transition: all .4s ease-in;
    animation: scale 4s ease-in-out infinite alternate;
}

.rectangle {
    width: 12.5rem;
    height: 6.25rem;
    top: -40rem;
    left: 80%;
    transition: all .4s ease-in;
    animation: scale 6s ease-in-out infinite alternate;
}

.square {
    width: 25rem;
    height: 25rem;
    top: -10rem;
    left: 70%;
    transition: all .4s ease-in;
    animation: scale 8s ease-in-out infinite alternate;
}

.bg-gray-light {
    background: #DDDDDD;
}


/* BOXS SHADOWS */

.bs-card-login {
    box-shadow: 0 0 6px #CCCCCC;
}

.bs-card {
    box-shadow: 2px 0px 8px #CCCCCC40;
}


/* HEADER */

header {
    top: 0px !important;
    background-color: #FFFFFF;
    box-shadow: 0 2px 5px #CCCCCC;
    position: fixed;
    width: 100%;
    z-index: 2;
    height: 80px;
}

.space-header {
    height: 80px;
}

/*
 * Legado: spacer de header fixed (80px). Sob chrome PontoVV (.pv-header sticky)
 * o spacer quebra o layout (vão duplo). Neutraliza aqui — styles.css sempre carrega.
 */
#header.pv-header {
    position: sticky;
    height: auto;
    z-index: 100;
    box-shadow: none;
}

#header.pv-header ~ .space-header {
    display: none;
    height: 0;
    overflow: hidden;
}

/*
 * Skip link: oculto por padrão em todas as shells (styles.css sempre carrega).
 * Reveal no :focus fica em pontovv-ui / registro / login CSS.
 * Markup também usa .visually-hidden-focusable (Bootstrap).
 */
.pv-skip-link:not(:focus):not(:focus-within),
.pv-login__skip:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.offcanvas-header button.btn-close {
    position: relative;
    top: 24px;
    left: 90%;
}

#notification {
    position: fixed;
    top: 80px;
    right: 0px;
}

/* --- */

.scale-hover-05 {
    transition: all .2s;
}
    .scale-hover-05:hover {
        transform: scale(1.05);
    }


/* FOOTER */

.default-footer {
    background: #0E4A3C !important;
    box-shadow: 0px 0px 5px #08325e;
    border-top: 0px !important;
}

.default-footer h6 {
    color: #FFFFFF;
    font-weight: 400;
}

.default-footer .pv-footer__brand-link {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
    text-decoration: none;
}

.default-footer .pv-footer__tech-logo {
    display: inline-block;
    height: 24px;
    width: auto;
    max-width: min(140px, 45vw);
    object-fit: contain;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .default-footer .pv-footer__brand-link {
        background: #fff;
        padding: 5px 10px;
        border-radius: 8px;
        line-height: 0;
    }

    .default-footer .pv-footer__tech-logo {
        height: 26px;
        max-width: min(140px, 48vw);
    }
}

#welcome-banner {
    background: linear-gradient(269deg, rgba(7, 90, 169, 0.60), #0E4A3C 100%), #ffffff;
    padding: 4rem 2rem 2rem;
    margin-bottom: 2rem;
    border-radius: 1rem;
}

.custom-tooltip {
    --bs-tooltip-bg: #eaeaea;
    --bs-tooltip-color: #252525;
    --bs-tooltip-padding-y: .5rem;
    --bs-tooltip-padding-x: 1.5rem;
    --bs-tooltip-border-radius: .5rem;
    --bs-tooltip-max-width: 300px;
}


/* CLOCK */

.clock {
    width: 100px;
    height: 100px;
    outline: 4px solid #FFFFFF;
    box-shadow: 0 0 1rem #CCCCCC80;
}

.clock-background {
    background: #F2F2F2;
    box-shadow: inset 0 0 .5rem #3333331A;
}

.clock-background-layer-1 {
    position: relative;
    top: calc(50% - 2px/2);
    transform: rotate(0deg);
}

.clock-background-layer-2 {
    position: relative;
    top: calc(50% - 2px - 2px/2);
    transform: rotate(45deg);
}

.clock-background-layer-3 {
    position: relative;
    top: calc(50% - 4px - 2px/2);
    transform: rotate(90deg);
}

.clock-background-layer-4 {
    position: relative;
    top: calc(50% - 6px - 2px/2);
    transform: rotate(135deg);
}

.clock-background-line {
    width: 8px;
    height: 2px;
    border-radius: 4px;
    background: #3987DB99;
}

.clock-minute-hand-layer {
    position: relative;
    top: -100%;
    animation: 1.5s spin-minute-hand-layer ease-in-out infinite;
}

.clock-minute-hand {
    width: 2.5px;
    height: 24px;
    border-radius: 4px;
    background: #E21E24;
    position: relative;
    top: calc(50% - 24px);
    left: calc(50% - 2.5px/2);
}

.clock-hour-hand-layer {
    position: relative;
    top: -200%;
    animation: 1.5s spin-hour-hand-layer ease-in-out infinite;
}

.clock-hour-hand {
    width: 3.5px;
    height: 16px;
    border-radius: 4px;
    background: #08325E;
    position: relative;
    top: calc(50% - 16px);
    left: calc(50% - 3.5px/2);
}

.clock-circle-center-layer {
    position: relative;
    top: -300%;
}

.clock-circle-center {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #08325E;
    position: relative;
    top: calc(50% - 4px);
    left: calc(50% - 8px/2);
}


@media (min-width: 576px) {
    .login-form {
        width: 440px !important;
    }
}

@media (min-width: 992px) {
    .w-lg-75 {
        width: 75% !important;
    }
}

@media (min-width: 1200px) {
    .w-xl-1200 {
        width: 1200px;
    }
}

@keyframes scale {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

@keyframes spin-hour-hand-layer {
    0%, 25% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-minute-hand-layer {
    0%, 25% { transform: rotate(0deg); }
    100% { transform: rotate(720deg); }
}

/* Biometria facial — overlay (espelha overlay-camera-cursor.html: oval + pulse + scan + cantoneiras).
 * Cores Ponto: --pv-blue / --pv-blue-dark (no roxo do mock). Oval escala com o frame. */
.biometria-frame {
    position: relative;
    overflow: hidden;
}
.biometria-oval-guide {
    pointer-events: none;
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    /* accent / accent-light / accent-dark do mock → paleta Ponto */
    --bio-guide-accent: var(--pv-blue, #0E4A3C);
    --bio-guide-accent-light: #5B9FD4;
    --bio-guide-accent-dark: var(--pv-blue-dark, #0E3A34);
    --bio-guide-h: 78%;
    --bio-guide-max-w: 88%;
    --bio-guide-corner: clamp(40px, 7vmin, 64px);
    --bio-guide-corner-inset: clamp(20px, 4.5vmin, 32px);
}
.biometria-oval-guide__ring,
.biometria-oval-guide__pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: var(--bio-guide-h);
    max-width: var(--bio-guide-max-w);
    aspect-ratio: 220 / 290;
    /* mock: translate(-50%, -55%) — oval levemente acima do centro */
    transform: translate(-50%, -55%);
    border-radius: 50%;
    border: 2px solid var(--bio-guide-accent);
    box-sizing: border-box;
}
.biometria-oval-guide__ring {
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.42),
        0 0 40px var(--bio-guide-accent-dark),
        0 0 80px rgba(20, 80, 70, 0.12),
        inset 0 0 40px rgba(20, 80, 70, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.biometria-oval-guide__pulse {
    border-color: var(--bio-guide-accent);
    animation: biometria-oval-pulse 2.2s ease-out infinite;
}
@keyframes biometria-oval-pulse {
    0% {
        transform: translate(-50%, -55%) scale(1);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -55%) scale(1.06);
        opacity: 0;
    }
}
.biometria-oval-guide__scan {
    position: absolute;
    left: 20%;
    right: 20%;
    width: auto;
    height: 2px;
    top: 15%;
    background: linear-gradient(90deg, transparent, var(--bio-guide-accent), transparent);
    box-shadow: 0 0 16px var(--bio-guide-accent);
    animation: biometria-oval-scan 2.8s ease-in-out infinite;
}
@keyframes biometria-oval-scan {
    0% {
        top: 15%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 75%;
        opacity: 0;
    }
}
.biometria-oval-guide__corner {
    position: absolute;
    width: var(--bio-guide-corner);
    height: var(--bio-guide-corner);
    box-sizing: border-box;
    border-style: solid;
    border-width: 0;
    border-color: var(--bio-guide-accent-light);
}
.biometria-oval-guide__corner--tl {
    top: var(--bio-guide-corner-inset);
    left: var(--bio-guide-corner-inset);
    border-top-width: 3px;
    border-left-width: 3px;
    border-radius: 4px 0 0 0;
}
.biometria-oval-guide__corner--tr {
    top: var(--bio-guide-corner-inset);
    right: var(--bio-guide-corner-inset);
    border-top-width: 3px;
    border-right-width: 3px;
    border-radius: 0 4px 0 0;
}
.biometria-oval-guide__corner--bl {
    bottom: var(--bio-guide-corner-inset);
    left: var(--bio-guide-corner-inset);
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-radius: 0 0 0 4px;
}
.biometria-oval-guide__corner--br {
    bottom: var(--bio-guide-corner-inset);
    right: var(--bio-guide-corner-inset);
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-radius: 0 0 4px 0;
}
.biometria-status.is-error {
    color: var(--pv-red, #C4923A) !important;
}
.biometria-oval-guide.is-face-ok .biometria-oval-guide__ring {
    border-color: var(--bio-guide-accent);
    box-shadow:
        0 0 0 9999px rgba(0, 0, 0, 0.38),
        0 0 48px var(--bio-guide-accent),
        0 0 90px rgba(20, 80, 70, 0.22),
        inset 0 0 40px rgba(20, 80, 70, 0.1);
}
.biometria-oval-guide.is-face-missing .biometria-oval-guide__ring {
    border-color: rgba(255, 193, 7, 0.95);
}
.biometria-oval-guide.is-face-dark .biometria-oval-guide__ring {
    border-color: rgba(20, 80, 70, 0.85);
}
.biometria-oval-guide.is-face-bright .biometria-oval-guide__ring {
    border-color: rgba(253, 126, 20, 0.95);
}
@media (prefers-reduced-motion: reduce) {
    .biometria-oval-guide__pulse {
        animation: none;
        opacity: 0;
        visibility: hidden;
    }
    .biometria-oval-guide__scan {
        animation: none;
        top: 45%;
        opacity: 0.55;
    }
}
.biometria-status.is-ok {
    color: #198754 !important;
}
.biometria-gps-status.is-error {
    color: #dc3545 !important;
}
.biometria-gps-status.is-ok {
    color: #198754 !important;
}
.biometria-video.biometria-mirror,
video.biometria-mirror {
    transform: scaleX(-1);
}
.biometria-challenge[aria-live] {
    min-height: 1.25em;
}
