/* ============================================================
   REG3 — 50/50 multi-step employer registration
   Left v9 testimonial slider (styled by login.css) + right form
   card with sectioned, step-navigated body. Header/nav + footer
   come from the new-design layout.
   ============================================================ */

/* ---------- Page layout ---------- */
.reg3-page {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 56px);
    background: #f5f7fb;
    border-bottom: 6px solid var(--primary0, #265CFF);
    box-sizing: border-box;
    overflow: hidden;
}

/* ---------- Carousel side (left 50%) ---------- */
.reg3-side {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;
    overflow: hidden;
    background: var(--primary0, #265CFF);
}

.reg3-side .v9-slider__slide .v5-left__overlay {
    padding: 48px 48px 92px;
}

/* Bar-style dot navigation */
.reg3-side .v9-slider__nav { bottom: 26px; }

.reg3-side .v9-slider__dot {
    width: 26px;
    height: 5px;
    border-radius: 3px;
    margin: 0 4px;
    padding: 0;
    background: transparent;
}

.reg3-side .v9-slider__dot::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
    transition: background 0.25s ease;
}

.reg3-side .v9-slider__dot:hover::before { background: rgba(255, 255, 255, 0.7); }
.reg3-side .v9-slider__dot--active { width: 44px; }
.reg3-side .v9-slider__dot--active::before { background: #ffffff; width: 100%; height: 100%; }

/* ---------- Form side (right 50%) ---------- */
.reg3-main {
    flex: 0 0 50%;
    max-width: 50%;
    display: flex;
    align-items: stretch;
    padding: 24px;
    box-sizing: border-box;
    min-width: 0;
}

/* ---------- Card ---------- */
.reg3-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
    border: 1px solid #eef0f5;
    overflow: hidden;
    min-height: 0;
}

.reg3-card__head {
    flex-shrink: 0;
    padding: 28px 40px 22px;
    text-align: center;
    border-bottom: 1px solid #eef0f5;
    /* This is a semantic <header>; a global mobile rule
       (header { position: fixed; width: 100vw }) would otherwise pin it to
       the top of the viewport and overlap the form. Keep it in flow. */
    position: static;
    width: auto;
}

.reg3-eyebrow {
    display: inline-block;
    font: 700 11px/1 'Gordita', sans-serif;
    letter-spacing: 0.14em;
    color: var(--primary0, #265CFF);
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 6px 14px;
    background: #eaf0ff;
    border-radius: 999px;
}

.reg3-card__title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.reg3-card__sub {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

.reg3-card__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 22px 40px 18px;
    display: flex;
    flex-direction: column;
}

.reg3-card__body > form {
    width: 100%;
    margin: auto 0;
}

.reg3-card__body::-webkit-scrollbar { width: 6px; }
.reg3-card__body::-webkit-scrollbar-thumb { background: #e2e6ee; border-radius: 3px; }
.reg3-card__body::-webkit-scrollbar-thumb:hover { background: #c5cbd6; }

.reg3-card__foot {
    flex-shrink: 0;
    padding: 16px 40px 22px;
    border-top: 1px solid #eef0f5;
    background: #fbfcfe;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------- Section show/hide (step controller) ---------- */
.reg3-section--hidden { display: none; }

/* ---------- Mobile step indicator ---------- */
.reg3-stepind {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.reg3-stepind__bar { display: flex; gap: 6px; }

.reg3-stepind__seg {
    width: 26px;
    height: 4px;
    border-radius: 3px;
    background: #e2e6ee;
    transition: background 0.25s ease;
}

.reg3-stepind__seg--active { background: var(--primary0, #265CFF); }

.reg3-stepind__text {
    font: 600 11.5px/1 'Gordita', sans-serif;
    letter-spacing: 0.04em;
    color: #64748b;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------- Section ---------- */
.reg3-section + .reg3-section { margin-top: 26px; }

.reg3-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.reg3-section__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font: 700 13px/1 'Gordita', sans-serif;
    color: var(--primary0, #265CFF);
    background: #eaf0ff;
    border-radius: 8px;
    flex-shrink: 0;
}

.reg3-section__title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0;
}

/* ---------- Row + Field ---------- */
.reg3-row {
    display: grid;
    gap: 16px;
    margin-bottom: 14px;
    grid-template-columns: 1fr;
}

.reg3-row:last-child { margin-bottom: 0; }
.reg3-row--2 { grid-template-columns: 1fr 1fr; }
.reg3-row--3 { grid-template-columns: 120px 1fr 1fr; }

.reg3-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.reg3-field label,
.reg3-field__label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.reg3-field__label--req::after {
    content: "*";
    color: #ef4444;
    margin-left: 1px;
}

/* Shared input look — applies to native inputs and the app's .form-control */
.reg3-field__input,
.reg3-field .form-control {
    width: 100%;
    height: 44px;
    line-height: 44px;
    padding: 0 14px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    color: #0f172a;
    background: #fff;
    border: 1.5px solid #d6dbe4;
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.reg3-field__input::placeholder,
.reg3-field .form-control::placeholder { color: #9aa3b3; }

.reg3-field__input:hover,
.reg3-field .form-control:hover { border-color: #b6bdcc; }

.reg3-field__input:focus,
.reg3-field .form-control:focus {
    outline: none;
    border-color: var(--primary0, #265CFF);
    box-shadow: 0 0 0 4px rgba(38, 92, 255, 0.10);
}

/* jQuery-validate error state (errorClass "error info-alert") */
.reg3-field .form-control.error,
.reg3-field__input.error {
    border-color: #ef4444;
}

.reg3-field span.error,
.reg3-pwd span.error {
    display: block;
    font-size: 11.5px;
    line-height: 1.35;
    color: #ef4444;
    margin-top: 4px;
}

/* Password */
.reg3-pwd { position: relative; }
.reg3-pwd .form-control { padding-right: 42px; }

/* Password toggle: inline SVG eye that swaps open/off on click (matches login) */
.reg3-pwd .password-toggle {
    position: absolute;
    right: 12px;
    /* Centre on the 44px input (label sits outside .reg3-pwd). */
    top: 22px;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.35;
    transition: opacity 0.2s;
}

.reg3-pwd .password-toggle:hover { opacity: 0.7; }

.reg3-pwd .password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: #6b7280;
}

/* ---------- Phone with disabled country-code prefix ---------- */
.reg3-phone {
    display: flex;
    align-items: stretch;
}

.reg3-phone .dial-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 0 12px;
    height: 44px;
    font: 600 14px/1 'Gordita', sans-serif;
    color: #64748b;
    background: #f1f4f9;
    border: 1.5px solid #d6dbe4;
    border-right: 0;
    border-radius: 10px 0 0 10px;
    box-sizing: border-box;
    white-space: nowrap;
    user-select: none;
}

.reg3-phone .reg3-phone__input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.reg3-phone:focus-within .dial-code { border-color: var(--primary0, #265CFF); }

/* ---------- Info tooltip (Company Tax Number) ---------- */
.reg3-info {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    cursor: help;
}

.reg3-info img { width: 14px; height: 14px; display: block; }
.reg3-info:hover { color: var(--primary0); }

.reg3-info__tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: #0f172a;
    color: #fff;
    font: 400 11.5px/1.5 'Gordita', sans-serif;
    padding: 9px 12px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 50;
}

.reg3-info .tooltiptext { color: #fff; }

.reg3-info:hover .reg3-info__tip,
.reg3-info:focus-within .reg3-info__tip { opacity: 1; visibility: visible; }

/* ---------- Terms ---------- */
.reg3-terms { margin: 18px 0 6px; }

.reg3-terms .form-check-label,
.reg3-terms__label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #475569;
    cursor: pointer;
    margin: 0;
}

.reg3-terms a {
    color: var(--primary0);
    font-weight: 500;
    text-decoration: underline;
}

.reg3-terms span.error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
}

/* Native checkbox kept compact and on-brand */
.reg3-terms input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    accent-color: var(--primary0);
    cursor: pointer;
}

/* ---------- Captcha (real reCAPTCHA partial) ---------- */
.reg3-captcha-wrap {
    margin: 14px 0 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* jQuery-validate captcha error sits below the reCAPTCHA box, centred */
.reg3-captcha-wrap span.error {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: #ef4444;
    margin-top: 6px;
    text-align: center;
}

/* ---------- Action buttons (foot) ---------- */
.reg3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    font: 700 14.5px/1.2 'Gordita', sans-serif;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.08s ease, box-shadow 0.18s ease;
    border: 1.5px solid transparent;
    box-sizing: border-box;
}

.reg3-btn:active { transform: translateY(1px); }
.reg3-btn[hidden] { display: none; }

.reg3-btn--primary {
    background: var(--primary0, #265CFF);
    color: #fff;
    box-shadow: 0 4px 14px rgba(38, 92, 255, 0.28);
}

.reg3-btn--primary:hover {
    background: var(--primary-1, #113DD9);
    box-shadow: 0 6px 18px rgba(38, 92, 255, 0.35);
    color: #fff;
}

.reg3-btn--ghost {
    background: #fff;
    color: #0f172a;
    border-color: #d6dbe4;
}

.reg3-btn--ghost:hover { border-color: #94a3b8; background: #f9fafc; }
.reg3-btn__arrow { line-height: 1; font-size: 16px; }

/* Loading / submitting state */
.reg3-btn.is-loading { cursor: default; pointer-events: none; opacity: 0.9; }
.reg3-btn:disabled { cursor: default; opacity: 0.65; }

.reg3-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    animation: reg3-spin 0.6s linear infinite;
    flex-shrink: 0;
}

.reg3-btn--ghost .reg3-spinner {
    border-color: rgba(15, 23, 42, 0.25);
    border-top-color: #0f172a;
}

@keyframes reg3-spin { to { transform: rotate(360deg); } }

/* ============================================================
   select2 overrides — match the reg3 field look
   ============================================================ */
.reg3-card .select2-container { width: 100% !important; }

/* style.css forces height + border with !important, so match that here. */
.reg3-card .select2-container--default .select2-selection--single {
    height: 44px !important;
    border: 1.5px solid #d6dbe4 !important;
    border-radius: 10px !important;
    background: #fff;
}

.reg3-card .select2-container--default .select2-selection--single .select2-selection__rendered {
    /* line-height matches the 41px inner height (44px box − 1.5px borders) to
       vertically centre the text. A global rule forces padding-top: 5px which
       pushes it off-centre, so reset the vertical padding here. */
    line-height: 41px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 14px;
    padding-right: 30px;
    color: #0f172a;
    font-size: 14px;
}

.reg3-card .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 42px;
    right: 8px;
}

.reg3-card .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #9aa3b3;
}

.reg3-card .select2-container--default.select2-container--open .select2-selection--single,
.reg3-card .select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary0, #265CFF);
    box-shadow: 0 0 0 4px rgba(38, 92, 255, 0.10);
}

/* jQuery-validate error border on the original (hidden) select reflects here.
   The base .select2-selection--single border is set with !important, so the
   error colour must use !important to win. */
.reg3-field select.error + .select2-container .select2-selection--single {
    border-color: #ef4444 !important;
}

.select2-dropdown {
    border-color: #e8ecf2;
    border-radius: 10px;
}

/* ---------- Responsive ---------- */
@media (min-width: 992px) and (max-width: 1199px) {
    .reg3-card__head, .reg3-card__body, .reg3-card__foot {
        padding-left: 28px;
        padding-right: 28px;
    }
    .reg3-row--3 { grid-template-columns: 92px 1fr 1fr; gap: 12px; }
}

@media (max-width: 991px) {
    .reg3-page {
        flex-direction: column;
        min-height: 0;
        overflow: visible;
        background: #ffffff;
        border-bottom: 0;
    }
    .reg3-main {
        order: 1;
        flex: none;
        max-width: 100%;
        padding: 20px 16px;
    }
    .reg3-side {
        order: 2;
        flex: none;
        max-width: 100%;
        width: 100%;
        height: 560px;
        min-height: 560px;
    }
    .reg3-side .v9-slider__slide .v5-left__overlay { padding: 18px 20px 56px; }
    .reg3-card { max-width: 720px; margin: 0 auto; min-height: 0; }
    .reg3-card__body { overflow-y: visible; }
}

@media (max-width: 767px) {
    .reg3-section + .reg3-section { margin-top: 0; }
    .reg3-stepind { display: flex; }
}

@media (max-width: 720px) {
    .reg3-row--3 { grid-template-columns: 1fr 1fr; }
    .reg3-row--3 .reg3-field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .reg3-card { border-radius: 14px; }
    .reg3-card__head { padding: 24px 22px 18px; }
    .reg3-card__body { padding: 20px 22px 16px; }
    .reg3-card__foot { padding: 16px 22px 20px; gap: 14px; }
    .reg3-card__title { font-size: 20px; }
    .reg3-side { height: 480px; min-height: 480px; }
    .reg3-row--2, .reg3-row--3 { grid-template-columns: 1fr; }
    .reg3-row--3 .reg3-field:first-child { grid-column: auto; }
}
