/**
 * Berkeley vendor registration form styles.
 * Load after portal-brand.css for shared design tokens.
 */

:root {
    --corp-navy: var(--brand-navy, #0e2f3a);
    --corp-navy-dark: var(--brand-navy-deep, #0b2530);
    --corp-teal: var(--brand-teal, #087f7d);
    --corp-teal-light: var(--brand-teal-light, #e6f4f3);
    --corp-gold: var(--brand-gold, #c79a3b);
    --corp-bg: #f3f6f8;
    --corp-border: #d9e2e8;
    --corp-text: #1f2933;
    --corp-muted: #607080;
    --corp-shadow: 0 18px 45px rgba(18, 50, 74, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.required {
    color: #d13438;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #8a8886;
    border-radius: 2px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #087f7d;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group-search {
    width: 100%;
    margin-top: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--corp-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--corp-text);
    background: #fff;
}

.checkbox-group-search:focus {
    outline: none;
    border-color: var(--corp-teal);
    box-shadow: 0 0 0 3px rgba(8, 127, 125, 0.15);
}

.checkbox-item.is-hidden {
    display: none;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
}

.radio-item input[type="radio"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.radio-item label {
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: block;
    padding: 12px;
    border: 1px dashed #8a8886;
    border-radius: 2px;
    text-align: center;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.3s;
}

.file-upload-label:hover {
    border-color: #087f7d;
    background: #f0f0f0;
}

.file-name {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.reference-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .contact-row {
        grid-template-columns: 1fr;
    }
}

.submit-btn {
    background: #087f7d;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 2px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.2s;
}

.submit-btn:hover {
    background: #014446;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Honeypot — hidden from users, visible to naive bots */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.turnstile-container {
    margin: 24px 0 8px;
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.wizard-bar {
    margin-bottom: 28px;
}

.wizard-steps {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.wizard-step-pill {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #eef2f5;
    color: var(--corp-muted);
    border: 1px solid var(--corp-border);
}

.wizard-step-pill.active {
    background: var(--corp-teal-light);
    color: var(--corp-teal);
    border-color: #b2dedd;
}

.wizard-step-pill.done {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.wizard-progress-track {
    height: 8px;
    background: #e8edf1;
    border-radius: 999px;
    overflow: hidden;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--corp-navy), var(--corp-teal));
    width: 0;
    transition: width 0.25s ease;
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 20px 0 28px;
    flex-wrap: wrap;
}

.wizard-nav-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.wizard-btn {
    border-radius: 10px;
    padding: 12px 20px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wizard-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.wizard-btn-secondary {
    background: #fff;
    border: 1px solid var(--corp-border, #d9e2e8);
    color: var(--corp-navy, #12324a);
}

.wizard-btn-secondary:hover:not(:disabled) {
    background: #f3f6f8;
}

.wizard-btn-primary {
    background: linear-gradient(135deg, #12324a, #087f7d);
    border: none;
    color: #fff;
    box-shadow: 0 8px 18px rgba(8, 127, 125, 0.22);
}

.wizard-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0b2438, #066b69);
}

.wizard-btn.is-hidden {
    display: none !important;
}

.form-section[data-wizard-step] {
    display: none;
}

.form-section[data-wizard-step].wizard-active {
    display: block;
}

.doc-checklist {
    background: #fffbf0;
    border: 1px solid #f0d88a;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.doc-checklist ul {
    margin: 8px 0 0 18px;
    color: #7a6020;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #087f7d;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.message {
    display: none;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    white-space: pre-wrap;
    text-align: left;
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.section-number {
    font-weight: 600;
    color: #087f7d;
}

.agreement-container {
    background: #f9f9f9;
    border: 1px solid #8a8886;
    border-radius: 2px;
    padding: 20px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 13px;
}

.agreement-container h3 {
    color: #087f7d;
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 600;
}

.agreement-container h4 {
    color: #333;
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: 600;
}

.agreement-container p {
    margin-bottom: 10px;
}

.agreement-container ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.agreement-container li {
    margin-bottom: 5px;
}

.acknowledgment-checkbox {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border: 2px solid #087f7d;
    border-radius: 2px;
}

.acknowledgment-checkbox .checkbox-item {
    margin: 0;
}

.acknowledgment-checkbox .checkbox-item label {
    font-weight: 600;
    color: #333;
}



body.registration-page {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(8, 127, 125, 0.10), transparent 32rem),
        linear-gradient(180deg, #f7fafb 0%, var(--corp-bg) 100%);
    color: var(--corp-text);
    padding: 28px;
    line-height: 1.5;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--corp-shadow);
    border: 1px solid rgba(18, 50, 74, 0.08);
}

.header {
    background:
        linear-gradient(135deg, rgba(18, 50, 74, 0.98), rgba(8, 127, 125, 0.95)),
        linear-gradient(90deg, var(--corp-navy), var(--corp-teal));
    padding: 38px 44px;
    text-align: left;
    position: relative;
    color: #fff;
}

.header-copy h1,
.header h1 {
    color: #ffffff;
    font-weight: 700;
    font-family: inherit;
    text-shadow: 0 1px 3px rgba(11, 37, 48, 0.35);
}

.header-copy p,
.header p {
    color: rgba(255, 255, 255, 0.88);
    font-family: inherit;
}

.header::after {
    content: "";
    position: absolute;
    left: 44px;
    bottom: 0;
    width: 92px;
    height: 4px;
    background: var(--corp-gold);
    border-radius: 999px 999px 0 0;
}

.header-logo {
    display: block;
    width: min(100%, 240px);
    height: auto;
    margin-bottom: 18px;
    border-radius: 8px;
}

.header h1 {
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #ffffff;
}

.header p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    margin-top: 8px;
}

.form-container {
    padding: 42px 48px 52px;
}

.registration-shell {
    display: block;
}

.registration-sidebar {
    margin-bottom: 24px;
}

.registration-main {
    min-width: 0;
}

/* —— Desktop / tablet landscape —— */
@media (min-width: 769px) {
    body.registration-page {
        padding: 40px 24px 56px;
    }

    .container {
        max-width: 1180px;
    }

    .header {
        display: flex;
        align-items: center;
        gap: 32px;
        padding: 44px 52px;
    }

    .header-logo {
        margin-bottom: 0;
        width: 220px;
        flex-shrink: 0;
    }

    .header-copy {
        min-width: 0;
    }

    .header-copy h1,
    .header h1 {
        color: #ffffff;
        font-size: clamp(26px, 2.5vw, 34px);
        line-height: 1.2;
    }

    .header-copy p,
    .header p {
        color: rgba(255, 255, 255, 0.88);
        font-size: 16px;
        margin-top: 10px;
    }

    .form-container {
        padding: 40px 52px 56px;
    }

    .registration-shell {
        display: grid;
        grid-template-columns: minmax(240px, 272px) minmax(0, 1fr);
        gap: 40px;
        align-items: start;
    }

    .registration-sidebar {
        position: sticky;
        top: 24px;
        margin-bottom: 0;
        padding: 20px;
        border: 1px solid var(--corp-border);
        border-radius: 16px;
        background: linear-gradient(180deg, #fbfdfe 0%, #f3f8fa 100%);
        box-shadow: 0 8px 24px rgba(18, 50, 74, 0.06);
    }

    .wizard-bar {
        margin-bottom: 20px;
    }

    .wizard-steps {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-bottom: 16px;
    }

    .wizard-step-pill {
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 13px;
        text-align: left;
    }

    .wizard-nav-top {
        flex-direction: column;
        align-items: stretch;
        margin: 16px 0 0;
    }

    .wizard-nav-top .wizard-nav-actions {
        margin-left: 0;
        width: 100%;
        flex-direction: column;
    }

    .wizard-nav-top .wizard-btn {
        width: 100%;
    }

    .wizard-nav-bottom {
        display: none;
    }

    .form-section {
        padding: 32px 36px;
    }

    .form-section h2 {
        font-size: 21px;
        margin-bottom: 24px;
        padding-bottom: 14px;
    }

    .checkbox-group {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .form-row {
        gap: 24px;
    }

    .submit-btn {
        max-width: 360px;
        margin-top: 8px;
    }
}

.form-section {
    background: #fff;
    border: 1px solid var(--corp-border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 24px rgba(18, 50, 74, 0.05);
}

.form-section h2 {
    color: var(--corp-navy);
    border-bottom: 1px solid var(--corp-border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
}

.section-number {
    background: var(--corp-teal-light);
    color: var(--corp-teal);
    border: 1px solid rgba(8, 127, 125, 0.14);
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

label {
    color: var(--corp-navy);
    font-size: 13px;
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    border: 1px solid var(--corp-border);
    border-radius: 10px;
    background: #fbfdfe;
    color: var(--corp-text);
    min-height: 44px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--corp-teal);
    box-shadow: 0 0 0 4px rgba(8, 127, 125, 0.12);
}

.checkbox-item,
.radio-item {
    background: #fbfdfe;
    border: 1px solid var(--corp-border);
    border-radius: 10px;
    padding: 10px 12px;
}

.file-upload-label {
    border-color: var(--corp-border);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f7fafb);
    color: var(--corp-muted);
}

.file-upload-label:hover {
    border-color: var(--corp-teal);
    background: var(--corp-teal-light);
}

.agreement-container {
    border-color: var(--corp-border);
    border-radius: 14px;
    background: #fbfdfe;
}

.agreement-container h3 {
    color: var(--corp-navy);
}

.acknowledgment-checkbox {
    border-color: rgba(8, 127, 125, 0.35);
    border-radius: 14px;
    background: var(--corp-teal-light);
}

.submit-btn {
    background: linear-gradient(135deg, var(--corp-navy), var(--corp-teal));
    border-radius: 12px;
    min-height: 52px;
    box-shadow: 0 12px 24px rgba(8, 127, 125, 0.22);
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--corp-navy-dark), #066b69);
}

.message {
    border-radius: 12px;
}

@media (max-width: 768px) {
    body.registration-page {
        padding: 0;
        background: #eef2f5;
    }

    .container {
        max-width: none;
        border-radius: 0;
        border: none;
        box-shadow: none;
        min-height: 100dvh;
    }

    .header,
    .form-container {
        padding: 20px 16px;
    }

    .header {
        padding: 16px;
        text-align: center;
    }

    .header-logo {
        max-width: 160px;
        margin: 0 auto 10px;
    }

    .header-copy h1,
    .header h1 {
        color: #ffffff;
        font-size: 1.05rem;
        line-height: 1.3;
        margin-bottom: 4px;
        text-align: center;
    }

    .header-copy p,
    .header p {
        color: rgba(255, 255, 255, 0.88);
        font-size: 12px;
        margin: 0;
        text-align: center;
    }

    .header::after {
        left: 50%;
        transform: translateX(-50%);
        width: 64px;
    }

    .form-container {
        padding: 12px 16px 24px;
    }

    .registration-sidebar {
        margin-bottom: 12px;
        padding: 0;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .registration-main {
        padding-bottom: 4px;
    }

    .form-section {
        padding: 16px;
        border-radius: 12px;
    }

    .wizard-bar {
        margin-bottom: 16px;
    }

    .wizard-steps {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: thin;
        gap: 6px;
    }

    .wizard-step-pill {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 12px;
    }

    .wizard-step-pill:not(.active):not(.done) {
        opacity: 0.55;
    }

    /* Top nav lives in sidebar — hide on mobile; use sticky bottom bar instead */
    .wizard-nav-top {
        display: none;
    }

    .wizard-nav-bottom {
        position: sticky;
        bottom: 0;
        z-index: 30;
        flex-direction: column;
        align-items: stretch;
        margin: 16px -16px 0;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--corp-border);
        box-shadow: 0 -8px 24px rgba(18, 50, 74, 0.10);
    }

    .wizard-nav-bottom .wizard-nav-actions {
        margin-left: 0;
        width: 100%;
        flex-direction: column;
    }

    .wizard-btn {
        width: 100%;
        min-height: 48px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    input[type="url"],
    select,
    textarea,
    .submit-btn {
        font-size: 16px; /* prevent iOS zoom on focus */
    }

    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .radio-group {
        gap: 10px;
    }

    .submit-btn {
        min-height: 52px;
    }
}

/* Keep header titles readable on the navy/teal band (wins over any inherited body color) */
.registration-page .header .header-copy h1 {
    color: #ffffff;
}

.registration-page .header .header-copy p {
    color: rgba(255, 255, 255, 0.88);
}