/* Size controls by their content without changing the shared form layout. */
.shell .registry-form,
.shell .registry-form fieldset,
.shell .registry-form .editor-field {
    min-width: 0;
}

.shell .registry-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.shell .registry-form select,
.shell .registry-form textarea {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}

.shell .registry-form input[type="number"],
.shell .registry-form input[inputmode="decimal"] {
    width: 12rem;
}

.shell .registry-form input[type="date"] {
    width: 13rem;
}

.shell .registry-form input[type="time"] {
    width: 10rem;
}

.shell .registry-form input[type="datetime-local"] {
    width: 19rem;
}

/* Native date controls can have an intrinsic width on mobile browsers. */
@media (max-width: 640px) {
    .shell .registry-form input[type="datetime-local"] {
        width: 100%;
    }
}

/* Event FAQ editor follows the existing responsive form panels. */
.faq-editor-row { border: 1px solid var(--border, #e5ded0); border-radius: 12px; padding: 1rem; margin-block: 1rem; }
.faq-editor-row textarea { min-height: 6rem; }
.faq-editor-row button { margin-top: .75rem; }
.event-editor-cover{max-width:640px;margin-block:1rem;border-radius:16px;overflow:hidden}
/* Shared record cards and filters, aligned with the HTML reference. */
.event-list-filters{display:flex;gap:.5rem;justify-content:flex-end;margin:1rem 0;align-items:center}
.shell .event-list-filters input{width:20rem;max-width:100%;min-width:0;margin:0}
.shell main :is(.event-list-filters,.registry-filter,.overview-filter-fields,.registration-filters,.people-search,.audit-filters)>:is(button,.action-link){margin:0;min-height:44px;flex-shrink:0}
.shell main .people-search{align-items:flex-end}
.shell main :is(.people-search,.registration-filters,.audit-filters)>label{margin:0}
.event-filter-tabs{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0 1.5rem}
.event-filter-tabs a,.shell .pagination a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:.45rem .85rem;border:1px solid var(--line,#e5ded0);border-radius:10px;background:#fff;color:var(--ink,#14213f);text-decoration:none}
.event-filter-tabs a[aria-current=page]{background:#14213f;color:#fff;border-color:#14213f}
.event-status{font-size:.75rem;align-self:flex-start;background:#f3eddf;border-radius:20px;padding:.2rem .6rem}
.event-stock{display:flex;align-items:center;gap:.6rem;font-size:.75rem;margin-top:.75rem;flex-wrap:wrap}
.event-stock progress{flex:1;min-width:60px;width:100px;height:6px;accent-color:#c99945}
.mobile-cell-label{display:none}
.image-editor .registry-form{background:transparent;border:0;box-shadow:none;padding:0}
.image-file-picker{padding:1.5rem;border:1px dashed #b3a48a;border-radius:12px;background:#faf8f3;display:grid;gap:1rem}
.image-file-picker label{display:grid;gap:.35rem;cursor:pointer}.image-file-picker label span{font-size:.875rem;color:#526181}
.image-file-picker input::file-selector-button{border:1px solid #e5ded0;border-radius:8px;padding:.6rem;background:white;color:#14213f;cursor:pointer;margin-right:.5rem}
.ticket-description{font-size:.8rem;line-height:1.5;color:#526181;white-space:pre-line;overflow-wrap:anywhere}
@media(max-width:640px){
 .event-list-filters{justify-content:stretch}.shell .event-list-filters input{flex:1;width:0}
 .shell .table-region:has(.responsive-records){overflow:visible;border:0;background:transparent}
 .shell table.responsive-records{display:block;width:100%;min-width:0;border:0}
 .responsive-records caption{display:block;text-align:left;margin-bottom:.75rem}
 .responsive-records thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .responsive-records tbody{display:grid;gap:1rem}
 .shell .responsive-records tr{display:grid;gap:.75rem;border:1px solid var(--line,#e5ded0);border-radius:12px;padding:1rem;background:#fff}
 .shell .responsive-records td{display:block;min-width:0;max-width:100%;padding:0;border:0;white-space:normal;overflow-wrap:anywhere}
 .responsive-records td .mobile-cell-label{display:block;color:#526181;font-size:.75rem;font-weight:600;margin-bottom:.25rem}
 .responsive-records td details,.responsive-records td form{max-width:100%;min-width:0}
}

.welcome-dialog{width:min(720px,calc(100vw - 2rem));text-align:center;padding:2rem;border-radius:20px}
.welcome-dialog .welcome-hero{background:transparent;color:#14213f;padding:1rem;box-shadow:none}
.welcome-dialog .welcome-hero p{color:#526181}.welcome-dialog .welcome-hero h1{font-size:clamp(1.5rem,4vw,2.2rem)}
.welcome-dialog .welcome-hero .primary-link{margin:1rem auto}.welcome-dialog>button{margin:auto}
/* Buyer tabs use the understated underline treatment of the reference. */
.shell .account-tabs{gap:1.5rem;border-bottom:1px solid var(--line);margin-top:1.5rem}
.shell .account-tabs a{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:.75rem 0;color:var(--mute)}
.shell .account-tabs a[aria-current=page]{border-bottom-color:var(--gold);color:var(--ink);background:transparent}
.image-file-picker>span{font-size:.875rem;color:var(--mute)}
@media(max-width:640px){
 .shell .catalog-entry .responsive-records tr{grid-template-columns:repeat(2,minmax(0,1fr))}
}

.fee-mode-selector { display:inline-flex; flex-wrap:wrap; gap:3px; padding:3px; border:1px solid #e6dccb; border-radius:10px; background:#f8f6f0; }
.fee-mode-selector label { margin:0; position:relative; cursor:pointer; }
.fee-mode-selector input { position:absolute; width:1px; height:1px; opacity:0; }
.fee-mode-selector span { display:block; padding:10px 14px; border-radius:7px; font-size:.9rem; }
.fee-mode-selector input:checked + span { background:var(--gold); color:var(--ink); font-weight:600; box-shadow:0 1px 4px #16234222; }
.fee-mode-selector input:focus-visible + span { outline:2px solid #ad853b; outline-offset:2px; }
.event-cover-selection { display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
.event-cover-selection img { width:176px; height:96px; object-fit:cover; border-radius:10px; }
.event-cover-selection input[type=file] { display:block; max-width:100%; margin-top:10px; }
.event-cover-selection > div { flex:1 1 220px; min-width:0; }
@media(max-width:480px) { .fee-mode-selector { display:flex; } .fee-mode-selector label { flex:1; text-align:center; } }

.participant-contact-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.participant-contact-grid > div { min-width:0; }
@media(max-width:640px) { .participant-contact-grid { grid-template-columns:1fr; } }
/* Keep library actions distinct from the import controls, including mobile stacking. */
.shell .faq-library-import{margin-bottom:16px;align-items:end}
.shell .event-cover-picker input[type=file]::file-selector-button{padding:.55rem .85rem;margin-right:.75rem;border:1px solid var(--line,#e5ded0);border-radius:8px;background:#fff;color:var(--ink,#14213f);cursor:pointer}

.shell .publication-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px;align-items:center}
.shell .publication-actions>button{margin:0}

/* Shared spacing for actions following a field in normal document flow.
   Inline filters and quantity steppers retain their own gap/layout. */
.shell main :is(form, fieldset, dialog):not(.registry-filter):not(.event-list-filters):not(.invite-form)
> :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]), select, textarea, label.check, label:has(> input[type=checkbox]))
+ :is(button:not(.text-button), .action-link, .form-actions) { margin-block-start: 12px; }
.shell main :is(form, fieldset, dialog) > label:has(> input[type=checkbox]) + button { display:flex; width:fit-content; max-width:100%; }
.shell main .form-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-block:16px 0; }
.shell main .form-actions > :is(button,a) { margin:0; max-width:100%; }
.shell main form + :is(button[data-editor-close], .action-link),
.shell main .action-link + form { margin-block-start:12px; }
.shell main .registry-filter > div { min-width:0; flex:1 1 240px; }
.shell main .registry-filter > button { margin:0; flex:0 0 auto; }
@media(max-width:640px){
 .shell main .registry-filter { display:flex; flex-direction:column; align-items:stretch; gap:12px; }
 .shell main .registry-filter > div { flex:auto; }
 .shell main .registry-filter > button { align-self:flex-start; width:auto; }
}
.money-input { text-align:right; font-variant-numeric:tabular-nums; }
