html,
body {
    height: 100%;
}

* {
    padding: 0;
    margin: 0;
}

#customModal {
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.modal-content {
    background-color: #fff;
    border-radius: 2px;
    display: flex;
    flex-direction: row;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
}

.left-section {
    display: flex;
    border-radius: 2px 0 0 2px;
    flex-direction: column;
    justify-content: center;
    color: white;
    width: 50%;
    align-items: center;
}


.logo {
    width: 200px;
    height: auto;
}

.left-section-content {
    text-align: center;
}

.left-title {
    font-family: "Inter", sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #35DC94;
}

.left-description {
    font-family: "Inter", sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #ffffff;
    margin-bottom: 2rem;
}

.right-section {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    margin: auto;
    padding: 1rem;
    box-sizing: border-box;
}

.verify-image {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.failed-message {
    color: #FF9089;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    font-family: "Inter", sans-serif;
    margin: 0px;
}

.camera-wrapper {
    width: 281px;
    height: 281px;
    border: 4px solid #35DC94;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: border-color 0.2s ease, border-width 0.2s ease;
}

.camera-mask-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    --hole-r: var(--circle-r, 110px);
    background: radial-gradient(
        circle var(--hole-r) at var(--circle-x, 50%) var(--circle-y, 50%),
        transparent 0,
        transparent calc(var(--hole-r) - 1px),
        rgba(255, 255, 255, 1) var(--hole-r),
        rgba(255, 255, 255, 1) 100%
    );
}

.camera-wrapper.ok {
    border-color: #35DC94;
    border-width: 4px;
}

.camera-wrapper.bad {
    border-color: #FF9089;
}

.placeholder-icon {
    width: 130px;
    height: 130px;
    background-image: url('./showcase/face-scan.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.next-button,
.continue-button {
    width: 100%;
    max-width: 371px;
    height: 45px;
    background-color: #1C5257;
    color: white;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    margin-top: 2rem;
    font-size: 16px;
    font-weight: 600;
}

.phone-button {
    width: 100%;
    max-width: 371px;
    height: 45px;
    background-color: #E8F1F1;
    color: #1C5257;
    border-radius: 24px;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 16px;
    font-weight: 600;
}

.button-disabled {
    pointer-events: none;
    background-color: #1c5257b5;
}

.need-help {
    margin-top: 20px;
    color: #1C5257;
    font-size: 14px;
    cursor: pointer;
}

.approved-message {
    color: #00E060;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    font-family: "Inter", sans-serif;
    margin: 0px;
}

.heading {
    font-family: "Inter", sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 48px;
    text-align: center;
    margin-bottom: 1rem;
    color: #1C5257;
    z-index: 3;
}

.headingKiosk {
    font-family: "Inter", sans-serif;
    font-size: 76px;
    font-weight: 600;
    text-align: center;
    color: white;
}

.placeholder-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-left: 24px;
    padding-right: 24px;
    color: #497579;
    font-family: "Inter", sans-serif;
}

.paragraph-style {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: #497579;
    margin-top: 50px;
}

.description {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 24px;
    text-align: center;
    color: #497579;
    z-index: 3;
}

#kioskHint {
    margin-top: 2rem;
    text-align: center;
    color: #497579;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    line-height: 24px;
    z-index: 3;
}

.descriptionKiosk {
    font-family: "Inter", sans-serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
    color: white;
    margin-bottom: 20px;
    margin-top: 30px;
    display: none;
}

.countdown {
    position: absolute;
    color: #35DC94;
    font-size: 50px;
    font-weight: 400;
    text-align: center;
    font-family: "Inter", sans-serif;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.3);
}

/* Countdown overlay (3, 2, 1) – centered, no background, just the number */
.countdown-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    background: none;
    font-size: 50px;
    font-weight: 400;
    font-family: "Inter", sans-serif;
    color: #35DC94;
}


#scanningText {
    color: #497579;
    font-size: 20px;
    font-weight: 500;
    margin-top: 2rem;
    text-align: center;
    font-family: "Inter", sans-serif;
}

.scanning-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

.scanning-icon svg {
    width: 100%;
    height: 100%;
}

.scanning-text {
    color: #497579;
    font-size: 20px;
    font-weight: 500;
    margin-top: 10px;
    text-align: center;
    font-family: "Inter", sans-serif;
}

.button-wrapper {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    width: 60%;
}

.mobile-nav {
    height: 6vh;
    background: #1C5257;
    box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.1);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.nav-logo {
    width: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 992px) {
    .mobile-nav {
        display: flex;
    }

    .modal-content {
        flex-direction: column;
        width: 100%;
        height: 100%;
        max-height: none;
    }

    .left-section {
        display: none;
    }

    .right-section {
        width: 100%;
        height: 100%;
    }

    .next-button,
    .continue-button {
        width: 100%;
    }

    .button-wrapper {
        width: 100%;
    }
}

/* RTL support for Arabic */
[dir="rtl"] .modal-content {
    direction: rtl;
}

[dir="rtl"] .right-section {
    text-align: center;
}

[dir="rtl"] .heading,
[dir="rtl"] .description,
[dir="rtl"] .approved-message,
[dir="rtl"] .failed-message,
[dir="rtl"] #scanningText,
[dir="rtl"] .scanning-text,
[dir="rtl"] .placeholder-text,
[dir="rtl"] #waitingParagraph,
[dir="rtl"] #kioskHint {
    direction: rtl;
    text-align: center;
}

[dir="rtl"] .button-wrapper {
    direction: rtl;
}

[dir="rtl"] #langSelectorWrapper {
    right: auto;
    left: 16px;
}

.text-center {
    text-align: center;
}

.verify-title {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: bold;
}

.verify-subtitle {
    font-size: 16px;
}

.verify-note {
    font-size: 14px;
    margin-top: 20px;
}

.right-section-children {
    width: 100%;
    max-width: 371px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.face-guide {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    z-index: 10;
    pointer-events: none;
}

/* Create L-shaped corners */
.face-guide::before,
.face-guide::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #35DC94;
}

/* Top-left corner */
.face-guide::before {
    top: 0;
    left: 0;
    border-right: 0;
    border-bottom: 0;
}

/* Top-right corner */
.face-guide::after {
    top: 0;
    right: 0;
    border-left: 0;
    border-bottom: 0;
}

/* Bottom corners using pseudo-elements of child div */
.face-guide-corners {
    position: absolute;
    width: 100%;
    height: 100%;
}

.face-guide-corners::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #35DC94;
    border-right: 0;
    border-top: 0;
}

.face-guide-corners::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #35DC94;
    border-left: 0;
    border-top: 0;
}

@keyframes scan {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.4;
    }
}

.face-guide::before,
.face-guide::after,
.face-guide-corners::before,
.face-guide-corners::after {
    animation: scan 2s infinite;
}

#waitingParagraph {
    display: none;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    color: #497579;
    margin: 50px 0;
}

.show {
    display: block !important;
    transition: 0.5s ease-in;
}

#qrcode {
    /* position: absolute;
    right: 3%; */
    display: none;
    flex-direction: column;
    /* width: 100px; */
    font-size: 13px;
    position: relative;
    /* display: inline-block; */
}

/* image in the middle for logo */
#qrcode img.qr-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    /* logo size */
    height: 50px;
    transform: translate(-50%, -50%);
    border-radius: 30px;
    /* optional rounded */
    background: white;
    /* white box behind */
    padding: 6px;
    /* add spacing so white is visible */
    box-sizing: content-box;
}

@media (max-width: 359px) {
    .heading {
        font-size: 22px;
        line-height: 28px;
        margin-bottom: 12px;
    }

    .description,
    #waitingParagraph,
    #kioskHint {
        font-size: 12px;
        line-height: 18px;
    }

    .description {
        margin-bottom: 12px;
    }

    .approved-message,
    .failed-message {
        font-size: 14px;
    }

    /* Reduce vertical gap between message text and action button on small screens */
    .approved-message,
    .failed-message {
        margin-bottom: 8px !important;
    }

    .approved-message + div,
    .failed-message + div {
        margin-top: 8px !important;
    }

    #scanningText,
    .scanning-text {
        font-size: 14px;
    }

    .right-section {
        padding: 16px 24px;
    }

    #cameraWrapper {
        max-width: 100% !important;
    }

    .right-section-children {
        max-width: 100%;
    }

    .camera-wrapper {
        width: 200px;
        height: 200px;
    }

    .placeholder-icon {
        width: 90px;
        height: 90px;
    }

    .camera-wrapper img {
        width: 60px !important;
        height: 60px !important;
    }

    .next-button,
    .continue-button,
    .phone-button {
        font-size: 14px;
        height: 40px;
        min-width: 0 !important;
        max-width: 100%;
        margin-top: 12px;
    }

    .button-wrapper {
        width: 100%;
    }

    /* Constrain Try Again button wrapper in denied state to match content area */
    .failed-message + div {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .need-help {
        font-size: 12px;
        margin-top: 12px;
    }

    .verify-title {
        font-size: 22px;
    }

    .verify-subtitle {
        font-size: 14px;
    }

    .verify-note {
        font-size: 12px;
        margin-top: 12px;
    }

    .paragraph-style {
        font-size: 14px;
        margin-top: 24px;
    }
}
