/* auth.css - نسخه نهایی و کامل */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap');

:root {
    --primary-color: #007bff;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #dee2e6;
    --background-color: #f4f7f6;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
}

.auth-page {
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    min-height: calc(100vh - 70px);
}

.auth-container {
    width: 100%;
    max-width: 550px;
}

.auth-form {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.auth-form h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-color);
}

.auth-form p {
    color: #6c757d;
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    gap: 20px;
    width: 100%;
}

.form-row .form-group {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 25px;
    text-align: right;
}

.form-group-checkbox input {
    margin-left: 10px;
}

.form-group-checkbox label {
    font-size: 0.9rem;
    color: #6c757d;
}

.form-group-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

.form-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #6c757d;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* --- استایل‌های اعتبارسنجی --- */

.form-group {
    position: relative;
}

.form-group input.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.tooltip {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #dc3545;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
    width: max-content;
}

.tooltip::after {
    content: attr(data-tooltip);
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 15px;
    right: auto;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #dc3545 transparent;
}

.form-group input.invalid + .tooltip,
.form-group input.invalid + .password-wrapper + .tooltip {
    opacity: 1;
    visibility: visible;
}

/* --- استایل‌های فیلد رمز عبور --- */

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding-left: 40px;
}

.toggle-password {
    position: absolute;
    left: 10px;
    cursor: pointer;
    color: #888;
    user-select: none;
}

.strength-meter {
    height: 10px;
    width: 100%;
    background-color: #eee;
    border-radius: 5px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    background-color: #dc3545;
    transition: width 0.3s, background-color 0.3s;
}

.strength-text {
    text-align: right;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
    height: 1em;
}

/* --- استایل‌های دراپ‌다운 کد کشور --- */

.iti {
    width: 100%;
    direction: ltr;
}

.iti__country-list {
    text-align: right;
}