/**
 * Validator web page styles
 */

@keyframes animateButton {
    0% {
        width: var(--btn-width);
    }
    100% {
        width: 64px;
        border-bottom-color: rgba(255,255,255,0.3);
        border-right-color: rgba(255,255,255,0.3);
        border-radius: 100px;
        color: transparent;
        background-color: var(--brand);
        justify-content: center;
        align-items: center;
    }
}
@keyframes toggleBtnSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- PAGE STYLES --- */
/* Hero / search block */
.hero{
    background:var(--brand);
    color:#fff;
    padding:42px 20px 56px;
}
.container{max-width:1100px;margin:0 auto;padding:0 8px}
.hero h1{margin:0 0 10px;font-size:44px;line-height:1.15}
.hero p{margin:0 0 28px;font-size:22px;opacity:.95}

/* Form styling to match screenshot */
.auth-form{
    display:flex;
    gap:18px;
    flex-wrap:wrap;
    justify-content: center;
}
.auth-input-container{
    flex: 1 1 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-input{
    flex:1 1 420px; /* grows but keeps generous width */
    /*min-width:260px;*/
    height:64px;
    border:2px solid rgba(255,255,255,.6);
    background:#fff;
    color:#111;
    border-radius:6px;
    padding:0 22px;
    font-size:22px;
    outline:none;
    text-transform:uppercase;
}
.auth-input::placeholder{color:#dfd6c9;letter-spacing:.5px;}
.auth-btn{
    flex:1 1 250px;
    min-width: 260px;
    height:64px;
    font-size:22px; font-weight:600;
    background:#fff; color:var(--brand);
    border:2px solid #fff; border-radius:6px; cursor:pointer;
    /*transition:transform .04s ease, opacity .2s ease;*/
    transition:
            width .3s ease,
            min-width .3s ease,
            flex .3s ease,
            border-radius .3s ease,
            background .3s ease,
            color .2s ease,
            border-color .3s ease;

    /* Save original width */
    --btn-width: 260px;
}
.auth-btn:active{transform:translateY(1px)}
.auth-btn:hover{opacity:.95}

/* Page padding after hero */
main{padding:32px 20px}
.muted{color:var(--muted)}

/* Small screens */
@media (max-width:720px){
    .hero h1{font-size:36px}
    .hero p{font-size:18px}
    .auth-input{flex-basis:100%}
}

/* контейнер */
.captcha-wrap{display:flex;align-items:center;gap:14px}

/* картинка как бейдж */
.captcha-img{
    height:56px; border-radius:8px; background:#fff; padding:6px 10px;
    box-shadow:0 1px 0 rgba(0,0,0,.08);
}

/* узкое поле под капчу: моно, аппер, подчеркивание */
.captcha-input{
    width:180px; /* короче основного поля */
    height:auto; padding:6px 2px 4px; background:transparent;
    border:none; border-bottom:2px solid #fff; border-radius:0;
    font:600 22px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing:2px; color:#fff;
    /*text-transform:uppercase;*/
}

/* ховеры/фокус */
.captcha-input:focus{outline:none;border-bottom-color:#ffe5c4}

/* подпись и ошибка */
.captcha-label{display:block;margin:8px 0 6px;font-size:14px;opacity:.9}
.help-block{margin-top:6px;color:#ffe0e0;font-size:13px}


/* --- CAMERA STYLES ––– */
.cam-wrap{
    position:relative;
    width:90vw;
    max-width:480px;
    aspect-ratio:3/4;
    background:#000;
    overflow:hidden;
    border-radius:16px;
}
/* --- start bounding box --- */
.cam-wrap .frame {
    position: absolute;
    inset: 0;
    width: 70%;
    height: 14%;
    margin: auto;
    box-shadow:0 0 0 9999px rgba(0,0,0,.5);
    pointer-events: none;
}
/* 4 уголка */
.cam-wrap .frame::before,
.cam-wrap .frame::after,
.cam-wrap .frame .corner-top-right,
.cam-wrap .frame .corner-bottom-right {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
}
/* Левый верх */
.cam-wrap .frame::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}
/* Левый низ */
.cam-wrap .frame::after {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}
/* Правый верх */
.cam-wrap .frame .corner-top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}
/* Правый низ */
.cam-wrap .frame .corner-bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}
/* --- end bounding box --- */

.scan-toggle-btn {
    position: relative;

    flex: 1 1 250px;
    min-width: 260px;
    height: 64px;

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

    border: 2px solid #fff;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;

    font-size: 19px;
    font-weight: 600;
    border-radius: 6px;

    cursor: pointer;
    /*transition: background .2s ease, transform .04s ease;*/
    transition:
            width .3s ease,
            min-width .3s ease,
            flex .3s ease,
            border-radius .3s ease,
            background .3s ease,
            color .2s ease,
            border-color .3s ease;

    /* Save original width */
    --btn-width: 260px;

    &:before {
        content: "";
        position: absolute;
        left: 10px;
        width: 50px;
        height: 50px;
        top: 50%;
        transform: translateY(-50%);
        background-image: url("/camera.svg");
    }
}
.scan-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}
.scan-toggle-btn:active {
    transform: translateY(1px);
}

/* When loading: animate button + show spinner border */
.scan-toggle-btn.loading, .auth-btn.loading {
    /* kill flex stretching */
    flex: 0 0 64px;

    /* allow it to go smaller */
    min-width: 0;

    /* hard-lock to spinner size */
    width: 64px;
    max-width: 64px;

    animation: animateButton 0.3s ease-in forwards,
    toggleBtnSpinner 1s linear 0.5s infinite;

    border: 4px solid transparent;
    border-top-color: white;
    border-left-color: white;

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

    /* disables clicks */
    pointer-events: none;
    cursor: not-allowed;
}
/* hide icon + inner text while loading */
.scan-toggle-btn.loading::before {
    display: none;
}
.scan-toggle-btn.loading > *, .auth-btn.loading > * {
    visibility: hidden;
}

.snap-btn{
    position:absolute;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    padding:8px 18px;
    border-radius:999px;
    border:none;
    font-size:14px;
    cursor:pointer;
    background:#fff;
    color:#000;
    font-weight:600;
}
video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*transform: scaleX(-1); !* убрать, если не нужен зеркальный эффект *!*/
}

.camera-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.9);
    display:none;              /* по умолчанию скрыта */
    align-items:center;
    justify-content:center;
    z-index:1000;
}
.camera-overlay.active{
    display:flex;              /* показываем, когда активна */
}

.shutter-container {
    position: absolute;
    bottom: 24px;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    padding: 0 30px;
}
.shutter-btn {
    background-color: transparent;
    border-width: 5px;
    border-style: solid;
    border-color: white;
    width: 85px;
    height: 85px;
    border-radius: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.shutter-btn-inner {
    width: 70px;
    height: 70px;
    border-radius: 50px;
    background-color: white;
}
/* кнопка закрытия (крестик) */
.camera-close{
    position:absolute;
    top:12px;
    right:12px;
    width:32px;
    height:32px;
    border-radius:999px;
    border:none;
    cursor:pointer;
    background:rgba(0,0,0,.6);
    color:#fff;
    font-size:18px;
    line-height:32px;
    text-align:center;
}


/* –––– styles for validation result (response from amp.eu) */
.not-valid {
    position: relative;
    display: flex;
    width: 27px;
    height: 27px;
    &::after {
        content: "";
        width: 4px;
        height: 28px;
        border-radius: 10px;
        background-color: #c13038;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
    }
    &::before {
        content: "";
        width: 4px;
        height: 28px;
        border-radius: 10px;
        background-color: #c13038;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
    }
}
.valid-code {
    position: relative;
    display: flex;
    width: 27px;
    height: 27px;
    &::after {
        content: "";
        width: 4px;
        height: 20px;
        border-radius: 10px;
        background-color: #07b816;
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%) rotate(-30deg);
    }
    &::before {
        content: "";
        width: 4px;
        height: 30px;
        border-radius: 10px;
        background-color: #07b816;
        position: absolute;
        left: 13px;
        top: 43%;
        transform: translate(-50%, -50%) rotate(30deg);
    }
}
.message-text {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 1.5em;
    font-weight: 600;
    font-family: "Work Sans", sans-serif;
    @media screen and (max-width: 1680px) {
        font-size: 1.313em;
    }
    @media screen and (max-width: 1440px) {
        font-size: 1.22em;
    }
    @media screen and (max-width: 1366px) {
        font-size: 19px;
    }
}
.not-valid-text {
    color: #c13038;
}
.valid-text {
    color: #07b816;
}

.dark-color {
    color: #04414a;
    padding-left: 5px;
}