/* Registration form. Themeable: a page overrides the --reg-* variables on .reg-form
   (load form.css BEFORE the page's own <style> so the page wins). */
html { scroll-behavior: smooth; }

.reg-form {
    --reg-accent: var(--cyan, var(--gold, #F0C040));
    --reg-bg: rgba(5, 10, 20, 0.85);
    --reg-border: rgba(255, 255, 255, 0.12);
    --reg-radius: 16px;
    --reg-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    --reg-text: #fff;
    --reg-muted: var(--text-muted, #8A9BA8);
    --reg-input-bg: #0A1018;
    --reg-input-border: rgba(255, 255, 255, 0.14);
    --reg-input-text: #fff;
    --reg-placeholder: #55646f;
    --reg-input-radius: 10px;
    --reg-hover: rgba(255, 255, 255, 0.08);
    --reg-success: var(--green, #00FF88);
    --reg-error: #FF4444;
    --reg-consent: #6c7b87;

    max-width: 540px;
    margin: 0 auto;
    padding: 28px 24px;
    text-align: start;
    color: var(--reg-text);
    background: var(--reg-bg);
    border: 1px solid var(--reg-border);
    border-radius: var(--reg-radius);
    box-shadow: var(--reg-shadow);
    backdrop-filter: blur(8px);
    scroll-margin-top: 40px;
}

.reg-head { text-align: center; margin-bottom: 22px; }
.reg-head h3 { font-size: 1.5rem; margin: 0 0 6px; color: var(--reg-text); }
.reg-head p { color: var(--reg-muted); font-size: 0.95rem; margin: 0; }

.reg-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.reg-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--reg-muted);
    margin-bottom: 6px;
}
.reg-field input {
    width: 100%;
    padding: 14px 16px;
    font: inherit;
    font-size: 1rem;
    color: var(--reg-input-text);
    background: var(--reg-input-bg);
    border: 1px solid var(--reg-input-border);
    border-radius: var(--reg-input-radius);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.reg-field input::placeholder { color: var(--reg-placeholder); }
.reg-field input:focus {
    border-color: var(--reg-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--reg-accent) 25%, transparent);
}
.reg-field input:user-invalid { border-color: var(--reg-error); }

/* intl-tel-input: phone numbers are always LTR, even on RTL pages */
.iti { width: 100%; direction: ltr; text-align: left; }
.iti input[type="tel"] { direction: ltr; }
.iti__country-container button { color: var(--reg-input-text); }
.iti__selected-dial-code { color: var(--reg-input-text); }
.iti__arrow { border-top-color: var(--reg-muted); }
.iti__arrow--up { border-bottom-color: var(--reg-muted); }
.iti__dropdown-content {
    background: var(--reg-input-bg);
    color: var(--reg-input-text);
    border: 1px solid var(--reg-input-border);
    border-radius: var(--reg-input-radius);
    box-shadow: var(--reg-shadow);
}
.iti__search-input {
    background: var(--reg-input-bg);
    color: var(--reg-input-text);
    border-bottom: 1px solid var(--reg-input-border);
}
.iti__country.iti__highlight, .iti__country:hover { background: var(--reg-hover); }
.iti__dial-code { color: var(--reg-muted); }
.iti__divider { border-bottom-color: var(--reg-input-border); }

.reg-submit { width: 100%; }
.reg-submit[disabled] { opacity: 0.7; cursor: wait; transform: none !important; }
.reg-turnstile:empty { display: none; }
.reg-turnstile { margin-bottom: 14px; display: flex; justify-content: center; }

.reg-consent {
    margin: 14px 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--reg-consent);
    text-align: center;
}

.reg-status { margin-top: 14px; text-align: center; font-weight: 600; line-height: 1.5; }
.reg-status:empty { display: none; }
.reg-status.success { color: var(--reg-success); font-size: 1.1rem; }
.reg-status.error { color: var(--reg-error); }

/* honeypot: invisible to humans, visible to bots */
.reg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

.floating-reg {
    background: var(--cyan, var(--gold, #F0C040));
    color: #000;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--cyan, var(--gold, #F0C040)) 40%, transparent);
}
.floating-reg:hover { transform: scale(1.1); }

@media (max-width: 768px) {
    .reg-form { padding: 22px 16px; }
}
