/* ============================================================================
   Application chrome — shared defaults for the functional pages
   ----------------------------------------------------------------------------
   The tool pages (job-details, select-a-chef, weekly-inquiry, gift-certificates,
   submit-an-inquiry and friends) each carry their own component CSS in a page
   <style> block, with its own prefix: jd-*, sc-*, wi-*, gc-*, inq-*, oi-*, cd-*,
   cp-*, tier-*.

   Those blocks have been recoloured to the dark palette in place. This file
   carries what is common underneath them — form controls, tables, status
   colours — so each page doesn't restate it, and so anything a recolour missed
   still lands on a sensible dark default rather than white-on-white.

   Loaded AFTER cpc.css and BEFORE each page's own <style>, so a page can still
   override anything here.
   ========================================================================== */

/* ── Form controls ────────────────────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
select,
textarea {
  background: var(--dark-surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8rem 0.9rem;
}

input::placeholder,
textarea::placeholder { color: var(--white-muted); }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gold);
}

input:disabled,
select:disabled,
textarea:disabled { opacity: 0.45; cursor: not-allowed; }

/* Dark UI needs the native controls told, or date/number pickers render light */
input, select, textarea { color-scheme: dark; }

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white-dim);
}

input[type="checkbox"],
input[type="radio"] { accent-color: var(--gold); width: 17px; height: 17px; }

fieldset { border: 1px solid var(--hairline); border-radius: 4px; }
legend { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }

/* ── Generic buttons that aren't .btn ─────────────────────────────────────── */

button {
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 4px;
}
button:disabled { opacity: 0.45; cursor: default; }

/* ── Tables ───────────────────────────────────────────────────────────────── */

table { border-collapse: collapse; width: 100%; }
th {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white-muted);
  text-align: left;
  border-bottom: 1px solid var(--hairline);
  padding: 0 0.9rem 0.6rem 0;
}
td {
  border-bottom: 1px solid var(--hairline);
  padding: 0.8rem 0.9rem 0.8rem 0;
  color: var(--white-dim);
  vertical-align: top;
}
td:first-child { color: var(--white); }

/* ── Status colours, tuned for a dark ground ──────────────────────────────── */
/* The light theme used #1a8a3f / #c62828, both of which go muddy on #0a0a0a. */

.is-ok,      .success, .sc-ok,  .jd-ok,  .oi-status.ok   { color: #5fbe84; }
.is-error,   .error,   .sc-err, .jd-err, .oi-status.err  { color: #e08a7a; }
.is-warning, .warning                                     { color: var(--gold); }

/* ── Loading / empty states ───────────────────────────────────────────────── */

[class$="-loading"],
[class$="-empty"] {
  color: var(--white-muted);
  text-align: center;
  padding: 3rem 0;
  font-size: 0.95rem;
}

/* ── Print ────────────────────────────────────────────────────────────────── */
/* A dark screen theme prints badly: the component CSS sets explicit dark
   surfaces and light text, so paper would come out as white text on white with
   heavy dark blocks. Reset to ink-on-paper.

   This lives in cpc-app.css, NOT cpc.css, on purpose — the two dedicated print
   sheets (meet-our-chefs, chef-table-tents) load only cpc.css and keep their
   dark-and-gold design on the page, which is the intent for a table tent. */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body { background: #fff !important; }

  h1, h2, h3 { color: #000 !important; }

  a { color: #000 !important; text-decoration: underline; }
  /* Spell out link targets — a printed page can't be clicked. */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.75em; word-break: break-all; }

  /* Chrome and controls carry no information on paper. */
  .nav, .footer, button, .btn, textarea,
  [class$="-btn"], [class*="-btn "], [class$="-actions"] { display: none !important; }

  /* Keep structure legible once the fills are gone. */
  [class$="-card"], [class*="-card "], fieldset, table, td, th {
    border: 1px solid #999 !important;
  }

  hr, .divider { border-color: #999 !important; }

  .page-head { border-bottom: 2px solid #c9a84c !important; padding: 0 0 1rem !important; }

  /* Don't split a card across a page break. */
  [class$="-card"], .feature, tr { break-inside: avoid; }
}

/* ── Visibility utilities carried over from Webflow ───────────────────────── */
/* Dropping webflow.css also dropped the rules that HID things. Without these,
   success modals and CMS-empty bindings render inline on the page. Replicated
   here with the same semantics, restyled for the dark ground. */

.hide,
.display-none,
.hide-mobile { display: none; }

.w-condition-invisible,
.w-dyn-hide,
.w-dyn-bind-empty { display: none !important; }

/* Modals: hidden by default, shown when JS adds .modal-fade */
.modal {
  z-index: 10000;
  display: none;
  position: fixed;
  inset: 0;
}
.modal.modal-fade,
.modal-fade {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(10, 10, 10, 0.88);
  position: fixed;
  inset: 0;
}
@supports (backdrop-filter: blur(6px)) {
  .modal.modal-fade, .modal-fade { backdrop-filter: blur(6px); }
}

/* The panel inside a modal */
.modal > div,
.modal-content {
  background: var(--dark-surface);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  max-width: 520px;
  width: calc(100% - 2.5rem);
  padding: 2rem;
  text-align: center;
}

.close-modal { cursor: pointer; color: var(--gold); }

/* Webflow form states */
.w-form-done,
.w-form-fail { display: none; padding: 1rem; text-align: center; border-radius: 4px; }
.w-form-done { background: #14231b; color: #5fbe84; }
.w-form-fail { background: #2a1a18; color: #e08a7a; }

/* ── CMS template hide / .show reveal ─────────────────────────────────────── */
/* content.js clones a template element per record and adds .show to each clone.
   Webflow's CSS is what kept the un-cloned TEMPLATE hidden — drop it and the
   "Chef Unique Nickname / Lorem ipsum" placeholder card renders above the real
   chefs. These carry that behaviour over.

   .card sets display:none via .card.chef-card below; the .show variants reveal. */

.card.chef-card,
.card.package-card { display: none; }

.card.chef-card.show,
.card.package-card.show { display: flex; padding: 0; }

.gallery-images.value,
.pricing-table,
.estimated-cost,
.package-information,
.region-based-info,
.inquiry-modal { display: none; }

/* Webflow hid this wrapper on desktop and revealed it only under 991px, so the
   chef-profile headshot never appeared on a large screen. Show it always. */
.div-block-61 { display: block; text-align: center; }

.gallery-images.value.show,
.pricing-table.show,
.package-information.show,
.region-based-info.show,
.inquiry-modal.show { display: block; }

.estimated-cost.show { display: block; margin-top: 10px; }

/* ── Chef gallery ─────────────────────────────────────────────────────────── */
/* .vertical-grid / .menu-grid were Webflow classes and went out with
   webflow.css, so the gallery had no layout at all: content.js appends every
   image as a sibling inside ONE wrapper div, and `.gallery-images.value.show`
   makes each display:block — full-bleed, stacked, at whatever height the
   source happens to be. Same shape of breakage as .w-input and .w-button.
   The grid goes on that inner wrapper, not on .vertical-grid itself, because
   the wrapper is what actually holds the images. */

.vertical-grid.menu-grid > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 1.5rem;
}

/* A uniform frame per tile — the galleries mix portrait and landscape, and
   without this one tall shot sets the height of its whole row. Matches the
   home page filmstrip's 4:3 and its slight desaturation. */
.vertical-grid.menu-grid > div > .gallery-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(.9) contrast(1.02);
  transition: filter .5s, transform .5s;
}
.vertical-grid.menu-grid > div > .gallery-image:hover {
  filter: saturate(1) contrast(1.04);
}

@media (max-width: 600px) {
  .vertical-grid.menu-grid > div {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }
}

.modal.show { display: block; z-index: 1000000; position: fixed; inset: 0; }

/* ── CMS card grid ────────────────────────────────────────────────────────── */
/* .w-layout-grid was a Webflow grid; without its CSS the cloned cards stack
   full-width and the chef directory runs to ten thousand pixels. Rebuilt in the
   design language rather than ported verbatim. */

.w-layout-grid {
  display: grid;
  grid-column-gap: 24px;
  grid-row-gap: 24px;
}

/* content.js clones each record into the bare <div> INSIDE .blog-grid, so the
   grid itself only ever has one child — which is why the original rendered 13
   chefs as a single 10,000px column. Make that inner wrapper the real grid. */
.blog-grid { grid-template-columns: 1fr; }

.blog-grid > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.card {
  border: 1px solid var(--hairline);
  background: var(--dark-surface);
  flex-direction: column;
  overflow: hidden;
  transition: border-color .3s;
}
.card:hover { border-color: rgba(201, 168, 76, .45); }

/* A chef card: headshot above, name and bio below. */
.card.chef-card.show,
.card.package-card.show {
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Chef headshots: circular, framed on the face.

   Most source images are already square, so cover crops nothing. The few
   portraits (e.g. 800x1000) do get cropped top and bottom — object-position
   biases the keep-zone upward so the crop takes the chest rather than the
   top of the head. */
.card .headshot {
  width: 168px;
  height: 168px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  margin: 1.75rem auto 0;
  display: block;
  border: 1px solid rgba(201, 168, 76, .35);
  transition: border-color .3s;
}
.card:hover .headshot { border-color: var(--gold); }

/* Any other image inside a card keeps the old behaviour. */
.card img:not(.headshot) { width: 100%; height: auto; object-fit: cover; }

.card .div-block-59,
.card > div:not(.headshot) { padding: 1.25rem 1.4rem 1.5rem; }

.card .blog-card-heading {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--white);
  margin: 0 0 .85rem;
  text-align: center;
}
.card .unique-nickname { color: var(--gold); }

.card .biography,
.card .text-small { font-size: .9rem; color: var(--white-dim); line-height: 1.65; text-align: left; }

@media (max-width: 680px) {
  .blog-grid > div { grid-template-columns: 1fr; }
}

/* The single-chef profile page uses the same .headshot class outside a .card —
   give it the same treatment at a larger size. */
.chef-headshot.chef-info,
.page-main > .container .headshot:not(.card .headshot) {
  width: 220px;
  height: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  display: block;
  margin: 0 auto 1.5rem;
  border: 1px solid rgba(201, 168, 76, .35);
}

/* ── Webflow form primitives still present in markup ──────────────────────── */
/* .w-input supplied width:100% and .w-button the padding. Dropping webflow.css
   left gift-certificates with 176px-wide fields and a "Purchase Gift
   Certificate" button rendering as bare gold text. Restyled, not ported. */

.w-input,
.w-select,
.inquiry-input {
  display: block;
  width: 100%;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  background: var(--dark-surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--white);
}

.w-button {
  display: inline-block;
  padding: 1rem 2.8rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--black);
  border: 1px solid var(--gold);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background .4s, color .4s;
}
.w-button:hover { background: var(--gold-light); color: var(--black); }

.w-inline-block { max-width: 100%; display: inline-block; }
.w-form { margin: 0 0 1rem; }

/* Stripe mounts its card iframe into this; give it the same field treatment. */
.StripeElement {
  background: var(--dark-surface);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.85rem 0.9rem;
}
.StripeElement--focus { border-color: var(--gold); }
.StripeElement--invalid { border-color: #e08a7a; }


/* ── Dashboard components ─────────────────────────────────────────────────── */
/* Shared by /admin-dashboard and /chef-dashboard. These lived in each page's
   own <style> block until both needed them; the weekly ones went missing from
   the admin dashboard entirely when open-weekly-inquiries.html was deleted. */

.oi-pill,
.oi-status-pill {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 3px;
  background: rgba(201, 168, 76, 0.15); color: var(--gold);
}
.oi-pill.is-none { background: #111113; color: rgba(245, 245, 243, 0.35); }
.oi-status-pill.is-done { background: rgba(95, 190, 132, 0.14); color: #5fbe84; }

/* Intake notes: clamped, with the padding added back so a note that exactly
   fills the box does not report as overflowing. */
.oi-notes {
  margin-top: 12px; padding: 12px 14px; background: #111113;
  border: 1px solid var(--hairline); border-radius: 6px;
  font-size: 14px; line-height: 1.6; color: var(--white-dim);
  white-space: pre-wrap; max-height: calc(7.2em + 24px);
  overflow: hidden; position: relative;
}
.oi-notes.is-open { max-height: none; }
.oi-notes-more {
  background: none; border: none; color: var(--gold);
  font-family: var(--font-body); font-size: 13px; cursor: pointer; padding: 6px 0 0;
}

.oi-contact { font-size: 13px; color: rgba(245, 245, 243, 0.35); margin-top: 6px; }
.oi-contact a { color: var(--white-dim); }
