.otp-auth {
    direction: rtl;
    box-sizing: border-box;
}

#otp-auth-root {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 20px;
}

.otp-auth--page,
#otp-auth-root.otp-auth--page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
}

.otp-auth--overlay,
#otp-auth-root.otp-auth--overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 999999 !important;
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.otp-auth__card {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: 16px;
    box-shadow: rgba(0, 0, 0, 0.12) 0 20px 60px;
    padding: 40px;
    box-sizing: border-box;
}

.otp-auth__header {
    text-align: center;
    margin-bottom: 30px;
}

.otp-auth__header h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
}

.otp-auth__description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.otp-auth__form .form-group {
    margin-bottom: 20px;
}

.otp-auth__form label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

.otp-auth__form input,
.otp-auth__form textarea,
.otp-auth__form select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
}

.otp-auth__form input:focus,
.otp-auth__form textarea:focus,
.otp-auth__form select:focus {
    outline: none;
    border-color: var(--otp-btn-color, #073C98);
}

.otp-auth__submit {
    width: 100%;
    padding: 15px 20px;
    background: var(--otp-btn-color, #073C98) !important;
    background-color: var(--otp-btn-color, #073C98) !important;
    color: var(--otp-btn-text-color, #ffffff) !important;
    border: none !important;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.otp-auth__submit:hover:not(:disabled) {
    background: var(--otp-btn-hover-color, #062d75) !important;
    background-color: var(--otp-btn-hover-color, #062d75) !important;
}

.otp-auth__submit:disabled {
    background: #6c757d !important;
    background-color: #6c757d !important;
    cursor: not-allowed;
}

.otp-auth__message {
    margin: 16px 0 0;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
}

.otp-auth__timer {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-top: 12px;
}

.otp-auth__back {
    text-align: center;
    margin-top: 20px;
}

.otp-auth__back a {
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(108, 117, 125, 0.1);
}

.otp-auth__back a:hover {
    color: #0073aa;
    background: rgba(0, 115, 170, 0.1);
}

.required {
    color: #dc3545;
}

.user-fields-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.user-fields-section[hidden],
.otp-auth__otp-section[hidden] {
    display: none !important;
}

body.otp-auth-active {
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

html.otp-auth-active {
    margin: 0;
    padding: 0;
    height: 100%;
}

body.otp-auth-lock-page {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
}

body.otp-auth-active #page,
body.otp-auth-active .site-content,
body.otp-auth-active .entry-content,
body.otp-auth-active .woocommerce {
    visibility: hidden;
}

@media (max-width: 768px) {
    .otp-auth__card {
        padding: 24px;
    }

    .otp-auth__header h2 {
        font-size: 24px;
    }
}
