/**
 * Eli Access Guard — Registration Form (RTL)
 */

.eag-registration-form {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    direction: rtl;
    text-align: right;
}

.eag-step-indicator {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    justify-content: space-between;
    counter-reset: step;
    position: relative;
    flex-direction: row-reverse;
}
.eag-step-indicator::before {
    content: '';
    position: absolute;
    top: 16px;
    right: 24px;
    left: 24px;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}
.eag-step-indicator li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0 8px;
    flex: 1;
    text-align: center;
}
.eag-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f1;
    color: #50575e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    border: 2px solid #fff;
    transition: all 0.2s ease;
}
.eag-step-label {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
}
.eag-step-indicator li.eag-step-active .eag-step-num {
    background: #2271b1;
    color: #fff;
}
.eag-step-indicator li.eag-step-active .eag-step-label {
    color: #2271b1;
    font-weight: 600;
}
.eag-step-indicator li.eag-step-done .eag-step-num {
    background: #00a32a;
    color: #fff;
}

.eag-form-step { display: none; animation: eag-fade-in 0.25s ease; }
.eag-form-step.eag-step-active {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    column-gap: 16px;
}
.eag-form-step.eag-step-active > * { flex: 0 0 100%; max-width: 100%; }
@keyframes eag-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Column widths — fields can sit side by side (RTL). */
.eag-registration-form .eag-form-row { flex: 1 1 100%; max-width: 100%; margin-bottom: 20px; }
.eag-registration-form .eag-form-row.eag-w-half,
.eag-registration-form .eag-form-html-section.eag-w-half { flex: 1 1 calc(50% - 8px); max-width: calc(50% - 8px); }
.eag-registration-form .eag-form-row.eag-w-third,
.eag-registration-form .eag-form-html-section.eag-w-third { flex: 1 1 calc(33.333% - 11px); max-width: calc(33.333% - 11px); }
.eag-registration-form .eag-form-row.eag-w-two-thirds,
.eag-registration-form .eag-form-html-section.eag-w-two-thirds { flex: 1 1 calc(66.666% - 6px); max-width: calc(66.666% - 6px); }
.eag-registration-form .eag-form-row.eag-w-quarter,
.eag-registration-form .eag-form-html-section.eag-w-quarter { flex: 1 1 calc(25% - 12px); max-width: calc(25% - 12px); }
.eag-registration-form .eag-form-row.eag-w-three-quarters,
.eag-registration-form .eag-form-html-section.eag-w-three-quarters { flex: 1 1 calc(75% - 4px); max-width: calc(75% - 4px); }
@media (max-width: 600px) {
    .eag-registration-form .eag-form-row[class*="eag-w-"],
    .eag-registration-form .eag-form-html-section[class*="eag-w-"] { flex: 1 1 100%; max-width: 100%; }
}
.eag-registration-form .eag-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #1d2327;
    text-align: right;
}
.eag-registration-form .eag-required { color: #d63638; font-weight: normal; }

.eag-registration-form input[type="text"],
.eag-registration-form input[type="email"],
.eag-registration-form input[type="tel"],
.eag-registration-form input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: right;
}
/* Email/tel naturally LTR */
.eag-registration-form input[type="email"],
.eag-registration-form input[type="tel"] {
    direction: ltr;
    text-align: right;
}
.eag-registration-form input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
    outline: none;
}
.eag-form-help { font-size: 12px; color: #646970; margin-top: 6px; text-align: right; }

.eag-otp-instruction {
    background: #f0f6fc;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 0 0 20px;
    color: #1d2327;
    line-height: 1.5;
}
.eag-phone-mask { font-weight: 600; color: #2271b1; direction: ltr; display: inline-block; }

input[name="code"] {
    text-align: center;
    letter-spacing: 0.4em;
    font-size: 22px !important;
    font-weight: 600;
    font-family: 'SF Mono', 'Menlo', monospace;
    direction: ltr;
}

.eag-password-rules {
    list-style: disc;
    margin: 8px 20px 0 0;
    padding: 0;
    font-size: 12px;
    color: #646970;
}
.eag-password-rules li { margin: 2px 0; }

.eag-form-actions {
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.eag-registration-form .eag-button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    flex: 1;
    min-width: 140px;
}
.eag-registration-form .eag-button:hover { background: #135e96; }
.eag-registration-form .eag-button:disabled { background: #c3c4c7; cursor: not-allowed; }
.eag-button-link {
    background: transparent;
    border: none;
    color: #2271b1;
    padding: 12px 12px;
    font-size: 13px;
    cursor: pointer;
}
.eag-button-link:hover { text-decoration: underline; }
.eag-button-link:disabled { color: #a7aaad; cursor: not-allowed; }

.eag-form-terms {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f1;
    text-align: center;
    color: #646970;
}
.eag-form-terms a { color: #2271b1; text-decoration: none; }
.eag-form-terms a:hover { text-decoration: underline; }

.eag-registration-form .eag-honeypot {
    position: absolute !important;
    right: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.eag-form-messages:not(:empty) { margin-bottom: 16px; }
.eag-instruction { color: #50575e; margin: 0 0 20px; text-align: right; }

/* Magic link form */
.eag-magic-link-form .eag-form-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
    text-align: right;
}
.eag-magic-link-form .eag-instruction {
    margin: 0 0 24px;
    color: #50575e;
    font-size: 14px;
    line-height: 1.5;
    text-align: right;
}

/* Human-verification (CAPTCHA) row */
.eag-registration-form .eag-captcha-row { margin: 4px 0 18px; }
.eag-registration-form .eag-captcha-widget { min-height: 65px; }
