/* ==========================================================================
   Dabba Cartel — what WordPress added
   --------------------------------------------------------------------------
   Plain pages, the full menu, heading groups and choice rows on the dish
   cards, the cart link in the header. Built on the tokens in site.css;
   defines no colours of its own.
   ========================================================================== */

/* ---------- Plain pages (legal, posts, cart, checkout, account) --------- */
.dc-plain{ padding-top:calc(var(--header-h) + clamp(1.75rem,5vw,3rem)); padding-bottom:var(--section); min-height:70vh; }
.dc-plain__head{ margin-bottom:clamp(1.5rem,4vw,2.5rem); }
.dc-plain__title{ font-family:var(--display); font-size:var(--step-4); font-weight:400; line-height:1.04; letter-spacing:-.025em; }
.dc-plain__media img{ border-radius:var(--radius); margin-bottom:1.5rem; }
.dc-prose{ max-width:72ch; font-size:var(--step-0); line-height:1.7; color:var(--text-soft); }
.dc-prose > * + *{ margin-top:1em; }
.dc-prose h2,.dc-prose h3,.dc-prose h4{ font-family:var(--display); color:var(--text); font-weight:500; line-height:1.2; margin-top:1.6em; }
.dc-prose h2{ font-size:var(--step-2); }
.dc-prose h3{ font-size:var(--step-1); }
.dc-prose a{ color:var(--brand-600); text-decoration:underline; text-underline-offset:.18em; }
.dc-prose ul,.dc-prose ol{ padding-left:1.25em; }
.dc-prose ul{ list-style:disc; }
.dc-prose ol{ list-style:decimal; }
.dc-prose img{ border-radius:var(--radius-s); }
.dc-prose blockquote{ border-left:3px solid var(--brand); padding-left:1rem; font-style:italic; }

.dc-postlist{ display:grid; gap:2rem; }
@media (min-width:760px){ .dc-postlist{ grid-template-columns:repeat(2,1fr); } }
@media (min-width:1100px){ .dc-postlist{ grid-template-columns:repeat(3,1fr); } }
.dc-postcard img{ border-radius:var(--radius); aspect-ratio:4/3; object-fit:cover; width:100%; margin-bottom:1rem; }
.dc-postcard__title{ font-family:var(--display); font-size:var(--step-2); font-weight:500; line-height:1.15; }
.dc-postcard__excerpt{ color:var(--text-soft); margin-top:.5rem; font-size:var(--step--1); }
.dc-pager{ margin-top:3rem; }
.dc-pager .nav-links{ display:flex; gap:.5rem; flex-wrap:wrap; }
.dc-pager .page-numbers{ padding:.5rem .9rem; border:1px solid var(--line); border-radius:999px; }
.dc-pager .page-numbers.current{ background:var(--forest-900); color:var(--on-dark); border-color:var(--forest-900); }

/* ---------- Header cart link -------------------------------------------- */
.dc-cartlink{
  position:relative; display:inline-grid; place-items:center;
  width:44px; height:44px; border-radius:999px; color:inherit;
  border:1px solid currentColor; border-color:color-mix(in srgb, currentColor 30%, transparent);
}
.dc-cartlink svg{ width:20px; height:20px; }
.dc-cartlink__n{
  position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; padding:0 5px;
  border-radius:999px; background:var(--saffron); color:#2A1A05;
  font-size:.7rem; font-weight:700; display:grid; place-items:center;
}

/* ---------- The order page and full menu --------------------------------- */
.dc-search{
  width:100%; min-height:50px; padding:.7rem .95rem; margin-bottom:1rem;
  border:1px solid var(--line); border-radius:var(--radius-s); background:var(--surface);
}
.dc-grid .dc-group{
  grid-column:1/-1; margin:.9rem 0 -.1rem;
  font-family:var(--sans); font-size:.74rem; font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; color:var(--text-faint);
  display:flex; align-items:center; gap:.75rem;
}
.dc-grid .dc-group::after{ content:""; flex:1; height:1px; background:var(--line-soft); }
.dc-grid .dc-group:first-child{ margin-top:0; }
.dc-card__group{
  font-size:.68rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase;
  color:var(--text-faint); margin-bottom:-.3rem;
}
.dc-grid--grouped .dc-card__group{ display:none; }

/* Dishes that come with a choice: one row per choice in the order. */
.dc-card.has-choice .dc-card__foot{ flex-wrap:wrap; }
.dc-card__choice-hint{ color:var(--text-faint); font-weight:500; }
.dc-choicelines{ display:grid; gap:.45rem; width:100%; }
.dc-choiceline{
  display:flex; align-items:center; justify-content:space-between; gap:.6rem;
  padding:.35rem .35rem .35rem .75rem; border-radius:var(--radius-s); background:var(--paper);
}
.dc-choiceline__what{ font-size:var(--step--1); font-weight:500; line-height:1.3; }
.dc-stepper--sm button{ width:36px; height:36px; }
.dc-stepper--sm .dc-stepper__n{ min-width:1.9rem; font-size:var(--step--1); }
.dc-choicelines__foot{ display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding-top:.15rem; }

/* The chooser. */
.dc-choose{ display:grid; gap:.5rem; margin-top:1.1rem; border:0; padding:0; }
.dc-choose__opt{
  display:flex; align-items:center; gap:.75rem; min-height:48px;
  padding:.65rem .9rem; border:1px solid var(--line); border-radius:var(--radius-s);
  background:var(--surface); cursor:pointer;
}
.dc-choose__opt:has(input:checked){ border-color:var(--brand); box-shadow:0 0 0 1px var(--brand); background:color-mix(in srgb, var(--brand-100) 45%, var(--surface)); }
.dc-choose__opt input{ width:18px; height:18px; accent-color:var(--brand); flex:none; }

/* Quoted sections on the full menu. */
.dc-quoted{ display:grid; gap:.6rem; }
@media (min-width:760px){ .dc-quoted{ grid-template-columns:repeat(2,1fr); } }
.dc-quoted__row{ padding:.9rem 1rem; border:1px dashed var(--line); border-radius:var(--radius); display:grid; gap:.25rem; }
.dc-quoted__name{ font-family:var(--display); font-size:var(--step-1); }
.dc-quoted__desc{ font-size:var(--step--1); color:var(--text-soft); }

/* Chips that jump to a section on the full menu stay pinned with the context strip. */
.dc-cats--jump{ position:sticky; top:calc(var(--header-h) + 52px); z-index:50; background:var(--bg); padding-block:.5rem; }
.dc-section{ scroll-margin-top:calc(var(--header-h) + 120px); }

/* The invitation screen. */
.dc-invite{ max-width:760px; padding-bottom:var(--section); }
.dc-invite__ic{ width:56px; height:56px; display:grid; place-items:center; border-radius:999px; background:var(--brand-100); color:var(--brand-600); margin-bottom:1.25rem; }
.dc-invite__ic svg{ width:26px; height:26px; }

/* The note on the cart page. */
.dc-cart-note{
  display:flex; gap:.7rem; align-items:flex-start; padding:.9rem 1rem; margin-bottom:1.5rem;
  border-radius:var(--radius-s); background:var(--cream); font-size:var(--step--1);
}
.dc-cart-note svg{ width:20px; height:20px; flex:none; color:var(--brand); }
.dc-cart-note a{ color:var(--brand-600); text-decoration:underline; }

/* WordPress's own alignment and caption classes, inside page content. */
.alignleft{ float:left; margin:0 1.5rem 1rem 0; }
.alignright{ float:right; margin:0 0 1rem 1.5rem; }
.aligncenter{ margin-inline:auto; display:block; }
.wp-caption-text,.wp-element-caption{ font-size:var(--step--1); color:var(--text-faint); margin-top:.4rem; }
.screen-reader-text{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }

/* The admin bar pushes the fixed header down. */
body.admin-bar .site-header{ top:32px; }
@media (max-width:782px){ body.admin-bar .site-header{ top:46px; } }

/* Images rescued from old page-builder pages (inc/legacy-content.php). */
.dc-prose .dc-legacy-img{ display:block; width:100%; height:auto; border-radius:var(--radius); margin:1.5rem 0; }

.dc-cartlink[hidden]{ display:none !important; }

/* ---------- Contact Form 7, in the theme's clothes ------------------------
   inc/cf7.php builds the forms with the theme's field classes; this covers
   what CF7 adds of its own — wrappers, checkboxes, messages, the spinner. */
.dc-cf7 .wpcf7-form-control-wrap{ display:block; }
.dc-cf7 .field .wpcf7-form-control:not(.wpcf7-checkbox):not(.wpcf7-submit){
  width:100%; padding:.85rem 1rem; border-radius:var(--radius-s);
  border:1px solid var(--line); background:var(--paper); color:var(--text);
  font-size:var(--step-0); font-family:inherit;
}
.dc-cf7 .field textarea.wpcf7-form-control{ min-height:110px; height:9.5rem; resize:vertical; }
:is(.section--dark,.hero,.cta-band) .dc-cf7 .field .wpcf7-form-control:not(.wpcf7-checkbox):not(.wpcf7-submit){
  background:var(--forest-900); border-color:var(--line-dark); color:var(--on-dark);
}
.dc-cf7 .field .wpcf7-form-control:focus{ outline:0; border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.dc-cf7 .wpcf7-checkbox{ display:flex; flex-wrap:wrap; gap:.5rem; }
.dc-cf7 .wpcf7-list-item{ margin:0; }
.dc-cf7 .wpcf7-list-item label{
  display:inline-flex; align-items:center; gap:.55rem; cursor:pointer; max-width:100%;
  padding:.55rem .95rem; border:1px solid var(--line); border-radius:999px; line-height:1.3;
  font-size:var(--step--1); text-transform:none; letter-spacing:0; font-weight:500; color:inherit;
}
:is(.section--dark,.hero,.cta-band) .dc-cf7 .wpcf7-list-item label{ border-color:var(--line-dark); }
.dc-cf7 .wpcf7-list-item label:has(input:checked){ border-color:var(--brand); background:color-mix(in srgb, var(--brand) 22%, transparent); }
.dc-cf7 .wpcf7-list-item input{ accent-color:var(--brand); }
.dc-cf7 .wpcf7-submit{ margin-top:.5rem; cursor:pointer; }
.dc-cf7 .wpcf7-submit:disabled{ opacity:.6; }
.dc-cf7 .wpcf7-not-valid-tip{ font-size:var(--step--1); color:var(--copper); margin-top:.35rem; }
.dc-cf7 .wpcf7-spinner{ margin:.75rem auto 0; display:block; }
.dc-cf7 .wpcf7 form .wpcf7-response-output{
  margin:1rem 0 0; padding:.85rem 1rem; border-radius:var(--radius-s); border:1px solid var(--line); font-size:var(--step--1);
}
.dc-cf7 .wpcf7 form.sent .wpcf7-response-output{ border-color:var(--brand); background:color-mix(in srgb, var(--brand-100) 50%, transparent); }
.dc-cf7 .wpcf7 form.invalid .wpcf7-response-output,
.dc-cf7 .wpcf7 form.failed .wpcf7-response-output,
.dc-cf7 .wpcf7 form.spam .wpcf7-response-output{ border-color:var(--copper); }
.dc-menu-short{ margin-top:.5rem; }

/* ---------- Form controls on phones ---------------------------------------
   The generic ".field input" rule (full width, padding, paper background) was
   also catching checkboxes, which drew them as big white tiles and pushed the
   labels off screen. Checkboxes and radios get their own small control. */
:root .field :not(.chip) > input[type="checkbox"],
:root .field :not(.chip) > input[type="radio"]{
  -webkit-appearance:none; appearance:none; flex:none;
  display:inline-grid; place-content:center;
  width:1.15rem; height:1.15rem; min-height:0; padding:0; margin:0;
  border:1.5px solid currentColor; border-radius:5px; background:transparent;
  opacity:.75; box-shadow:none; cursor:pointer;
  transition:background .2s var(--ease), border-color .2s var(--ease), opacity .2s var(--ease);
}
:root .field :not(.chip) > input[type="radio"]{ border-radius:50%; }
:root .field :not(.chip) > input[type="checkbox"]::before{
  content:""; width:.62rem; height:.62rem; background:#fff;
  clip-path:polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform:scale(0); transition:transform .15s var(--ease-out);
}
:root .field :not(.chip) > input[type="radio"]::before{
  content:""; width:.5rem; height:.5rem; border-radius:50%; background:#fff;
  transform:scale(0); transition:transform .15s var(--ease-out);
}
:root .field :not(.chip) > input:is([type="checkbox"],[type="radio"]):checked{ background:var(--brand); border-color:var(--brand); opacity:1; }
:root .field :not(.chip) > input:is([type="checkbox"],[type="radio"]):checked::before{ transform:scale(1); }
:root .field :not(.chip) > input:is([type="checkbox"],[type="radio"]):focus{ box-shadow:none; }
:root .field :not(.chip) > input:is([type="checkbox"],[type="radio"]):focus-visible{ outline:2px solid var(--saffron); outline-offset:2px; }

/* Selects: iOS draws its own short grey pill; match the text inputs instead. */
.field select,
.dc-cf7 .field select.wpcf7-form-control{
  -webkit-appearance:none; appearance:none;
  min-height:3.3rem; padding-right:2.75rem !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a948c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important; background-position:right 1rem center !important; background-size:16px 16px !important;
  text-overflow:ellipsis;
}
/* Dates: iOS ignores width:100% and centres the value unless told otherwise. */
.field input[type="date"],.field input[type="time"]{
  -webkit-appearance:none; appearance:none; display:block; min-width:0; min-height:3.3rem; text-align:left;
}
.field input::-webkit-date-and-time-value{ text-align:left; }

@media (max-width:559px){
  .dc-cf7 .wpcf7-checkbox{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); }
  .dc-cf7 .wpcf7-list-item label{ display:flex; width:100%; }
  .quote{ padding:1.35rem 1.1rem; }
}

/* Side-sliding reveals start 30px off the edge, which widened the page on
   phones until they played. On narrow screens they rise instead. */
@media (max-width:899px){
  [data-reveal="left"],[data-reveal="right"]{ transform:translateY(26px); }
}
