.video-instructions.page-photo-id-camera {
    padding-top: 0
}

.instruction-block {
    border: 2px solid #e2e8f0;
    padding: 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f8fafc, #f0f4f8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04)
}

.instruction-block__inner {
    transition: opacity .35s ease-in-out
}

.fade-in {
    opacity: 1
}

.fade-out {
    opacity: 0
}

.text {
    margin-top: .75rem;
    font-weight: 500
}

.overlay {
    position: absolute;
    z-index: 999;
    width: 100%;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.92);
    top: 0;
    left: 0;
    backdrop-filter: blur(4px)
}

.overlay__inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center
}

.invalid {
    border: 5px solid red
}

.valid {
    border: 5px solid green
}

@media (min-width: 992px) {
    video {
        transform: scaleX(-1);
        -webkit-transform: scaleX(-1)
    }
}

.front-camera {
    transform: scaleX(-1);
    -webkit-transform: scaleX(-1)
}

.close-btn {
    cursor: pointer;
    display: inline-block;
    padding: 0;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
    border: none
}

.page-video {
    height: 100% !important;
    position: relative;
}

.verification-container:has(.page-video) {
    height: 100dvh !important;
}

@media (max-width: 991px) {
    .page-video #webcam {
        transform: scaleX(-1);
        -webkit-transform: scaleX(-1)
    }
}

.video-position__text {
    position: absolute;
    bottom: 10px;
    width: 100%;
    left: 0;
    padding: 0 15px;
    z-index: 99;
    text-align: center;
    pointer-events: none
}

.hold-timer-top {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    font-size: 2rem;
    font-weight: 900;
    color: #4ade80;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 6px 28px;
    border-radius: 30px;
    border: 2px solid rgba(74, 222, 128, 0.4);
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    letter-spacing: 2px;
    animation: holdPulse 1s ease-in-out infinite;
    pointer-events: none
}

@keyframes holdPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.08); opacity: 0.85; }
}
#webcam {
    z-index: 1 !important;
    flex-grow: initial !important;
    max-height: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

#webcam-wrapper {
    position: absolute;
    width: 200px;
    height: 250px;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 100vmax rgba(50, 50, 50, 0.95);
    border-radius: 50%;
    z-index: 9
}

.webcam-wrapper__inner {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 9999
}

.webcam-wrapper__top,
.webcam-wrapper__bottom,
.webcam-wrapper__left,
.webcam-wrapper__right {
    position: absolute;
    border: 8px solid #b4b5b3;
    background: transparent;
    transition: background-color .3s ease, box-shadow .3s ease
}

.webcam-wrapper__top,
.webcam-wrapper__bottom {
    left: -10px;
    width: calc(100% + 20px);
    height: 260px;
    border-radius: 45%;
    border-left-color: transparent;
    border-right-color: transparent
}

.webcam-wrapper__top {
    top: -20px;
    border-bottom-color: transparent
}

.webcam-wrapper__bottom {
    bottom: -20px;
    border-top-color: transparent
}

.webcam-wrapper__left,
.webcam-wrapper__right {
    top: 0;
    width: 210px;
    height: 100%;
    border-radius: 39%;
    border-bottom-color: transparent;
    border-top-color: transparent
}

.webcam-wrapper__left {
    left: -15px;
    border-right-color: transparent
}

.webcam-wrapper__right {
    right: -15px;
    border-left-color: transparent
}

.success--left {
    border-left-color: green !important
}

.success--right {
    border-right-color: green !important
}

.success--top {
    border-top-color: green !important
}

.success--bottom {
    border-bottom-color: green !important
}

.error--left {
    border-left-color: red !important
}

.error--right {
    border-right-color: red !important
}

.error--top {
    border-top-color: red !important
}

.error--bottom {
    border-bottom-color: red !important
}

.flash--left {
    border-left-color: orange !important;
    animation: flashBlink .6s ease-in-out
}

.flash--right {
    border-right-color: orange !important;
    animation: flashBlink .6s ease-in-out
}

.flash--top {
    border-top-color: orange !important;
    animation: flashBlink .6s ease-in-out
}

.flash--bottom {
    border-bottom-color: orange !important;
    animation: flashBlink .6s ease-in-out
}

@keyframes flashBlink {
    0% {
        opacity: .4
    }

    50% {
        opacity: 1
    }

    to {
        opacity: .4
    }
}

html,
body,
main {
    min-height: 100dvh
}

.highlight-past {
    color: green
}

.highlight-current {
    color: orange
}

.verification-container {
    padding: 0;
    max-width: 800px;
    height: 100dvh
}

.verification-container-page {
    display: flex;
    flex-direction: column;
    min-height: calc(var(--app-height) - 80px);
    justify-content: space-between;
    text-align: center;
    align-items: center
}

#video-id,
#webcam {
    flex-grow: 1;
    object-fit: contain;
    width: 95%;
    height: auto;
    max-width: 95vw;
    max-height: 70vh;
}

/* Mobile devices (small phones) */
@media (max-width: 375px) {
    #video-id,
    #webcam,
    #video-selfy {
        width: 100%;
        max-width: 100%;
        max-height: 60vh;
    }
}

/* Medium mobile devices */
@media (min-width: 376px) and (max-width: 480px) {
    #video-id,
    #webcam,
    #video-selfy {
        width: 98%;
        max-width: 98vw;
        max-height: 65vh;
    }
}

/* Tablets and larger phones */
@media (min-width: 481px) and (max-width: 768px) {
    #video-id,
    #webcam,
    #video-selfy {
        width: 96%;
        max-width: 96vw;
        max-height: 72vh;
    }
}

/* Tablets landscape and small desktops */
@media (min-width: 769px) and (max-width: 1024px) {
    #video-id,
    #webcam,
    #video-selfy {
        width: 94%;
        max-width: 94vw;
        max-height: 75vh;
    }
}

/* Large desktops */
@media (min-width: 1025px) {
    #video-id,
    #webcam,
    #video-selfy {
        width: 90%;
        max-width: 90vw;
        max-height: 80vh;
    }
}

#video-selfy {
    flex-grow: 1;
    object-fit: contain;
    width: 95%;
    height: auto;
    max-width: 95vw;
    max-height: 70vh;
    border-radius: 14px;
}

#birth-container {
    display: flex;
    gap: 6px;
    justify-content: center
}

#birth-container #birth-year {
    text-align: center;
    max-width: 100px
}

#birth-container #birth-month,
#birth-container #birth-day {
    text-align: center;
    max-width: 80px
}

.blur .selfie-shape {
    display: none !important
}

img.selfie-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .6;
    filter: drop-shadow(2px 2px 2px black) blur(1px)
}

.img-footer-logo {
    width: 64px;
    height: 64px;
    margin: auto
}

.img-reload {
    max-width: 64px;
    margin: auto
}

.img-photo-icon {
    width: 44px;
    margin-left: auto;
    margin-right: auto
}

#img-photo-id-sample,
#img-photo-selfy-sample {
    max-width: 90%
}

#img-photo-selfy-sample {
    width: 324px;
    border: 3px solid #334155;
    padding: 20px;
    border-radius: 16px
}

.page-photo-id h2,
.page-photo-id #take-photo-id,
.page-photo-selfy-uploaded h2,
.page-photo-id-camera h2,
.page-photo-selfy-camera h2,
.page-photo-id-camera #btn-take-photo-id-camera,
.page-photo-selfy-uploaded .btn {
    text-transform: uppercase
}

#id-image,
#selfy-image {
    position: absolute;
    visibility: hidden
}

.blur {
    filter: blur(3px)
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

input[type=number] {
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: textfield
}

.img-reload {
    -webkit-animation: spin .6s linear infinite;
    -moz-animation: spin .6s linear infinite;
    animation: spin .6s linear infinite
}

@-moz-keyframes spin {
    to {
        -moz-transform: rotate(-180deg)
    }
}

@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(-180deg)
    }
}

@keyframes spin {
    to {
        -webkit-transform: rotate(-180deg);
        transform: rotate(-180deg)
    }
}

#btn-take-photo-id--upload,
#btn-take-selfie--upload {
    width: 300px
}

.media-container {
    max-height: 40vh
}

#top-header {
    position: relative;
    width: 100%;
    box-shadow: none;
    z-index: 1;
    border-bottom: none;
}

#top-header img {
    max-width: 90%;
    max-height: 40px
}

#top-header .mp-header {
    background-color: #fff;
    padding: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    width: 100%;
    height: 100%
}

#canvas-id,
#canvas-selfy {
    max-width: 100vw;
    max-height: 50vh
}

.spinner-loader-fader.active {
    z-index: 1000
}

@media screen and (max-width: 500px) {
    p.copyright {
        font-size: 3vw
    }
}

@keyframes pageFade {
    0% {
        opacity: 0;
        transform: translateY(12px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes welcomeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}