/* J&C HVAC supplemental styles. The main look comes from index-C4pYRxht.css (unchanged).
   Everything here uses that sheet's theme variables so new parts match the old site.
   Site built by Trube Technologies, (316) 347-7630, https://trubetech.com */

/* ---- header dropdowns ---- */
.jc-panel { position: absolute; top: 100%; z-index: 60; margin-top: .4rem; background: hsl(var(--background)); color: hsl(var(--foreground));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: 0 12px 32px -8px rgba(15,23,42,.25); }
.jc-panel[hidden] { display: none; }
header nav .jc-panel { left: 50%; transform: translateX(-50%); }
header nav button[data-jc-panel][aria-expanded="true"] svg { transform: rotate(180deg); }
header nav button[data-jc-panel] svg { transition: transform .2s ease; }
header nav button[data-jc-panel]:focus-visible, header a:focus-visible, footer a:focus-visible, .jc-btn:focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 2px; }

/* ---- mobile menu sheet ---- */
.jc-sheet { position: fixed; inset: 0; z-index: 120; }
.jc-sheet[hidden] { display: none; }
.jc-sheet-back { position: absolute; inset: 0; background: rgba(15,23,42,.55); animation: jcFade .2s ease both; }
.jc-sheet-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(300px, 86vw); background: hsl(var(--background)); padding: 3.5rem 1.5rem 2rem;
  overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; box-shadow: -12px 0 32px -12px rgba(15,23,42,.35); animation: jcSlide .25s ease both; }
@media (min-width: 640px) { .jc-sheet-panel { width: 400px; } }
.jc-sheet-x { position: absolute; top: .75rem; right: .75rem; width: 2.5rem; height: 2.5rem; border: 0; background: transparent; font-size: 1.75rem; line-height: 1; cursor: pointer; color: hsl(var(--foreground)); border-radius: var(--radius); }
.jc-sheet-x:hover { background: hsl(var(--muted)); }
@keyframes jcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes jcSlide { from { transform: translateX(100%); } to { transform: none; } }
body.jc-noscroll { overflow: hidden; }

/* ---- cookie banner (hidden until the script decides) ---- */
#jc-cookie[hidden] { display: none; }
@media (max-width: 640px) {
  #jc-cookie { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
  #jc-cookie > div { gap: .75rem; }
}

/* ---- FAQ accordion ---- */
.jc-faq-region[hidden] { display: none; }
.jc-faq-region { padding-bottom: 1rem; color: hsl(var(--muted-foreground)); line-height: 1.6; }
button[aria-expanded="true"] > svg.lucide-chevron-down, button[data-jc-acc][aria-expanded="true"] > svg { transform: rotate(180deg); }
button[data-jc-acc] > svg { transition: transform .2s ease; }

/* ---- forms ---- */
.jc-form { display: grid; gap: 1rem; text-align: left; }
.jc-form .jc-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .jc-form .jc-row.two { grid-template-columns: 1fr 1fr; } }
.jc-field { display: grid; gap: .35rem; }
.jc-field label, .jc-field legend { font-size: .875rem; font-weight: 600; color: hsl(var(--primary)); }
.jc-field input, .jc-field select, .jc-field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .85rem; color: hsl(var(--foreground)); background: #fff;
  border: 1px solid hsl(var(--border)); border-radius: var(--radius); min-height: 2.75rem; }
.jc-field textarea { min-height: 7rem; resize: vertical; }
.jc-field input:focus, .jc-field select:focus, .jc-field textarea:focus { outline: 2px solid hsl(var(--accent)); outline-offset: 1px; border-color: hsl(var(--accent)); }
.jc-field .jc-hint { font-size: .8rem; color: hsl(var(--muted-foreground)); }
.jc-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: hsl(var(--muted-foreground)); }
.jc-check input { margin-top: .2rem; width: 1.1rem; height: 1.1rem; accent-color: hsl(var(--accent)); }
.jc-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.jc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .7rem 1.6rem; font: inherit; font-weight: 700;
  border: 0; border-radius: var(--radius); cursor: pointer; background: hsl(var(--accent)); color: hsl(var(--primary)); box-shadow: 0 4px 10px -4px rgba(15,23,42,.35);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.jc-btn:hover { filter: brightness(1.05); box-shadow: 0 8px 16px -6px rgba(15,23,42,.4); }
.jc-btn:active { transform: translateY(1px) scale(.99); }
.jc-btn[disabled] { opacity: .6; cursor: progress; }
.jc-result { margin: 0; padding: .75rem 1rem; border-radius: var(--radius); font-size: .95rem; line-height: 1.45; }
.jc-result[hidden] { display: none; }
.jc-result.ok { background: hsl(142 70% 94%); color: hsl(142 70% 20%); border: 1px solid hsl(142 50% 70%); }
.jc-result.err { background: hsl(0 85% 96%); color: hsl(0 70% 32%); border: 1px solid hsl(0 70% 80%); }
footer .jc-result.ok { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); }
footer .jc-result.err { background: rgba(254,202,202,.15); color: #fecaca; border-color: rgba(254,202,202,.4); }
.jc-slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.jc-slots label { cursor: pointer; }
.jc-slots input { position: absolute; opacity: 0; pointer-events: none; }
.jc-slots span { display: inline-block; padding: .6rem .9rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: #fff; font-size: .95rem; font-weight: 600; min-height: 2.75rem; line-height: 1.5; }
.jc-slots input:checked + span { background: hsl(var(--primary)); color: #fff; border-color: hsl(var(--primary)); }
.jc-slots input:focus-visible + span { outline: 2px solid hsl(var(--accent)); outline-offset: 2px; }
.jc-slots input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.jc-slots .jc-none { color: hsl(var(--muted-foreground)); font-size: .9rem; }

/* ---- plain result page for forms posted without scripts ---- */
body.jc-plain { font-family: system-ui, sans-serif; background: hsl(var(--muted)); color: hsl(var(--foreground)); }
body.jc-plain main { max-width: 36rem; margin: 4rem auto; padding: 2rem; background: #fff; border-radius: 1rem; border: 1px solid hsl(var(--border)); }
body.jc-plain h1 { color: hsl(var(--primary)); margin-top: 0; }
body.jc-plain a { color: hsl(var(--primary)); font-weight: 600; }

/* ---- Mainstay preview badge area + skip link ---- */
.jc-skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: hsl(var(--accent)); color: hsl(var(--primary)); padding: .75rem 1rem; font-weight: 700; }
.jc-skip:focus { left: .5rem; top: .5rem; }
