/**
 * Auth Modal Styles
 * استایل‌های مودال احراز هویت
 */

/* Auth Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.auth-modal-container {
    width: 100%;
    max-width: 1100px;
    max-height: 90vh;
    background: #fff;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.auth-modal-overlay.active .auth-modal-container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close Button */
.auth-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F1F5F9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.auth-modal-close:hover {
    background: #E12528;
}

.auth-modal-close:hover img {
    filter: brightness(0) invert(1);
}

/* Modal Content */
.auth-modal-content {
    padding: 40px;
    height: 100%;
    min-height: 500px;
    position: relative;
    z-index: 1;
}

.auth-modal-content .col-lg-6:last-child {
    position: relative;
    z-index: 5;
}

/* Visual Section in Modal */
.auth-modal-content .auth-visual {
    width: 100%;
    height: 450px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: end;
    flex-direction: column;
    border-radius: 32px;
    background: url('/ElecteroRed-html/assets/media/image/svg/auth-banner-patt.svg') no-repeat center;
    background-size: cover;
    background-color: #E12528;
    padding: 30px;
    padding-bottom: 0;
    pointer-events: none;
}

.auth-modal-content .auth-visual .auth-visual-inner {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border-radius: 32px;
}

.auth-modal-content .auth-visual .auth-visual-inner::before {
    content: "";
    position: absolute;
    bottom: -50%;
    left: 45%;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
    width: 500px;
    height: 500px;
    border-radius: 999px;
    background: #94181AE5;
    filter: blur(100px);
}

/* Auth Greeting */
.auth-modal-content .auth-greeting {
    width: 100%;
    display: flex;
    align-items: start;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.auth-modal-content .greeting-title,
.auth-modal-content .greeting-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.auth-modal-overlay.active .auth-modal-content .greeting-title {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.auth-modal-overlay.active .auth-modal-content .greeting-subtitle {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.auth-modal-content .greeting-title {
    font-size: 20px;
    font-weight: 400;
    color: #FFFFFF;
}

.auth-modal-content .greeting-subtitle {
    font-size: 26px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 30px;
}

.auth-modal-content .auth-bot {
    max-width: 350px;
    margin-left: -150px;
}

/* Form Panel */
.auth-modal-content .auth-panel {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.auth-modal-content .auth-header {
    text-align: center;
}

/* Form Controls - مطابق با صفحه auth */
.auth-modal-content .form-group {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    width: 100%;
    position: relative;
}

.auth-modal-content .form-label {
    font-size: 16px;
    font-weight: 600;
    color: #333F48;
    margin-bottom: 15px;
}

.auth-modal-content .form-control {
    width: 100%;
    height: 56px;
    font-size: 14px;
    padding: 20px;
    border-radius: 12px;
    outline: none;
    transition: .4s ease;
    color: #223558;
    background: #F1F5F9;
    font-family: "YekanBakh";
    font-weight: 600;
    position: relative;
    user-select: auto;
    border: 1px solid #DFE2F7;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    text-align: center;
}

.auth-modal-content .form-control:focus {
    border: 1px solid #223558;
}

.auth-modal-content .form-control.error {
    border-color: #e53935 !important;
}

.auth-modal-content .form-control.success {
    border-color: #43a047 !important;
}

.auth-modal-content .form-control::placeholder {
    font-weight: 400;
    font-size: 14px;
    color: #999DBA;
    text-align: right;
    opacity: 1;
    transition: .3s ease;
}

.auth-modal-content .form-control:focus::placeholder {
    opacity: 0;
}

/* Primary Button - مطابق با صفحه auth */
.auth-modal-content .btn-primary {
    margin-inline: auto;
    width: 100%;
    height: 57px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #223558;
    border-radius: 15px;
    color: #F1F5F9;
    font-weight: 600;
    font-size: 16px;
    font-family: "YekanBakh";
    outline: 0;
    border: 1px solid #223558;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-modal-content .btn-primary:hover {
    background: #1a2a47;
}

.auth-modal-content .btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Hint Text */
.auth-modal-content .hint {
    font-size: 14px;
    font-weight: 600;
    color: #707070;
    text-align: center;
}

/* Field Error */
.auth-modal-content .field-error {
    font-size: 12px;
    font-weight: 600;
    color: #e53935;
    margin-top: 5px;
    min-height: 18px;
}

/* Steps */
.auth-step {
    display: none;
    flex-direction: column;
    gap: 0;
}

.auth-step.active {
    display: flex;
    animation: stepFadeIn 0.4s ease forwards;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step Header */
.step-header {
    text-align: center;
    margin-bottom: 10px;
    position: relative;
}

.step-title {
    font-size: 22px;
    font-weight: 700;
    color: #223558;
}

.step-subtitle {
    font-size: 14px;
    color: #707070;
}

/* Back Button */
.back-btn {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F1F5F9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #E1E5E9;
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    direction: ltr;
    margin: auto;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #DFE2F7;
    border-radius: 12px;
    background: #F1F5F9;
    color: #223558;
    transition: all 0.3s ease;
    font-family: "YekanBakh";
}

.otp-input:focus {
    border-color: #223558;
    outline: none;
    background: #fff;
}

.otp-input.filled {
    border-color: #43a047;
    background: #e8f5e9;
}

.otp-input.error {
    border-color: #e53935;
    background: #ffebee;
}

/* Name Fields */
.name-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: fadeInDown 0.4s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resend Section */
.resend-section {
    text-align: center;
    margin-top: 10px;
}

.resend-text {
    font-size: 14px;
    color: #707070;
}

#timer-seconds {
    color: #E12528;
    font-weight: 700;
}

.resend-btn {
    background: none;
    border: none;
    color: #E12528;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: "YekanBakh";
    text-decoration: underline;
}

.resend-btn:hover {
    color: #b71c1c;
}

/* Success Step */
.success-step {
    align-items: center;
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    margin-bottom: 20px;
    animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes successPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-title {
    font-size: 28px;
    font-weight: 700;
    color: #223558;
    margin-bottom: 10px;
}

.success-message {
    font-size: 16px;
    color: #707070;
}

/* Button Loading */
.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-loading img {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===================================
   Mobile Responsive
   =================================== */

@media screen and (max-width: 992px) {
    .auth-modal-container {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 24px;
    }
    
    .auth-modal-content {
        padding: 20px;
    }
    
    .auth-modal-content .auth-panel {
        max-width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .auth-modal-content {
        padding: 60px 20px 20px;
    }
    
    .otp-input {
        width: 45px;
        height: 55px;
        font-size: 20px;
    }
}

@media screen and (max-width: 400px) {
    .otp-inputs {
        gap: 6px;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 18px;
    }
}

