/**
 * Conference submission form (2.0)
 * Uses the ERN theme colours when present, neutral fallbacks otherwise.
 */
.cs-form {
    --cs-accent: hsl(var(--primary, 316 42% 39%));
    --cs-border: hsl(var(--border, 220 13% 85%));
    --cs-muted: hsl(var(--muted-foreground, 220 9% 40%));
    --cs-soft: hsl(var(--secondary, 220 14% 96%));
    max-width: 46rem;
    margin: 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.cs-form *, .cs-form *::before, .cs-form *::after { box-sizing: border-box; }

.cs-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cs-part {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--cs-border);
}
.cs-form > .cs-part:first-of-type { margin-top: 1rem; border-top: 0; padding-top: 0; }

.cs-field { margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }
.cs-field > label, .cs-field > legend { display: block; font-weight: 600; margin-bottom: .5rem; padding: 0; }
.cs-field .required, .cs-form .required { color: #b32d2e; }

.cs-form input[type="text"],
.cs-form input[type="email"],
.cs-form textarea {
    width: 100%;
    max-width: 100%;
    padding: .625rem .75rem;
    font: inherit;
    font-size: 1rem; /* 16px keeps iOS from zooming in */
    border: 1px solid var(--cs-border);
    border-radius: .5rem;
    background: #fff;
}
.cs-form input:focus, .cs-form textarea:focus { outline: 2px solid var(--cs-accent); outline-offset: 1px; border-color: transparent; }
.cs-form textarea { resize: vertical; }

.cs-help { font-size: .9rem; color: var(--cs-muted); margin: 0 0 .5rem; }
.cs-required-note { font-size: .9rem; color: var(--cs-muted); }
.cs-subq { display: block; font-weight: 600; margin: 1rem 0 .25rem; }

.cs-checkbox-label {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-weight: normal;
    margin: 0 0 .5rem;
    cursor: pointer;
}
.cs-checkbox-label input { margin-top: .3rem; flex-shrink: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--cs-accent); }
.cs-checkbox-label.cs-inline { display: inline-flex; margin-right: 1.5rem; }

.cs-strand { margin-bottom: .25rem; }
.cs-strand-name { font-weight: 600; }
.cs-topics { margin: .25rem 0 .75rem 1.65rem; padding-left: .75rem; border-left: 2px solid var(--cs-border); }
.cs-topics[hidden] { display: none; }

.cs-author-row {
    border: 1px solid var(--cs-border);
    border-radius: .75rem;
    padding: 1rem;
    margin: 0 0 .75rem;
    background: var(--cs-soft);
    min-width: 0;
}
.cs-author-legend { font-weight: 600; padding: 0 .25rem; }
.cs-author-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cs-author-fields .cs-wide { grid-column: 1 / -1; }
.cs-mini { display: block; font-weight: normal; }
.cs-mini > span { display: block; font-size: .85rem; color: var(--cs-muted); margin-bottom: .2rem; }
.cs-author-roles { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: center; }
.cs-author-roles .cs-checkbox-label { margin: 0; }

.cs-remove-author, .cs-button-secondary, .cs-insert-heading {
    font: inherit;
    font-size: .875rem;
    padding: .4rem .8rem;
    border: 1px solid var(--cs-border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}
.cs-remove-author { margin-left: auto; }
.cs-button-secondary:hover, .cs-insert-heading:hover, .cs-remove-author:hover { border-color: var(--cs-accent); color: var(--cs-accent); }

.cs-subheading-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }

.cs-word-count { font-size: .9rem; color: var(--cs-muted); margin-top: .5rem; }
#cs-word-count.over-limit { color: #b32d2e; font-weight: 700; }

.cs-consent .cs-checkbox-label { margin-bottom: .9rem; }

.cs-message:empty { display: none; }
.cs-message { padding: 1rem 1.25rem; margin: 1rem 0; border-radius: .5rem; }
.cs-message p { margin: 0; font-weight: 600; }
.cs-message ul { margin: .5rem 0 0 1.25rem; padding: 0; }
.cs-message.success { background: #e7f5ec; color: #14532d; border: 1px solid #b7e1c5; }
.cs-message.error { background: #fdecec; color: #7f1d1d; border: 1px solid #f5c2c2; }

.cs-submit {
    font: inherit;
    font-weight: 600;
    padding: .875rem 2rem;
    background: var(--cs-accent);
    color: #fff;
    border: 0;
    border-radius: .5rem;
    cursor: pointer;
}
.cs-submit:hover { filter: brightness(.92); }
.cs-submit:disabled { opacity: .6; cursor: progress; }

.cs-closed { padding: 1.5rem; background: #f3f4f6; border-radius: .5rem; }

@media (max-width: 600px) {
    .cs-author-fields { grid-template-columns: 1fr; }
    .cs-submit { width: 100%; }
}

/* Option labels inside a fieldset stay regular weight and aligned. */
.cs-form .cs-field > label.cs-checkbox-label { display: flex; font-weight: normal; margin-bottom: .5rem; }
.cs-form .cs-field > label.cs-checkbox-label.cs-inline { display: inline-flex; }
.cs-form .cs-strand-name { font-weight: 600; }
