/* ============================================================
   NOC Event Suite v5 — Registration Forms
   Brand palette:  Light #00A4A3 · Medium #256C71 · Dark #275059
   ============================================================ */

/* ── CSS custom properties ─────────────────────────────── */
.noc-form {
    --noc-f-light:        #00A4A3;
    --noc-f-mid:          #256C71;
    --noc-f-dark:         #275059;
    --noc-f-bg:           linear-gradient(150deg, var(--noc-f-dark) 0%, var(--noc-f-mid) 55%, var(--noc-f-light) 100%);
    --noc-f-fg:           #ffffff;
    --noc-f-field-bg:     rgba(255,255,255,.10);
    --noc-f-field-border: rgba(255,255,255,.22);
    --noc-f-field-focus:  rgba(0,164,163,.6);
    --noc-f-placeholder:  rgba(255,255,255,.6);
    --noc-f-radius:       14px;
    --noc-f-radius-sm:    9px;
    --noc-f-btn-bg:       var(--noc-f-light);
    --noc-f-btn-hover:    #008f8e;

    max-width: 700px;
    margin: 24px auto;
    padding: 36px 32px 32px;
    border-radius: var(--noc-f-radius);
    background: var(--noc-f-bg);
    color: var(--noc-f-fg);
    font-family: inherit;
    box-shadow:
        0 20px 60px rgba(0,0,0,.25),
        0 4px 16px rgba(0,164,163,.2),
        inset 0 1px 0 rgba(255,255,255,.08);
    position: relative;
    overflow: hidden;
}

/* Subtle top accent bar */
.noc-form::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--noc-f-light), #7de8e8, var(--noc-f-light));
    background-size: 200% 100%;
    animation: noc-f-shimmer 3s linear infinite;
}
@keyframes noc-f-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Heading ───────────────────────────────────────────── */
.noc-form h3 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--noc-f-fg);
    letter-spacing: -.01em;
}

/* ── Labels ────────────────────────────────────────────── */
.noc-form label {
    display: block;
    margin: 14px 0 0;
    font-size: .85rem;
    font-weight: 700;
    color: var(--noc-f-fg);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Inputs & selects ──────────────────────────────────── */
.noc-form input,
.noc-form select {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 11px 14px;
    border: 1.5px solid var(--noc-f-field-border);
    border-radius: var(--noc-f-radius-sm);
    background: var(--noc-f-field-bg);
    color: #fff;
    font-size: .95rem;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
    box-sizing: border-box;
}
.noc-form input::placeholder { color: var(--noc-f-placeholder); }

/* Native <select> dropdown options must be readable */
.noc-form select option {
    background: #1a4f54;
    color: #fff;
}

/* Focus ring */
.noc-form input:focus,
.noc-form select:focus {
    border-color: var(--noc-f-light);
    background: rgba(255,255,255,.14);
    box-shadow: 0 0 0 3px rgba(0,164,163,.28);
}

/* Disabled state */
.noc-form input:disabled,
.noc-form select:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ── Section divider label styling ─────────────────────── */
/* "Select Event*" and "Choose your Workshop*" get
   a slightly highlighted treatment as section openers */
.noc-form label:first-of-type,
.noc-form label:has(> select[name="selected_event_id"]),
.noc-form label:has(> select[name="workshop_id"]) {
    position: relative;
}

/* ── 2-col row helper ───────────────────────────────────── */
.noc-form .noc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 14px;
}
.noc-form .noc-col { display: block; }
.noc-form .noc-col label,
.noc-form .noc-col input,
.noc-form .noc-col select { margin-top: 0; }
@media (max-width: 600px) {
    .noc-form .noc-row { grid-template-columns: 1fr; gap: 0; }
    .noc-form { padding: 28px 20px 24px; }
}

/* ── Submit button ─────────────────────────────────────── */
.noc-form button[type="submit"] {
    display: block;
    width: 100%;
    margin-top: 24px;
    padding: 14px 20px;
    border: none;
    border-radius: var(--noc-f-radius-sm);
    background: var(--noc-f-btn-bg);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .18s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(0,164,163,.35);
}
.noc-form button[type="submit"]:hover,
.noc-form button[type="submit"]:focus-visible {
    background: var(--noc-f-btn-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(0,164,163,.45);
}
.noc-form button[type="submit"]:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* ── Success / error messages ──────────────────────────── */
.noc-success,
.noc-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--noc-f-radius-sm);
    margin-bottom: 20px;
    font-size: .95rem;
    line-height: 1.5;
    background: #fff;
    color: #111;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    border-left: 4px solid transparent;
}
.noc-success { border-left-color: #10b981; }
.noc-error   { border-left-color: #ef4444; }

.noc-success::before { content: "✔"; font-weight: 700; color: #10b981; font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }
.noc-error::before   { content: "!"; font-weight: 900; color: #ef4444; font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }

.noc-success a       { color: #047857; font-weight: 600; text-decoration: underline; }
.noc-success a:hover { color: #065f46; text-decoration: none; }

/* ── Seats hint ────────────────────────────────────────── */
.noc-hint {
    margin-top: 7px;
    font-size: .82rem;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    min-height: 1.2em;
    transition: color .15s;
}
.noc-hint--low  { color: #fde68a; }
.noc-hint--none { color: #fca5a5; }

/* ── Closed overlay ────────────────────────────────────── */
.noc-form-overlay {
    position: absolute;
    inset: 0;
    background: rgba(39,80,89,.88);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--noc-f-radius);
    z-index: 10;
    text-align: center;
    padding: 24px;
}
.noc-form-overlay h3 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

/* ── Workshop loading state (disabled select) ──────────── */
.noc-form select:disabled {
    background: rgba(255,255,255,.05);
}
