/* ============================================================
   New-expert modal (shared modal/switch styles used app-wide)
   ============================================================ */
.mscrim{position:fixed;inset:0;background:rgba(20,35,28,.34);opacity:0;pointer-events:none;transition:opacity .16s ease;z-index:60}
.mscrim.open{opacity:1;pointer-events:auto}
.modal{
  position:fixed;top:50%;left:50%;transform:translate(-50%,-48%);
  width:min(640px,94vw);max-height:90vh;
  background:var(--surface);border-radius:16px;
  box-shadow:0 24px 70px -20px rgba(20,40,30,.4);
  display:flex;flex-direction:column;overflow:hidden;
  z-index:61;opacity:0;pointer-events:none;
  transition:opacity .16s ease,transform .16s cubic-bezier(.32,.72,0,1);
}
.modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%)}
.modal form{display:flex;flex-direction:column;min-height:0}
.modal__head{display:flex;align-items:center;justify-content:space-between;padding:22px 26px 18px;border-bottom:1px solid var(--line)}
.modal__head h2{font-family:'Bricolage Grotesque',sans-serif;font-weight:600;font-size:25.5px;letter-spacing:-.02em;margin:0}
.modal__close{border:none;background:transparent;color:var(--ink-2);width:39px;height:39px;border-radius:9px;display:grid;place-items:center}
.modal__close:hover{background:#F0F2F5;color:var(--ink)}
.modal__close svg{width:20.5px;height:20.5px}
.modal__body{overflow:auto;padding:24px 26px}
.modal__foot{
  display:flex;align-items:center;justify-content:flex-end;gap:10px;
  padding:16px 26px;border-top:1px solid var(--line);background:var(--surface);
}
.modal__foot .spacer{flex:1}

/* form fields */
.fld{margin-bottom:18px}
.fld > label{display:block;font-size:15.5px;font-weight:500;color:var(--ink-2);margin-bottom:7px}
.fld .req{color:#c0564c;margin-left:3px}
.fld input[type=text],.fld input[type=number],.fld input[type=date],.fld input[type=time],.fld input[type=datetime-local],.fld input[type=url],.fld input[type=email],.fld input[type=tel],.fld input[type=password],.fld select,.fld textarea{
  width:100%;border:1px solid var(--line-strong);border-radius:10px;
  padding:11px 13px;font-size:16.5px;color:var(--ink);background:var(--surface);
  font-family:inherit;
}
.fld textarea{resize:vertical;min-height:76px}
.fld input:focus,.fld select:focus,.fld textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 16%,transparent)}
.fld__hint{font-size:12.5px;color:var(--ink-3);margin-top:5px;line-height:1.45}

/* ---- visually hidden but still focusable/clickable (e.g. a file input
   triggered by its <label>, or a checkbox driven entirely by JS) ---- */
.visually-hidden{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0;
}

/* ---- image upload (event cover, expert photo, ...) ---- */
.coverupload{display:flex;gap:18px;align-items:flex-start}
.coverupload__preview{
  position:relative;width:180px;height:120px;flex:0 0 auto;border-radius:12px;overflow:hidden;
  border:1px solid var(--line-strong);background:#F3F5F1;display:grid;place-items:center;
}
.coverupload__preview img{width:100%;height:100%;object-fit:cover;display:block}
.coverupload__placeholder{
  display:none;flex-direction:column;align-items:center;gap:6px;color:var(--ink-3);font-size:12.5px;text-align:center;padding:0 10px;
}
.coverupload__placeholder svg{width:24px;height:24px}
.coverupload__preview.is-empty .coverupload__placeholder{display:flex}
.coverupload__side{flex:1;min-width:0;padding-top:2px}

/* round variant — headshots (e.g. expert photo) instead of a landscape cover */
.coverupload__preview--round{width:96px;height:96px;border-radius:50%}
.coverupload__preview--round .coverupload__placeholder{font-size:10.5px;gap:4px;padding:0 6px}
.coverupload__preview--round .coverupload__placeholder svg{width:20px;height:20px}

/* square variant — a startup logo instead of a landscape cover */
.coverupload__preview--square{width:96px;height:96px;border-radius:14px}
.coverupload__preview--square .coverupload__placeholder{font-size:10.5px;gap:4px;padding:0 6px}
.coverupload__preview--square .coverupload__placeholder svg{width:20px;height:20px}
.coverupload__btn{display:inline-block;padding:9px 16px;font-size:14.5px;border:1px solid var(--line-strong);cursor:pointer}
.coverupload__btn:hover{background:#F0F2F5}
.coverupload__btn--danger{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 35%,var(--line-strong))}
.coverupload__btn--danger:hover{background:color-mix(in srgb,var(--danger) 8%,white)}
.fld__err{font-size:14.5px;color:#c0564c;margin-top:6px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* ---- toggle switch ---- */
.switch{display:inline-flex;align-items:center;gap:10px;font-size:16.5px;font-weight:500;color:var(--ink);cursor:pointer;margin-bottom:0}
.switch input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.switch__track{position:relative;width:41.5px;height:24px;border-radius:11px;background:var(--line-strong);flex:0 0 auto;transition:background-color .15s}
.switch__track::after{content:"";position:absolute;top:2px;left:2px;width:19.5px;height:19.5px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(20,30,20,.35);transition:transform .15s}
.switch input:checked + .switch__track{background:var(--accent)}
.switch input:checked + .switch__track::after{transform:translateX(18px)}
.switch input:focus-visible + .switch__track{outline:2px solid var(--accent);outline-offset:2px}

/* team picker chips */
.pick{display:flex;flex-wrap:wrap;gap:8px}
.pick--scroll{max-height:220px;overflow-y:auto;padding:2px;margin-top:8px}
.pickchip[hidden]{display:none}
.pickchip{
  border:1px solid var(--line-strong);background:var(--surface);color:var(--ink-2);
  font-size:15.5px;font-weight:500;padding:7px 12px;border-radius:20px;
  display:inline-flex;align-items:center;gap:7px;transition:all .12s;cursor:pointer;
}
.pickchip:hover{border-color:var(--ink-3)}
.pickchip.on{
  border-color:transparent;background:color-mix(in srgb,var(--accent) 12%,white);color:var(--accent-ink);
}
.pickchip input{position:absolute;opacity:0;width:0;height:0}
.pickchip .pav{
  width:23px;height:23px;border-radius:50%;display:grid;place-items:center;
  font-size:10.5px;font-weight:700;
  background:var(--surface);border:1.5px dashed var(--line-strong);color:var(--accent);
}

.btn-solid,.btn-ghost{display:inline-block;text-decoration:none}
.btn-solid{border:none;background:var(--accent);color:#fff;font-weight:600;font-size:16.5px;padding:11px 20px;border-radius:10px;transition:filter .12s}
.btn-solid:hover{filter:brightness(1.07)}
.btn-solid--danger{background:var(--danger)}
.btn-ghost{border:none;background:transparent;color:var(--ink-2);font-weight:500;font-size:16.5px;padding:11px 12px;border-radius:10px}
.btn-ghost:hover{background:#F0F2F5;color:var(--ink)}
.pedit__save{border:1px solid var(--line-strong)}
.btn-ghost.onepager-btn{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line-strong);width:44px;padding:11px}
.btn-ghost.onepager-btn svg{width:18px;height:18px;flex:0 0 auto}

/* ---- full-page form (e.g. the event edit page) ---- */
.formcard{max-width:640px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:28px 26px}
.formcard__foot{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:6px}
.formcard__foot .spacer{flex:1}

/* ---- bigger tab switcher sitting above the form card ---- */
.savedbanner{
  background:color-mix(in srgb,var(--accent) 10%,white);color:var(--accent-ink);
  border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:10px;
  padding:11px 16px;font-size:14.5px;font-weight:500;margin-bottom:18px;
  transition:opacity .3s ease;
}
.savedbanner.is-hidden{opacity:0}

.edittabs{margin-bottom:18px;padding:5px}
.edittabs button{font-size:16.5px;padding:10px 20px}

/* ---- status field, pinned to the top of Event information ---- */
.statusfld{margin-bottom:24px}
.statuscard{
  display:flex;gap:28px;align-items:flex-start;
  background:var(--surface);border:1.5px dashed var(--line-strong);border-radius:12px;
  padding:18px 20px;
}
.statusswitches{display:flex;flex-direction:column;gap:12px;flex:0 0 auto}
.statusswitch{font-size:15.5px;font-weight:500;color:var(--ink)}
.statusdesc{flex:1;min-width:0;display:flex;flex-direction:column;gap:9px;padding-left:22px;border-left:1px solid var(--line)}
.statusdesc p{margin:0;font-size:13px;line-height:1.5;color:var(--ink-3)}
.statusdesc strong{color:var(--ink-2)}
@media (max-width:600px){
  .statuscard{flex-direction:column}
  .statusdesc{padding-left:0;border-left:none;padding-top:14px;border-top:1px solid var(--line)}
}

/* ---- registered-people list (Registered tab) ---- */
.formcard--wide{max-width:960px}
.regsummary{display:flex;align-items:baseline;gap:8px;margin-bottom:20px}
.regsummary__count{font-family:'Bricolage Grotesque',sans-serif;font-weight:700;font-size:28px;color:var(--ink)}
.regsummary__cap{font-weight:500;color:var(--ink-3);font-size:20px}
.regsummary__label{color:var(--ink-2);font-size:15px}
.regtable-wrap{overflow-x:auto}
.regtable{width:100%;border-collapse:collapse;font-size:14.5px}
.regtable th{
  text-align:left;padding:10px 14px;border-bottom:1px solid var(--line-strong);
  color:var(--ink-3);font-weight:500;font-size:12px;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap;
}
.regtable td{padding:12px 14px;border-bottom:1px solid var(--line);color:var(--ink);white-space:nowrap}
.regtable tr:last-child td{border-bottom:none}

/* ---- public link share row — a div, not an input, so it doesn't look
   editable; the accompanying button is icon-only ---- */
.pubshare{display:flex;align-items:center;gap:8px}
.pubshare__link{
  flex:1;min-width:0;border:1px solid var(--line);border-radius:10px;
  padding:11px 13px;font-size:15px;color:var(--ink-3);background:#F3F5F1;font-family:inherit;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default;
}
.pubshare__copy{
  flex:0 0 auto;border:1px solid var(--line-strong);background:var(--surface);color:var(--ink-2);
  width:41px;height:41px;border-radius:10px;display:grid;place-items:center;cursor:pointer;
}
.pubshare__copy svg{width:17px;height:17px}
.pubshare__copy:hover{background:#F0F2F5;color:var(--ink)}
.pubshare__copy.is-copied{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 40%,var(--line-strong))}

/* ---- built-in registration field rows (Form management tab) ---- */
.fmrow{display:flex;align-items:center;gap:14px;padding:13px 0;border-bottom:1px solid var(--line)}
.fmrow:last-child{border-bottom:none}
.fmrow__name{flex:1;font-weight:500;color:var(--ink)}
.fmrow__fixed{font-size:14px;color:var(--ink-3)}
.fmrow__toggles{display:flex;gap:22px}
.fmrow__switch,.cfrow__switch{font-size:14.5px;color:var(--ink-2);gap:8px}
.fmrow__switch .switch__track,.cfrow__switch .switch__track{width:34px;height:20px;border-radius:10px}
.fmrow__switch .switch__track::after,.cfrow__switch .switch__track::after{width:15.5px;height:15.5px}
.fmrow__switch input:checked + .switch__track::after,.cfrow__switch input:checked + .switch__track::after{transform:translateX(14px)}
.cfrow__switch--danger input:checked + .switch__track{background:var(--danger)}

/* ---- custom registration-field rows ---- */
.cfrow{display:flex;align-items:center;gap:16px;margin-bottom:10px}
.cfrow input[type=text]{flex:1;min-width:0}

/* "+ Add question" styled like an empty, dashed input rather than a
   button, so it reads as a place to add the next question, not an action */
.addfieldbtn{
  display:block;width:100%;text-align:left;cursor:pointer;
  border:1.5px dashed var(--line-strong);border-radius:10px;background:transparent;
  padding:11px 13px;font-size:15px;color:var(--ink-3);font-family:inherit;
}
.addfieldbtn:hover{border-color:var(--ink-3);color:var(--ink-2);background:#FAFBF9}

/* ---- confirm dialog (see static/js/confirm.js) ---- */
.confirm-modal{width:min(420px,92vw)}
.confirm-modal__msg{font-size:16.5px;color:var(--ink-2);line-height:1.5;margin:0}

@media (max-width:600px){
  .grid2{grid-template-columns:1fr}
}
