/* Custom registration styles - modern, accessible, responsive */

/* Typography and base colors */
:root {
    /* Map to site theme colors from aiz-core.css where available */
    --color-primary: var(--preorder-primary, var(--blue));
    --color-primary-dark: var(--hov-primary, var(--hov-blue));
    --color-accent: var(--success, #10b981);
    --color-bg: #f8fafc; /* slate-50 */
    --color-surface: #ffffff;
    --color-border: #e5e7eb; /* gray-200 */
    --color-muted: #6b7280; /* gray-500 */
    --color-text: #111827; /* gray-900 */
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 6px 14px rgba(0,0,0,.06);
    --shadow-lg: 0 14px 28px rgba(0,0,0,.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* Prefer system fonts with graceful fallbacks (scoped) */
.aiz-main-wrapper .form-default,
.aiz-main-wrapper .right-content,
.aiz-main-wrapper .modern-form-card {
    font-family: "Inter", "Roboto", "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--color-text);
}

/* Layout helpers (no global background override) */
/* .aiz-main-wrapper background kept as-is by theme */

/* Card container for modern look */
.modern-form-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: var(--shadow-md);
    padding: 24px 28px;
}

/* Make the form a bit wider on desktop (override inline max-width) */
.aiz-main-wrapper .right-content .w-100 { max-width: 720px !important; }

/* Labels (scoped) */
.modern-form-card .modern-label,
.modern-form-card .form-group > label,
#reg-form label.fs-12 {
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* Inputs (scoped, flatter) */
.modern-input,
#reg-form .form-control {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    background-color: #fff;
    transition: box-shadow .2s ease, border-color .2s ease, transform .1s ease;
}

#reg-form .form-control:focus,
.modern-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
    outline: none;
}

/* Invalid state accessibility (scoped) */
#reg-form .form-control.is-invalid,
.modern-input.is-invalid {
    border-color: #ef4444; /* red-500 */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

#reg-form .invalid-feedback,
.modern-form-card .invalid-feedback {
    font-size: 12px;
}

/* Input groups for phone & OTP */
#reg-form .phone-form-group .input-group,
#reg-form #otp-section .input-group {
    align-items: stretch;
}

#reg-form .phone-form-group .input-group-append .btn,
#reg-form #otp-section .input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* intl-tel-input integration */
#reg-form .phone-form-group .iti { width: 100%; }
#reg-form .phone-form-group .iti .iti__flag-container {
    border: 2px solid var(--color-border);
    border-right: 0;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background-color: #fff;
    transition: border-color .2s ease;
}
#reg-form .phone-form-group .iti input.form-control {
    border-left: 0 !important;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Buttons (scoped, flat) */
.modern-btn,
#reg-form button#btn-send-otp,
#reg-form button#btn-verify-otp {
    background: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-weight: 600;
    letter-spacing: .2px;
    box-shadow: var(--shadow-sm);
    transition: background-color .2s ease, box-shadow .2s ease, transform .1s ease;
}

.modern-btn:hover,
#reg-form button#btn-send-otp:hover,
#reg-form button#btn-verify-otp:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    box-shadow: var(--shadow-md);
}

.modern-btn:active,
#reg-form button#btn-send-otp:active,
#reg-form button#btn-verify-otp:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Success action color for verify OTP if class is btn-success */
#reg-form .btn.btn-success#btn-verify-otp {
    background: linear-gradient(135deg, var(--color-accent), #059669);
}
#reg-form .btn.btn-success#btn-verify-otp:hover {
    box-shadow: 0 12px 22px rgba(16,185,129,.25);
}

/* Helper text */
.text-muted,
.fs-12.text-gray,
.text-gray-dark {
    color: var(--color-muted) !important;
}

/* Headings and titles */
.right-content h1,
.fs-2,
.fs-20 {
    color: #0f172a; /* slate-900 */
    letter-spacing: .2px;
}

/* Subheading tone alignment with theme */
.right-content p.text-muted { color: var(--secondary, #8f97ab); }

/* Social icons */
ul.social.colored li a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform .15s ease, box-shadow .2s ease;
}
ul.social.colored li a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Password eye position (scoped) */
#reg-form .position-relative .password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
}

/* Checkbox area spacing */
.aiz-checkbox span {
    line-height: 1.4;
}

/* Image cover fit for left-side image */
.img-fit.h-100 { object-fit: cover; }

/* Responsive tweaks */
@media (max-width: 991.98px) {
    .modern-form-card { padding: 24px; }
    .right-content { padding: 16px; }
}

@media (max-width: 575.98px) {
    .modern-form-card { border-radius: var(--radius-md); }
    #reg-form .form-group { margin-bottom: 14px; }
    .modern-form-card .btn, .modern-form-card .modern-btn { width: 100%; }
}

/* Subtle hover for links used on auth pages */
.animate-underline-primary {
    position: relative;
}
.animate-underline-primary:after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width .2s ease;
}
.animate-underline-primary:hover:after {
    width: 100%;
}

/* Preserve existing classes, only enhancing visuals */
/* End custom registration styles */