/* TraPay Modern Auth Styles */
/* Following TraPay CSS Management Rules: NO inline styles, all CSS in dedicated files */

#auth-container {
    background: linear-gradient(135deg, #0d3e7e 0%, #1e40af 50%, #3b82f6 100%);
    font-family: 'IranYekan', 'Yekan', 'YekanBakh', 'Tahoma', sans-serif;
}

/* Auth Card Styling */
#auth-container .bg-white {
    box-shadow: 0 20px 60px rgba(13, 62, 126, 0.3);
}

/* Form Input Styling */
#auth-container input[type="text"],
#auth-container input[type="email"],
#auth-container input[type="password"] {
    font-family: 'IranYekan', 'Yekan', 'YekanBakh', 'Tahoma', sans-serif;
    transition: all 0.3s ease;
}

#auth-container input[type="text"]:focus,
#auth-container input[type="email"]:focus,
#auth-container input[type="password"]:focus {
    border-color: #0d3e7e;
    box-shadow: 0 0 0 3px rgba(13, 62, 126, 0.1);
}

/* Button Loading State */
#auth-container button .captcha-loading {
    display: none;
}

#auth-container button.loading .captcha-loading {
    display: flex;
}

#auth-container button.loading .submit-text {
    display: none;
}

/* Spinner Animation */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 2px;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Captcha Loading Indicator */
.captcha-loading {
    animation: fadeIn 0.3s ease-in-out;
}

.captcha-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #93c5fd;
    border-top-color: #1e40af;
    border-radius: 50%;
    animation: captcha-spin 0.8s linear infinite;
}

@keyframes captcha-spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* OTP Code Input Styling */
#auth-container #token {
    letter-spacing: 0.5em;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Timer Styling */
#auth-container #timer {
    font-family: monospace;
    font-size: 1rem;
    font-weight: bold;
    color: #0d3e7e;
}

/* Resend Button */
#auth-container #resend {
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
}

#auth-container #resend.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Message Container */
#auth-container .message-container {
    min-height: 0;
}

#auth-container .message-container:empty {
    display: none;
}

/* Alert Styles */
#auth-container .alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

#auth-container .alert-success {
    background-color: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

#auth-container .alert-danger {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

#auth-container .alert-info {
    background-color: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

/* Gradient Overlay for Background Image */
#auth-container .bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

/* Password Error Message */
#auth-container .password-error {
    display: none;
}

#auth-container .password-error.show {
    display: block;
}

/* Google Login Button SVG Icon */
#auth-container a[href="/google-login"] svg {
    flex-shrink: 0;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    #auth-container .lg\:w-1\/2 {
        width: 100%;
    }
}

@media (max-width: 640px) {
    #auth-container {
        padding: 1rem;
    }

    #auth-container .p-8 {
        padding: 1.5rem;
    }

    #auth-container h2 {
        font-size: 1.5rem;
    }

    #auth-container #token {
        font-size: 1.25rem;
        letter-spacing: 0.3em;
    }
}

/* Feather Icons Alignment */
#auth-container [data-feather] {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;
}

/* Backdrop Blur Effect */
#auth-container .backdrop-blur-lg {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Focus Ring for Accessibility */
#auth-container button:focus-visible,
#auth-container input:focus-visible,
#auth-container a:focus-visible {
    outline: 2px solid #0d3e7e;
    outline-offset: 2px;
}

/* Smooth Transitions */
#auth-container * {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Waiting Component Integration */
#auth-container .waiting {
    display: inline-block;
}

/* Persian Number Display */
#auth-container .font-yekan {
    font-feature-settings: 'ss01' on;
}

/* Loading Mode for Resend Button */
#auth-container #resend .loading-mode {
    display: none;
}

#auth-container #resend.loading .loading-mode {
    display: inline-block;
}
