/* =========================================================
   Shared authentication styles for Oracle APEX
   ========================================================= */

:root {
    --auth-primary: #2563eb;
    --auth-primary-soft: #eaf2ff;
    --auth-primary-hover: #dbeafe;
    --auth-heading: #172554;
    --auth-muted: #6b7280;
    --auth-border: #d1d5db;
    --auth-surface: #fff;
    --auth-banner: linear-gradient(145deg, #20c4b5, #12a99d); 
    --auth-radius: 12px;
}

/* Login component styles. Page-level APEX layout is kept inline on the login page. */

.login-wrapper .col,
.login-wrapper [class*="col-"],
.login-wrapper .t-Grid-col {
    padding-inline: 0 !important;
}

.login-wrapper .t-Grid-row {
    gap: 0 !important;
}

.login-panel {
    width: 100%;
    height: 620px;
    margin: 0 !important;
}

.login-panel--visual,
.login-panel--form {
    width: 100%;
    height: 620px;
    margin: 0 !important;
}

.login-panel--visual {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
    text-align: center;
    background: var(--auth-banner);
    border-radius: 20px 0 0 20px;
}

.login-panel--visual > img {
    max-width: 100%;
    height: auto;
}

.login-panel--form {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 55px;
    background: var(--auth-surface);
    border-radius: 0 20px 20px 0;
    box-shadow: 0 12px 35px rgb(0 0 0 / 8%);
}

.login-panel--form h1,
.login-panel--form h2,
.login-panel--form p {
    width: 100%;
    text-align: center !important;
}

.login-panel--form h1 {
    margin-bottom: 12px;
}

.login-panel--form p {
    margin-bottom: 35px;
}

.login-banner {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.login-banner img {
    width: 350px;
    max-width: 90%;
}

.login-logo img,
.login-panel--form img.logo {
    display: block;
    width: 220px;
    max-width: 220px;
    height: auto;
    margin: 0 auto 15px;
}

.system-name {
    margin-bottom: 30px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

/* Dialogs */
.otp-dialog .ui-dialog-titlebar {
    display: none !important;
}

.otp-dialog.ui-dialog,
.otp-dialog .ui-dialog {
    padding-top: 0 !important;
}

.otp-dialog .t-ButtonRegion {
    margin-top: 20px;
}

/* Shared OTP components */
.otp-box {
    width: 100%;
    text-align: center;
}

.otp-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto !important;
    background: var(--auth-primary-soft);
    border-radius: 50%;
}

.otp-box h2 {
    margin-top: 18px;
    font-size: 20px;
    color: var(--auth-heading);
}

.otp-box--large h2 {
    margin-top: 20px;
    font-size: 26px;
}

.otp-box p,
.timer {
    color: var(--auth-muted);
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    direction: ltr;
}

.otp-inputs input {
    width: 45px;
    height: 50px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    font-size: 22px;
    text-align: center;
}

.otp-inputs input:focus {
    border: 2px solid var(--auth-primary);
    outline: none;
}

.timer {
    margin-bottom: 25px;
}

.timer span {
    color: var(--auth-primary);
}

/* Buttons and links */
.auth-btn,
.otp-btn,
.login-btn {
    width: 100% !important;
    border: 0 !important;
    border-radius: var(--auth-radius) !important;
}

.otp-btn {
    height: 50px;
    background: var(--auth-primary);
    color: #fff;
    font-size: 18px;
}

.otp-btn--compact {
    height: 40px;
    font-size: 14px;
}

.login-btn {
    height: 46px !important;
    margin-top: 20px;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 8px 20px rgb(37 99 235 / 18%);
}

.link-btn,
.change-number {
    display: block;
    margin: 25px auto 0;
    color: var(--auth-primary);
    cursor: pointer;
}

.link-btn {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.change-number--compact {
    margin-top: 18px;
}

.t-Button .t-Icon {
    margin-right: 6px;
    margin-left: 0;
}

/* Captcha */
.captcha-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: ltr;
}

.captcha-image {
    width: 240px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
}

.captcha-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.captcha-image--compact {
    width: 160px;
    height: 50px;
}

.captcha-image--compact img {
    object-fit: contain;
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    background: var(--auth-primary-soft);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.captcha-refresh:hover {
    background: var(--auth-primary-hover);
}

/* Responsive */
@media (max-width: 900px) {
    .login-wrapper .row {
        display: block;
    }

    .login-panel,
    .login-panel--visual,
    .login-panel--form {
        height: auto;
    }

    .login-panel--visual {
        border-radius: 20px 20px 0 0;
    }

    .login-panel--form {
        border-radius: 0 0 20px 20px;
    }
}


.login-slider {
    position: relative;
    width: 350px;
    max-width: 90%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 14px;
}

.login-slide {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition:
        opacity 700ms ease,
        transform 900ms ease,
        visibility 700ms;
}

.login-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.login-slider-dots {
    position: absolute;
    right: 0;
    bottom: 12px;
    left: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 7px;
    direction: ltr;
}

.login-slider-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgb(255 255 255 / 55%);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition:
        width 250ms ease,
        background-color 250ms ease;
}

.login-slider-dot.is-active {
    width: 22px;
    background: #fff;
    border-radius: 10px;
}

@media (prefers-reduced-motion: reduce) {
    .login-slide {
        transition: none;
        transform: none;
    }
}