/* ===== Two-column page layout ===== */
.reg-page-content {
    display: flex;
    flex-direction: row;
    gap: 48px;
    max-width: min(1160px, 94vw);
    margin: 40px auto;
    padding: 0 24px;
    flex: 1;
    align-items: flex-start;
}

/* ===== Left panel: Intro wrapper ===== */
.reg-intro-wrapper {
    flex: 0 0 260px;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.reg-intro-bottom > .intro-section__divider:first-child {
    margin-top: 0;
}

/* ===== Left panel: Intro top (reuses .intro-section from public.css) ===== */
.reg-intro {
    flex: 1;
}

.reg-intro__privacy-hint {
    font-size: 0.875rem;
    color: var(--slate-6b7785);
}

.reg-intro__list {
    margin: 8px 0 0 20px;
    padding: 0;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.8;
}

/* ===== Right panel: Registration Form ===== */
.reg-form-panel {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 32px 36px;
}

/* ===== Placeholder styling ===== */
.reg-form .login-form__input::placeholder {
    color: #bbb;
    font-style: italic;
}

/* ===== Section title ===== */
.reg-form__section-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 4px;
    margin: 20px 0 10px;
}

.reg-form__section-desc {
    font-size: 0.9375rem;
    color: var(--slate-5b6b7b);
    margin: -4px 0 12px;
    line-height: 1.5;
}

/* ===== Hint text ===== */
.reg-form__hint {
    font-size: 0.875rem;
    color: var(--slate-6b7785);
}

.reg-form__field-hint .login-form__input {
    margin-bottom: 3px;
}

.reg-form__field-hint .reg-form__hint {
    display: block;
    margin-bottom: 16px;
}

/* ===== Textarea ===== */
.reg-form__textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ===== Form field rows ===== */
.reg-form__row {
    margin-bottom: 0;
}

.reg-form__name-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.reg-form__name-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.reg-form__name-col--sal   { flex: 0 0 90px; }
.reg-form__name-col--first { flex: 2; }
.reg-form__name-col--mid   { flex: 1; }
.reg-form__name-col--last  { flex: 2; }

.reg-form__location-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.reg-form__loc-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.reg-form__two-col {
    display: flex;
    gap: 10px;
}

.reg-form__two-col > div {
    flex: 1;
    min-width: 0;
}

/* ===== Country p:selectOneMenu ===== */
.reg-country-select {
    display: block;
    width: 100%;
    margin-bottom: 16px;
}

.reg-country-select.ui-selectonemenu {
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.15s;
}

.reg-country-select .ui-selectonemenu-label {
    padding: 9px 12px;
    font-size: 0.95rem;
    color: #333;
}

.reg-country-select.ui-state-focus,
.reg-country-select.ui-selectonemenu:hover {
    border-color: var(--blue-2980b9);
    box-shadow: 0 0 0 2px var(--blue-2980b9-a18);
}

.ui-selectonemenu-panel .ui-selectonemenu-filter {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

/* ===== Privacy agreement checkbox ===== */
.privacy-agree {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 16px;
    padding: 10px 12px;
    background: var(--blue-f0f4f8);
    border: 1px solid var(--blue-c8d8eb);
    border-radius: 4px;
}

.privacy-agree__checkbox {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--blue-2471a3);
}

.privacy-agree__label {
    font-size: 0.88rem;
    color: #333;
    cursor: pointer;
    margin: 0;
    line-height: 1.4;
}

.privacy-agree__link {
    color: var(--blue-2471a3);
    text-decoration: underline;
}

.privacy-agree__link:hover {
    color: var(--blue-1a5276);
}

/* ===== Mobile-only title (shown when form reorders above intro on mobile) ===== */
.reg-form__mobile-title {
    display: none;
}

/* ===== RWD ===== */
@media (max-width: 780px) {
    .reg-page-content {
        flex-direction: column;
        gap: 24px;
        margin: 24px auto;
    }

    .reg-intro-wrapper {
        display: contents;
    }

    .reg-intro-top {
        display: none;
    }

    .reg-intro-bottom {
        order: 0;
        width: 100%;
    }

    .reg-intro-bottom > .intro-section__divider:first-child,
    .reg-intro-bottom > .intro-section__divider:last-of-type,
    .reg-intro__privacy-hint {
        display: none;
    }

    .reg-form__mobile-title {
        display: block;
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--blue-1a3a5c);
        margin: 0 0 20px;
    }

    .reg-form-panel {
        width: 100%;
        order: -1;
    }

    .reg-form__name-row,
    .reg-form__location-row,
    .reg-form__two-col {
        flex-direction: column;
        gap: 0;
    }

    .reg-form__name-col--sal,
    .reg-form__name-col--first,
    .reg-form__name-col--mid,
    .reg-form__name-col--last,
    .reg-form__loc-col {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .reg-form-panel {
        padding: 24px 16px;
        box-shadow: none;
        border-radius: 0;
    }
}

/* ===== Section-level error list ===== */
.reg-form__section-errors {
    list-style: none;
    margin: 4px 0 10px;
    padding: 7px 12px;
    background: #fdf2f2;
    border-left: 3px solid #c0392b;
    border-radius: 0 3px 3px 0;
    font-size: 0.875rem;
    color: #a93226;
    line-height: 1.6;
}

.reg-form__section-errors li::before {
    content: '✕\00a0';
    font-weight: 700;
}

.reg-form__section-errors--privacy {
    margin-top: 6px;
    margin-bottom: 0;
}

/* Red border on validation error — applied via bean Set<String> errorFields */
.login-form__input.field-has-error,
.login-form__input.field-has-error.ui-inputtext {
    border-color: #c0392b !important;
    background-color: #fffafa;
}

.reg-country-select.field-has-error.ui-selectonemenu {
    border-color: #c0392b !important;
}

.privacy-agree--error {
    border-color: #c0392b;
    background: #fdf2f2;
}

/* PrimeFaces lifecycle error state (fallback) */
.login-form__input.ui-state-error {
    border-color: #c0392b !important;
}

.reg-country-select.ui-state-error.ui-selectonemenu {
    border-color: #c0392b !important;
}

/* ===== Privacy Note Modal ===== */
.privacy-dialog__body {
    max-height: 440px;
    overflow-y: auto;
    padding: 4px 8px 8px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #444;
}
