/**
 * AR Auth — Login Form Styles
 *
 * Flat Vector design language. Responsive. No inline CSS.
 *
 * @package AR_Auth
 * @since   1.0.0
 */

/* ─── Reset & Base ─── */
.ar-auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    font-family: var(--ar-font, 'Tajawal', sans-serif);
    direction: rtl;
    box-sizing: border-box;
}

.ar-auth-wrapper *,
.ar-auth-wrapper *::before,
.ar-auth-wrapper *::after {
    box-sizing: border-box;
}

/* ─── Card ─── */
.ar-auth-card {
    background: var(--ar-card, #ffffff);
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
}

/* ─── Header ─── */
.ar-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.ar-auth-logo {
    max-height: 56px;
    max-width: 200px;
    margin-bottom: 16px;
    object-fit: contain;
}

.ar-auth-site-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--ar-text, #1e293b);
    margin-bottom: 8px;
}

.ar-auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ar-text, #1e293b);
    margin: 0 0 6px;
}

.ar-auth-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ─── Tabs ─── */
.ar-auth-tabs {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.ar-auth-tab {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.ar-auth-tab.active {
    background: #ffffff;
    color: var(--ar-primary, #2563eb);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ─── Steps ─── */
.ar-auth-step {
    display: none;
}

.ar-auth-step.active {
    display: block;
}

/* ─── Fields ─── */
.ar-auth-field {
    margin-bottom: 16px;
}

.ar-auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ar-text, #1e293b);
    margin-bottom: 6px;
}

.ar-auth-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ar-text, #1e293b);
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.ar-auth-input:focus {
    border-color: var(--ar-primary, #2563eb);
    box-shadow: 0 0 0 3px var(--ar-primary-light, rgba(37, 99, 235, 0.1));
    background: #ffffff;
}

.ar-auth-input::placeholder {
    color: #94a3b8;
}

.ar-required {
    color: #ef4444;
}

.ar-optional {
    color: #94a3b8;
    font-weight: 400;
    font-size: 12px;
}

/* ─── OTP Inputs ─── */
.ar-auth-otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    direction: ltr;
    margin-bottom: 20px;
}

.ar-auth-otp-inputs input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--ar-text, #1e293b);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ar-auth-otp-inputs input:focus {
    border-color: var(--ar-primary, #2563eb);
    box-shadow: 0 0 0 3px var(--ar-primary-light, rgba(37, 99, 235, 0.1));
    background: #ffffff;
}

/* ─── Buttons ─── */
.ar-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ar-auth-btn-primary {
    background: var(--ar-primary, #2563eb);
    color: #ffffff;
}

.ar-auth-btn-primary:hover {
    background: var(--ar-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ar-auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ar-auth-btn-google {
    background: #ffffff;
    color: #3c4043;
    border: 1.5px solid #dadce0;
}

.ar-auth-btn-google:hover {
    background: #f8fafc;
    border-color: #c0c4c8;
}

.ar-auth-google-icon {
    flex-shrink: 0;
}

/* ─── Spinner ─── */
.ar-spin {
    width: 20px;
    height: 20px;
    animation: ar-spin 1s linear infinite;
}

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

/* ─── Links ─── */
.ar-auth-link {
    display: inline-block;
    background: none;
    border: none;
    color: var(--ar-primary, #2563eb);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ar-auth-link:hover {
    opacity: 0.8;
}

.ar-auth-link:disabled {
    color: #94a3b8;
    cursor: not-allowed;
}

.ar-auth-back {
    display: block;
    text-align: center;
    margin-top: 16px;
}

.ar-auth-resend {
    text-align: center;
    margin-top: 12px;
}

/* ─── Info Text ─── */
.ar-auth-info {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    margin: 0 0 16px;
    line-height: 1.6;
}

/* ─── Alert ─── */
.ar-auth-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: center;
}

.ar-auth-alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ar-auth-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ar-auth-alert.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ─── Divider ─── */
.ar-auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 12px;
    color: #94a3b8;
    font-size: 13px;
}

.ar-auth-divider::before,
.ar-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ─── Social ─── */
.ar-auth-social {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ─── Footer ─── */
.ar-auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.ar-auth-footer p {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .ar-auth-wrapper {
        padding: 16px;
    }

    .ar-auth-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .ar-auth-otp-inputs input {
        width: 42px;
        height: 50px;
        font-size: 20px;
    }
}
