/*
 * register.css — Admin-themed register page
 * Mirrors login.css (same hero background + floating card language);
 * wider card to hold the extra Organisation/Individual fields.
 */

/* ── Size #main for the register page ───────────────────────────────── */
body:has(.register-pg) #main {
    margin-top: 0 !important;
    margin-left: 0 !important;   /* kill NiceAdmin's 300px sidebar offset  */
    padding: 0 !important;
    min-height: calc(100vh - 56px);
    display: flex !important;
    flex-direction: column !important;
}

/* ── Register page wrapper ──────────────────────────────────────────── */
.register-pg {
    flex: 1;
    padding: 68px 16px 10px;

    /* Same plain background as the authenticated Home/Dashboard page (--bg),
       rather than the dark hero gradient used on Login. */
    background: var(--bg, #f8f7ff);
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Register card ───────────────────────────────────────────────────── */
.register-card {
    background: var(--surface, #fff);
    border-radius: 22px;
    border: 1px solid var(--bd, #e8e6f0);
    box-shadow: var(--sh, 0 4px 20px rgba(91,79,207,.12));
    width: 100%;
    max-width: 900px;
    position: relative;
    overflow: hidden;
    animation: registerFloat .55s cubic-bezier(.22,1,.36,1) both;
    z-index: 1;
}

.register-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5b4fcf, #7b6fd8, #5b4fcf);
}

/* ── Card header ─────────────────────────────────────────────────────── */
.register-card-header {
    padding: 16px 44px 0;
    text-align: center;
}

.register-brand {
    font-family: 'Karina', cursive;
    font-size: 1.7rem;
    color: #5b4fcf;
    line-height: 1;
    display: block;
    margin-bottom: 4px;
    letter-spacing: .01em;
}

.register-card-header h5 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.register-subtitle {
    font-size: .8rem;
    color: #7a7a9a;
    margin-bottom: 0;
}

/* ── Card body ──────────────────────────────────────────────────────── */
.register-card-body {
    padding: 10px 44px 20px;
}

.register-card hr {
    border-color: #e8e6f0;
    margin: 8px 0;
    opacity: 1;
}

/* Tighten the shared .f-group spacing a touch inside this wider, shorter card */
.register-card .f-group { margin-bottom: 10px; }
.register-card .f-row { margin-bottom: 0; }
.register-card .f-label { margin-bottom: 4px; }

/* ── Type-of-registration segmented toggle ──────────────────────────── */
.reg-type-toggle {
    margin-bottom: 10px;
}
.reg-type-toggle .f-label {
    margin-bottom: 6px;
}
.reg-type-options {
    display: inline-flex;
    background: #f3f2fb;
    border-radius: 100px;
    padding: 4px;
    gap: 2px;
}
.reg-type-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.reg-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: #7a7a9a;
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
    user-select: none;
}
.reg-type-input:checked + .reg-type-pill {
    background: #5b4fcf;
    color: #fff;
    box-shadow: 0 3px 10px rgba(91,79,207,.35);
}
.reg-type-input:focus-visible + .reg-type-pill {
    outline: 2px solid #5b4fcf;
    outline-offset: 2px;
}

/* ── Form footer — secondary link left, small submit button bottom-right ── */
.register-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--bd, #e8e6f0);
}

/* ── Submit button ───────────────────────────────────────────────────── */
#register-submit {
    border: none !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #fff !important;
    background: #5b4fcf !important;
    box-shadow: 0 4px 14px rgba(91,79,207,.35);
    transition: all .22s ease;
    letter-spacing: .01em;
}
#register-submit:hover {
    background: #4a3fb8 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(91,79,207,.42);
}
#register-submit:active {
    transform: translateY(0) scale(.98);
    box-shadow: 0 2px 8px rgba(91,79,207,.3);
}

/* ── Links ───────────────────────────────────────────────────────────── */
.register-card a {
    color: #5b4fcf;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.register-card a:hover {
    color: #4a3fb8;
    text-decoration: underline;
}

/* ── Validation ──────────────────────────────────────────────────────── */
.register-card .text-danger {
    font-size: .78rem;
}

/* ── Float-in animation ──────────────────────────────────────────────── */
@keyframes registerFloat {
    from {
        opacity: 0;
        transform: translateY(32px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 620px) {
    .register-pg {
        padding: 80px 16px 24px;
        align-items: flex-start;
    }
    .register-card-header {
        padding: 24px 22px 0;
    }
    .register-card-body {
        padding: 18px 22px 28px;
    }
    .register-card .f-row {
        flex-direction: column;
        gap: 0;
    }
}
