/**
 * Authentication System - Stylesheet
 * 
 * استایل‌های فرم ورود و ثبت نام
 * 
 * @package Authentication
 */

/* ==================== Container ==================== */

.sms-auth-container {
    width: 100%;
    min-height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.sms-auth-wrapper {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 24px;
    border-radius: var(--medium-radius, 8px);
    box-shadow: var(--light-shadow, 0 2px 8px rgba(0,0,0,0.1));
    margin: 24px auto;
    background: #fff;
}

/* ==================== Header ==================== */

.sms-auth-header {
    width: 100%;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sms-auth-header figure {
    width: 150px;
    margin: 0;
}

.sms-auth-header figure img {
    width: 100%;
    max-height: 150px;
    object-fit: contain;
}

/* ==================== Title ==================== */

.sms-auth-title {
    width: 100%;
    font-size: var(--bcontent, 16px);
    color: var(--content, #333);
    font-weight: var(--semibold-weight, 600);
    margin-bottom: 16px;
    text-align: center;
}

/* ==================== Form ==================== */

.sms-auth-container form,
#forgot-new-password-step {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    align-content: flex-start;
}

.sms-auth-container .form-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.sms-auth-container .form-group label {
    font-size: var(--bsmall, 14px);
    margin-bottom: 8px;
    color: var(--light-content, #666);
    font-weight: 500;
}

.sms-auth-container .form-group input {
    width: 100%;
    height: 50px;
    border-radius: var(--medium-radius, 8px);
    border: 1px solid var(--border-color, #e0e0e0);
    padding: 0 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.sms-auth-container .form-group input:focus {
    outline: none;
    border-color: var(--primary, #007bff);
}

.sms-auth-container .form-group small {
    font-size: 12px;
    color: var(--light-content, #666);
    margin-top: 4px;
}

.sms-auth-container .form-group .form-text {
    font-size: 12px;
    color: var(--light-content, #666);
    margin-top: 4px;
}

/* ==================== Buttons ==================== */

.form_button {
    width: 100%;
    border-radius: var(--medium-radius, 8px);
    background-color: var(--primary, #007bff);
    color: var(--white, #fff);
    font-size: var(--bcontent, 16px);
    font-weight: var(--semibold-weight, 600);
    padding: 12px 16px;
    text-align: center;
    margin: 8px 0;
    border: 1px solid var(--primary, #007bff);
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.form_button:hover:not(:disabled) {
    opacity: 0.9;
}

.form_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#forgot-action-btn {
    width: 48%;
}

#forgot-password-btn {
    width: 48%;
    background-color: var(--warning, #ff9800);
    border: 1px solid var(--warning, #ff9800);
}

#back-to-verify-btn,
#back-to-main-btn,
#back-to-contact-btn {
    width: 48%;
    background-color: var(--content, #666);
    border: 1px solid var(--content, #666);
}

#show-password-btn,
#resend-code-btn,
#forgot-resend-code-btn {
    background-color: var(--info, #17a2b8);
    border: 1px solid var(--info, #17a2b8);
}

/* ==================== Steps ==================== */

.auth-step {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.w-100 {
    width: 100%;
}

.my-2 {
    margin: 8px 0;
}

/* ==================== Contact Display ==================== */

.contact-display,
#contact-display,
#forgot-contact-display {
    width: 100%;
    font-size: 12px;
    color: var(--light-content, #666);
    margin-bottom: 12px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

/* ==================== User Options ==================== */

#existing-user-options {
    width: 48%;
    display: flex;
    align-items: center;
}

.resend-section {
    width: 48%;
}

/* ==================== Privacy Policy ==================== */

.privacy-policy-notice {
    width: 100%;
    margin: 16px 0 0;
    font-size: var(--bcaption, 12px);
    color: var(--light-content, #666);
    text-align: center;
}

.privacy-policy-notice a {
    color: var(--primary, #007bff);
    text-decoration: none;
}

.privacy-policy-notice a:hover {
    text-decoration: underline;
}

/* ==================== Messages ==================== */

#auth-messages,
#forgot-messages {
    width: 100%;
    margin: 12px 0;
}

.error-message,
.success-message {
    width: 100%;
    font-size: var(--bcaption, 14px);
    font-weight: var(--semibold-weight, 600);
    padding: 12px;
    border-radius: var(--light-radius, 4px);
    margin: 8px 0;
    text-align: center;
}

.error-message {
    color: var(--error, #dc3545);
    background: #fee;
    border: 1px solid var(--error, #dc3545);
}

.success-message {
    color: var(--success, #28a745);
    background: #efe;
    border: 1px solid var(--success, #28a745);
}

/* ==================== Success Screen ==================== */

.login_success_wrapper {
    width: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login_success_wrapper i {
    font-size: 3rem;
    color: var(--success, #28a745);
    margin-bottom: 16px;
}

.login_success_title {
    text-align: center;
    font-size: var(--btitle, 20px);
    color: var(--success, #28a745);
    font-weight: var(--semibold-weight, 600);
    margin-bottom: 12px;
}

.login_success_desc {
    text-align: center;
    font-size: var(--bscontent, 14px);
    color: var(--content, #333);
    margin-bottom: 0;
}

/* ==================== Responsive ==================== */

/* Tablet */
@media screen and (max-width: 768px) {
    .sms-auth-wrapper {
        max-width: 90%;
        padding: 20px;
    }
    
    .form_button {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Mobile */
@media screen and (max-width: 599px) {
    .sms-auth-wrapper {
        max-width: 95%;
        padding: 16px;
    }
    
    .sms-auth-header figure {
        width: 120px;
    }
    
    .form_button {
        font-size: 14px;
        padding: 10px;
    }
    
    #forgot-action-btn,
    #back-to-verify-btn,
    #back-to-main-btn,
    #back-to-contact-btn,
    #existing-user-options,
    .resend-section {
        width: 100%;
    }
}

/* ==================== Utilities ==================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* ==================== Animations ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-step {
    animation: fadeIn 0.3s ease;
}