/* Nevaeh's own form controls (public/js/nv-controls.js): dropdown lists, date/time/colour pickers, form messages,
   tooltips, checkboxes and radios — shared by the site and the admin. Loaded before each stylesheet, so a page's own
   field styles still decide size and spacing. */
:root {
  --nv-ink: var(--ink, #2b2030); --nv-muted: var(--muted, #85778a); --nv-line: var(--line, #ece3de);
  --nv-rose: var(--rose-600, #9b5d73); --nv-rose-d: var(--rose-700, #7d4258); --nv-rose-l: var(--rose-100, #faeef0); --nv-rose-m: var(--rose-200, #f3d9de);
  --nv-gold: var(--gold-500, #c49a6c); --nv-bad: #b5485d;
  --nv-grad: linear-gradient(135deg, #e9b7a8, #c98a9a 45%, #9b5d73);
  --nv-ease: cubic-bezier(.2, .7, .1, 1);
  --nv-shadow: 0 2px 6px rgba(42, 24, 48, .06), 0 22px 48px -18px rgba(42, 24, 48, .38);
}

/* ── Triggers ───────────────────────────────────────────────────────────────────────────────────────────────── */
select.nv-select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%239b5d73' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: right 13px center !important; background-size: 12px 8px !important;
  padding-right: 36px !important; text-overflow: ellipsis;
}
select.nv-select[aria-expanded="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 6.5l5-5 5 5' stroke='%239b5d73' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
select.nv-select:disabled { cursor: not-allowed; opacity: .6; }
input.nv-field.nv-field.nv-field { cursor: pointer; caret-color: transparent; padding-right: 40px; background-repeat: no-repeat; background-position: right 13px center; background-size: 17px 17px; text-overflow: ellipsis; }
input.nv-field.nv-field:disabled { cursor: not-allowed; opacity: .6; }
input.nv-date-field.nv-field.nv-field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b5d73' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
input.nv-time-field.nv-field.nv-field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b5d73' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7.5V12l3 2'/%3E%3C/svg%3E"); }
input.nv-color-field.nv-field.nv-field { padding-left: 42px; background-image: radial-gradient(circle at 21px 50%, var(--nv-swatch) 10px, rgba(42, 24, 48, .12) 10.5px, transparent 11.5px); background-position: 0 0; background-size: auto; max-width: 180px; letter-spacing: .04em; }
.hours-row input.nv-time-field { width: 140px; }
@media (max-width: 760px) { .hours-row input.nv-time-field { width: 128px; } }

/* ── The floating layer ─────────────────────────────────────────────────────────────────────────────────────── */
.nv-pop {
  position: fixed; inset: auto; margin: 0; padding: 0; border: 1px solid var(--nv-line); color: var(--nv-ink);
  background: #fff; box-shadow: var(--nv-shadow); font: 14.5px/1.45 var(--sans, 'Manrope', system-ui, sans-serif);
  display: flex; flex-direction: column; overflow: hidden; z-index: 2147483000; box-sizing: border-box;
  opacity: 0; transition: opacity .16s ease, transform .2s var(--nv-ease);
}
.nv-pop *, .nv-pop *::before { box-sizing: border-box; }
.nv-float { border-radius: 16px; transform: translateY(-6px) scale(.98); transform-origin: top left; max-width: calc(100vw - 16px); }
.nv-float.nv-up { transform: translateY(6px) scale(.98); transform-origin: bottom left; }
.nv-float.nv-in { opacity: 1; transform: none; }
.nv-sheet { left: 0; right: 0; bottom: 0; width: 100%; max-height: 82vh; border-radius: 24px 24px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); transform: translateY(100%); opacity: 1; transition: transform .3s var(--nv-ease); }
.nv-sheet::before { content: ''; display: block; flex: none; width: 40px; height: 4px; border-radius: 9px; background: var(--nv-rose-m); margin: 9px auto 3px; }
.nv-sheet.nv-in { transform: none; }
.nv-backdrop { position: fixed; inset: 0; margin: 0; padding: 0; border: 0; width: auto; height: auto; background: rgba(30, 18, 34, .42); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; z-index: 2147482999; }
.nv-backdrop.nv-in { opacity: 1; }
.nv-pop button { font: inherit; color: inherit; border: 0; background: none; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nv-pop button:disabled { cursor: default; }
.nv-pop button:focus-visible { outline: 2px solid var(--nv-rose); outline-offset: 1px; }
.nv-pop-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px 12px; border-top: 1px solid var(--nv-line); flex: none; }
.nv-link { padding: 7px 10px !important; border-radius: 10px; font-weight: 700 !important; font-size: .86rem !important; color: var(--nv-rose) !important; transition: background .15s; }
.nv-link:hover { background: var(--nv-rose-l) !important; }
.nv-link.nv-muted { color: var(--nv-muted) !important; }
.nv-link[hidden] { display: none; }
.nv-pop-foot .nv-link:only-child, .nv-pop-foot .nv-link[hidden] + .nv-link { margin-left: auto; }
.nv-btn { padding: 8px 18px !important; border-radius: 99px; font-weight: 700 !important; font-size: .86rem !important; color: #fff !important; background: var(--nv-grad) !important; box-shadow: 0 6px 16px -8px rgba(125, 66, 88, .7); margin-left: auto !important; }

/* ── Dropdown list ──────────────────────────────────────────────────────────────────────────────────────────── */
.nv-list { max-width: min(440px, calc(100vw - 16px)); }
.nv-sheet.nv-list { max-width: none; }
.nv-search { padding: 8px; border-bottom: 1px solid var(--nv-line); flex: none; }
.nv-search input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--nv-line); border-radius: 10px; outline: none; font: inherit; color: var(--nv-ink); background: #fdf9f7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2385778a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E") no-repeat 11px center / 15px; }
.nv-search input:focus { border-color: var(--rose-400, #dba6b3); box-shadow: 0 0 0 3px rgba(219, 166, 179, .25); background-color: #fff; }
.nv-opts { overflow-y: auto; overscroll-behavior: contain; padding: 6px; flex: 1 1 auto; min-height: 0; scroll-padding: 34px 0 6px; }
.nv-group { position: sticky; top: -6px; z-index: 1; background: rgba(255, 255, 255, .96); padding: 10px 12px 5px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-600, #a97f52); }
.nv-group:first-child { padding-top: 6px; }
.nv-opt { position: relative; padding: 9px 14px 9px 36px; border-radius: 10px; cursor: pointer; transition: background .12s, color .12s; user-select: none; -webkit-user-select: none; }
.nv-opt::before { content: ''; position: absolute; left: 13px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; background: var(--nv-rose); opacity: 0; transform: scale(.5); transition: opacity .15s, transform .2s var(--nv-ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' stroke='black' stroke-width='2.2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.nv-opt.is-active { background: var(--nv-rose-l); color: var(--nv-rose-d); }
.nv-opt.is-selected { color: var(--nv-rose-d); font-weight: 700; }
.nv-opt.is-selected::before { opacity: 1; transform: none; }
.nv-opt.is-disabled { color: #bdb1bf; cursor: not-allowed; }
.nv-opt[hidden], .nv-group[hidden], .nv-empty[hidden] { display: none; }
.nv-empty { padding: 14px; text-align: center; color: var(--nv-muted); font-size: .9rem; }
.nv-sheet .nv-opt { padding-top: 13px; padding-bottom: 13px; font-size: 1rem; }

/* ── Date picker ────────────────────────────────────────────────────────────────────────────────────────────── */
.nv-cal, .nv-time, .nv-color { overflow-y: auto; overscroll-behavior: contain; } /* only scrolls in a very short window */
.nv-cal > *, .nv-time > *, .nv-color > * { flex: none; }
.nv-cal { width: 312px; }
.nv-sheet.nv-cal { width: 100%; }
.nv-cal-head { display: flex; align-items: center; gap: 4px; padding: 12px 10px 6px; flex: none; }
.nv-cal-title { flex: 1; padding: 6px 10px !important; border-radius: 10px; font-family: var(--serif, 'Cormorant Garamond', Georgia, serif) !important; font-size: 1.32rem !important; font-weight: 500 !important; color: var(--nv-ink) !important; transition: background .15s; }
.nv-cal-title b { font-weight: 600; color: var(--nv-rose); }
.nv-cal-title:hover { background: var(--nv-rose-l) !important; }
.nv-cal-nav { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; transition: background .15s, transform .15s; }
.nv-cal-nav svg { width: 17px; height: 17px; stroke: var(--nv-rose); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.nv-cal-nav:hover:not(:disabled) { background: var(--nv-rose-l) !important; }
.nv-cal-nav:active:not(:disabled) { transform: scale(.92); }
.nv-cal-nav:disabled { opacity: .3; }
.nv-cal-body { padding: 0 12px 10px; overflow: hidden; }
.nv-slide-l { animation: nvSlideL .26s var(--nv-ease); } .nv-slide-r { animation: nvSlideR .26s var(--nv-ease); }
@keyframes nvSlideL { from { opacity: 0; transform: translateX(18px); } }
@keyframes nvSlideR { from { opacity: 0; transform: translateX(-18px); } }
.nv-cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nv-muted); padding: 4px 0 6px; }
.nv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.nv-day { aspect-ratio: 1; min-height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: .92rem !important; font-weight: 600 !important; font-variant-numeric: tabular-nums; position: relative; transition: background .14s, color .14s, transform .14s; }
.nv-day:hover:not(:disabled):not(.is-selected) { background: var(--nv-rose-l) !important; color: var(--nv-rose-d) !important; }
.nv-day:active:not(:disabled) { transform: scale(.9); }
.nv-day.is-out { color: #c3b8c5 !important; font-weight: 500 !important; }
.nv-day.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1.5px var(--nv-gold); color: var(--gold-600, #a97f52) !important; }
.nv-day.is-selected { background: var(--nv-grad) !important; color: #fff !important; box-shadow: 0 6px 14px -6px rgba(125, 66, 88, .75); animation: nvPop .3s var(--nv-ease); }
.nv-day:disabled { color: #d8cfd9 !important; text-decoration: line-through; text-decoration-color: rgba(181, 72, 93, .25); }
@keyframes nvPop { 0% { transform: scale(.7); } 60% { transform: scale(1.08); } }
.nv-cal-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 4px; }
.nv-cell { padding: 13px 0 !important; border-radius: 12px; font-weight: 600 !important; transition: background .14s, color .14s; }
.nv-cell:hover:not(:disabled):not(.is-selected) { background: var(--nv-rose-l) !important; color: var(--nv-rose-d) !important; }
.nv-cell.is-today:not(.is-selected) { box-shadow: inset 0 0 0 1.5px var(--nv-gold); }
.nv-cell.is-selected { background: var(--nv-grad) !important; color: #fff !important; }
.nv-cell:disabled { color: #d8cfd9 !important; }
.nv-sheet .nv-day { min-height: 44px; font-size: 1rem !important; }

/* ── Time picker ────────────────────────────────────────────────────────────────────────────────────────────── */
.nv-time { width: 282px; }
.nv-sheet.nv-time { width: 100%; }
.nv-time-show { text-align: center; padding: 14px 12px 6px; font-family: var(--serif, 'Cormorant Garamond', Georgia, serif); font-size: 1.9rem; font-weight: 500; color: var(--nv-ink); font-variant-numeric: tabular-nums; flex: none; }
.nv-time-show.nv-muted { color: #c3b8c5; }
.nv-time-cols { display: grid; grid-template-columns: 1fr 1fr .9fr; gap: 6px; padding: 6px 10px 10px; min-height: 0; }
.nv-time-col { max-height: 216px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 2px; scroll-snap-type: y proximity; scrollbar-width: none; position: relative;
  -webkit-mask: linear-gradient(transparent, #000 18px, #000 calc(100% - 18px), transparent); mask: linear-gradient(transparent, #000 18px, #000 calc(100% - 18px), transparent); padding: 14px 0; }
.nv-time-col::-webkit-scrollbar { display: none; }
.nv-time-col.nv-ap { justify-content: center; -webkit-mask: none; mask: none; }
.nv-tcell { padding: 8px 0 !important; border-radius: 10px; font-weight: 600 !important; font-variant-numeric: tabular-nums; scroll-snap-align: center; transition: background .14s, color .14s; flex: none; }
.nv-tcell:hover:not(.is-selected) { background: var(--nv-rose-l) !important; color: var(--nv-rose-d) !important; }
.nv-tcell.is-selected { background: var(--nv-grad) !important; color: #fff !important; box-shadow: 0 6px 14px -8px rgba(125, 66, 88, .8); }
.nv-sheet .nv-time-col { max-height: 260px; }
.nv-sheet .nv-tcell { padding: 11px 0 !important; font-size: 1.05rem !important; }

/* ── Colour picker ──────────────────────────────────────────────────────────────────────────────────────────── */
.nv-color { width: 236px; padding: 14px; gap: 12px; }
.nv-sheet.nv-color { width: 100%; padding: 14px 18px 18px; }
.nv-swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; justify-items: center; }
.nv-swatch { width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); transition: transform .15s var(--nv-ease), box-shadow .15s; }
.nv-swatch:hover { transform: scale(1.1); }
.nv-swatch.is-selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--nv-rose); }
.nv-hex { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--nv-line); border-radius: 12px; }
.nv-hex-dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); flex: none; }
.nv-pop .nv-hex input[type=text] { width: auto; border-radius: 0; border: 0 !important; box-shadow: none !important; background: none !important; }
.nv-hex input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 2px 0; font: 600 .95rem/1.2 ui-monospace, 'SF Mono', Menlo, monospace; text-transform: uppercase; color: var(--nv-ink); background: none; }

/* ── Form messages ──────────────────────────────────────────────────────────────────────────────────────────── */
.nv-err { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: .84rem; font-weight: 600; color: var(--nv-bad); animation: nvErr .3s var(--nv-ease); }
.nv-err::before { content: '!'; flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--nv-bad); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
@keyframes nvErr { from { opacity: 0; transform: translateY(-4px); } }
.nv-invalid, input.nv-invalid.nv-field { border-color: var(--nv-bad) !important; box-shadow: 0 0 0 3px rgba(181, 72, 93, .14) !important; animation: nvShake .38s ease; }
label.nv-invalid, .icon-pick.nv-invalid { box-shadow: none !important; color: var(--nv-bad); }
@keyframes nvShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* ── Tooltips ───────────────────────────────────────────────────────────────────────────────────────────────── */
.nv-tip { position: fixed; inset: auto; margin: 0; border: 0; z-index: 2147483001; max-width: 260px; padding: 6px 10px; border-radius: 9px; background: var(--plum-800, #2a1830); color: #fff; font: 600 .78rem/1.35 var(--sans, 'Manrope', system-ui, sans-serif); box-shadow: 0 8px 20px -8px rgba(30, 18, 34, .6); pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .14s ease, transform .18s var(--nv-ease); }
.nv-tip.nv-in { opacity: 1; transform: none; }

/* ── Checkboxes, radios, numbers, file buttons ──────────────────────────────────────────────────────────────── */
input[type=checkbox]:not(.toggle input):not(.icon-pick input), input[type=radio]:not(.icon-pick input) {
  -webkit-appearance: none; appearance: none; width: 19px !important; height: 19px !important; flex: none; cursor: pointer;
  border: 1.5px solid var(--rose-400, #dba6b3); border-radius: 6px; background: #fff; display: inline-grid; place-content: center; vertical-align: -4px;
  transition: background .18s, border-color .18s, box-shadow .18s; padding: 0 !important;
}
input[type=radio]:not(.icon-pick input) { border-radius: 50%; }
input[type=checkbox]:not(.toggle input):not(.icon-pick input)::before {
  content: ''; width: 11px; height: 11px; background: #fff; transform: scale(0) rotate(-12deg); transition: transform .22s var(--nv-ease);
  clip-path: polygon(14% 44%, 0 62%, 40% 100%, 100% 22%, 84% 7%, 39% 65%);
}
input[type=radio]:not(.icon-pick input)::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .22s var(--nv-ease); }
input[type=checkbox]:not(.toggle input):not(.icon-pick input):checked, input[type=radio]:not(.icon-pick input):checked { background: var(--nv-grad); border-color: transparent; box-shadow: 0 4px 10px -5px rgba(125, 66, 88, .8); }
input[type=checkbox]:not(.toggle input):not(.icon-pick input):checked::before, input[type=radio]:not(.icon-pick input):checked::before { transform: none; }
input[type=checkbox]:not(.toggle input):not(.icon-pick input):hover:not(:checked):not(:disabled), input[type=radio]:not(.icon-pick input):hover:not(:checked):not(:disabled) { border-color: var(--nv-rose); background: var(--nv-rose-l); }
input[type=checkbox]:not(.toggle input):focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--nv-rose); outline-offset: 2px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .45; cursor: not-allowed; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=file] { font: inherit; font-size: .88rem; color: var(--nv-muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; font-size: .86rem; color: var(--nv-rose-d); background: var(--nv-rose-l); border: 1px solid var(--nv-rose-m); border-radius: 99px; padding: 8px 16px; margin-right: 12px; cursor: pointer; transition: background .15s, border-color .15s; }
input[type=file]::file-selector-button:hover { background: var(--nv-rose-m); border-color: var(--rose-400, #dba6b3); }

@media (prefers-reduced-motion: reduce) {
  .nv-pop, .nv-backdrop, .nv-tip { transition: opacity .1s linear !important; transform: none !important; }
  .nv-slide-l, .nv-slide-r, .nv-day.is-selected, .nv-err, .nv-invalid { animation: none !important; }
}
