/* ===========================================================================
   Island Dental Associates — booking form theme overlay
   Layered LAST (after appointment-form.css / mobile.css) to bring the form
   onto the IDA design system: DM Sans, navy/teal/gold, WCAG-AA contrast,
   pill buttons, and a fix for mobile horizontal scroll.
   =========================================================================== */
:root{
  --navy-900:#0F1C49; --navy-800:#1A2A5E; --navy-700:#253773; --navy-100:#E3E8F2;
  --teal-700:#0099AA; --teal-600:#00BBCC; --teal-500:#2ECCDB;
  --gold-700:#CC8400; --gold-600:#FFA500; --gold-50:#FFF4E0;
  --link:#004BB9; --danger:#B91C1C;
  --ink-900:#0F1419; --ink-700:#2A3340; --ink-500:#5A6472;
  --ink-200:#D8DDE3; --ink-100:#EEF1F4; --ink-50:#F7F9FB;
  --white:#FFFFFF;
  --radius:14px; --radius-lg:22px; --pill:999px;
  --shadow:0 4px 14px rgba(15,20,25,.08),0 12px 32px rgba(15,20,25,.06);
}

/* ---- Kill mobile horizontal scroll (design-system global rule) ---- */
html,body{overflow-x:hidden;max-width:100%;}
*,*::before,*::after{box-sizing:border-box;}
img{max-width:100%;height:auto;}
.container,.container-full-widht{max-width:100%;}

/* ---- Typography ---- */
body,.form-control,input,select,button,textarea,
h1,h2,h3,h4,h5,p,a,span,li,label{
  font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif !important;
}
body{color:var(--ink-900);}
.form-title{color:var(--navy-900) !important;font-weight:700;letter-spacing:-.02em;}

/* ---- Header: navy bar, logo left, phone right ---- */
header{background:var(--navy-900) !important;}
.header-inner{max-width:100%;margin:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px clamp(18px,3vw,44px);}
.header-logo{display:inline-flex;align-items:center;}
.header-logo img{filter:brightness(0) invert(1);height:48px;width:auto;max-width:280px;object-fit:contain;display:block;}
.header-phone{color:var(--white) !important;font-weight:700;text-decoration:none;font-size:1.3rem;letter-spacing:.01em;white-space:nowrap;}
.header-phone:hover{color:var(--white) !important;text-decoration:underline;}
@media (max-width:600px){.header-logo img{height:38px;}.header-phone{font-size:1.1rem;}}

/* ---- Buttons: pill-shaped, ADA-safe contrast ---- */
#btn-ctn,#btn-ctn-mb,input[type="submit"],.filter-apply{
  background:var(--navy-900) !important;color:var(--white) !important;border:none !important;
  border-radius:var(--pill) !important;min-height:48px;font-weight:600;letter-spacing:.01em;
  padding:0 30px;transition:background .18s ease,transform .12s ease;
}
#btn-ctn:hover,#btn-ctn-mb:hover,input[type="submit"]:hover,.filter-apply:hover{background:var(--navy-800) !important;}
#btn-ctn:active,#btn-ctn-mb:active,input[type="submit"]:active{transform:scale(.97);}
#bk-btn,#bk-btn-mb,input[type="button"]{
  background:var(--white) !important;color:var(--navy-900) !important;border:1.5px solid var(--ink-200) !important;
  border-radius:var(--pill) !important;min-height:48px;font-weight:600;padding:0 30px;transition:border-color .18s ease;
}
#bk-btn:hover,#bk-btn-mb:hover,input[type="button"]:hover{border-color:var(--navy-900) !important;}
/* Filter pill: teal with NAVY text (never white on teal) */
/* Secondary "Filter by day & time" -> quiet outline so it doesn't read as the calendar's apply button */
.filter-btn,#filter-btn{
  background:var(--white) !important;color:var(--navy-900) !important;border:1.5px solid var(--ink-200) !important;
  border-radius:var(--pill) !important;font-weight:600;padding:10px 22px;transition:border-color .18s ease,background .18s ease;
}
.filter-btn:hover,#filter-btn:hover{border-color:var(--teal-600) !important;background:rgba(0,187,204,.06) !important;}
.filter-btn .funnel,#filter-btn .funnel{margin-right:6px;color:var(--navy-700);font-weight:700;}

/* ---- Service tiles ---- */
.app-type-block{
  border:1px solid var(--ink-100) !important;border-radius:var(--radius-lg) !important;background:var(--white);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.app-type-block:hover{transform:translateY(-4px);border-color:var(--teal-500) !important;box-shadow:var(--shadow);}
.app-type-block.selected{border-color:var(--teal-600) !important;background:var(--gold-50) !important;box-shadow:var(--shadow);}
.app-type-block h3{color:var(--navy-900) !important;font-weight:600;}

/* ---- Slot blocks ---- */
.slot-block{
  border:1.5px solid var(--ink-200) !important;border-radius:var(--radius) !important;background:var(--white);
  transition:border-color .15s ease,background .15s ease;
}
.slot-block span{color:var(--navy-900) !important;}
.slot-block:hover{border-color:var(--teal-600) !important;background:rgba(0,187,204,.08);}
.slot-block.selected{background:var(--navy-900) !important;border-color:var(--navy-900) !important;}
.slot-block.selected span{color:var(--white) !important;}
.slot-day{color:var(--navy-900) !important;font-weight:700;}

/* ---- Step progress markers ---- */
.step-mark .mark{background:var(--ink-200);color:var(--ink-700);}
.step-mark.current .mark,.step-mark.completed .mark{background:var(--teal-600) !important;color:var(--navy-900) !important;}
.step-link.current a{color:var(--navy-900) !important;font-weight:700;}
.step-link.completed a{color:var(--navy-700) !important;}
.step-link a{color:var(--ink-500);}
.vert-line{background:var(--ink-200);}

/* ---- Inputs ---- */
.form-control,select.form-control,#rangePicker{
  border:1.5px solid var(--ink-200) !important;border-radius:var(--radius) !important;color:var(--ink-900) !important;
}
.form-control:focus,select.form-control:focus,#rangePicker:focus{
  border-color:var(--teal-600) !important;box-shadow:0 0 0 3px rgba(0,187,204,.18) !important;outline:none;
}
.calendar-label{color:var(--ink-500) !important;}
/* "Today" label was red (failing) -> readable ink */
.today label{color:var(--ink-700) !important;}

/* ---- Help / errors / empty states ---- */
.need-help h3{color:var(--ink-700) !important;font-weight:500;}
.need-help a,.no-slots a,.no-services a{color:var(--link) !important;font-weight:600;}
.error{color:var(--danger) !important;}
.no-slots,.no-services{color:var(--ink-700) !important;}

/* ---- Date-picker accents ---- */
.datepick .datepick-cmd, .datepick a.datepick-cmd{color:var(--navy-900) !important;}
.datepick td .datepick-selected,.datepick .datepick-days-cell.datepick-selected{
  background:var(--navy-900) !important;color:var(--white) !important;
}

/* ---- Mobile ---- */
@media (max-width:820px){
  .slots-wrapper{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
  .blocks-wrapper,.blocks-wrapper-days{max-width:100%;}
  header img{max-height:40px;}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important;}
}

/* ---- Confirmation page (step 6) — clean white card, no office photo ---- */
.confirm-wrap{background:var(--ink-50);min-height:60vh;display:flex;align-items:flex-start;justify-content:center;padding:clamp(20px,5vw,56px) 16px;}
.confirm-card{background:var(--white);border:1px solid var(--ink-100);border-radius:var(--radius-lg);box-shadow:var(--shadow);max-width:640px;width:100%;padding:clamp(24px,4vw,44px);text-align:center;}
.confirm-check{width:64px;height:64px;border-radius:50%;background:rgba(15,122,79,.12);color:#0F7A4F;font-size:32px;line-height:64px;margin:0 auto 18px;font-weight:700;}
.confirm-title{color:var(--navy-900);font-weight:700;letter-spacing:-.02em;font-size:clamp(1.8rem,1.4rem + 1.6vw,2.4rem);margin:0 0 6px;}
.confirm-sub{color:var(--ink-500);margin:0 0 22px;font-size:20px;}
.confirm-note p{margin:.4rem 0;color:var(--ink-700);font-size:20px;line-height:1.55;}
.confirm-note .muted{color:var(--ink-500);font-size:.98rem;}
.confirm-details{display:grid;grid-template-columns:1fr 1fr;gap:16px;text-align:left;margin:24px 0;}
.confirm-detail{background:var(--ink-50);border:1px solid var(--ink-100);border-radius:var(--radius);padding:16px 18px;}
.confirm-label{display:block;font-size:14px;text-transform:uppercase;letter-spacing:.12em;color:var(--navy-700);font-weight:700;margin-bottom:8px;}
.confirm-value{color:var(--navy-900);line-height:1.55;font-size:20px;}
.confirm-value .muted{color:var(--ink-500);}
.confirm-cal{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin:4px 0 24px;}
.cal-link{display:inline-flex;align-items:center;gap:8px;border:1.5px solid var(--ink-200);border-radius:var(--pill);padding:14px 26px;color:var(--navy-900);text-decoration:none;font-weight:600;font-size:20px;transition:border-color .18s,background .18s;}
.cal-link:hover{border-color:var(--teal-600);background:rgba(0,187,204,.06);}
.confirm-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;}
.btn-primary-pill{background:var(--navy-900);color:#fff;border:none;border-radius:var(--pill);min-height:52px;padding:0 34px;font-weight:600;font-size:20px;cursor:pointer;}
.btn-primary-pill:hover{background:var(--navy-800);}
.btn-ghost-pill{background:#fff;color:var(--navy-900);border:1.5px solid var(--ink-200);border-radius:var(--pill);min-height:52px;padding:0 34px;font-weight:600;font-size:20px;cursor:pointer;}
.btn-ghost-pill:hover{border-color:var(--navy-900);}
@media (max-width:560px){.confirm-details{grid-template-columns:1fr;}}


/* ---- Footer ---- */
.ida-footer{background:var(--ink-900);color:rgba(255,255,255,.72);}
.ida-footer-inner{max-width:1240px;margin:0 auto;display:flex;flex-wrap:wrap;gap:28px;justify-content:space-between;align-items:flex-start;padding:40px clamp(18px,3vw,44px) 24px;}
.ida-footer-brand{max-width:460px;}
.ida-footer-logo img{height:54px;width:auto;filter:brightness(0) invert(1);margin-bottom:14px;}
.ida-footer-brand p{font-size:.95rem;line-height:1.6;color:rgba(255,255,255,.66);margin:0 0 16px;}
.ida-footer-socials{display:flex;gap:10px;}
.ida-footer-socials a{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.08);display:inline-flex;align-items:center;justify-content:center;color:#fff;transition:background .18s;}
.ida-footer-socials a:hover{background:var(--teal-600);}
.ida-footer-socials svg{width:17px;height:17px;}
.ida-footer-links{display:flex;flex-direction:column;gap:10px;}
.ida-footer-links a{color:rgba(255,255,255,.72);text-decoration:none;font-size:.95rem;}
.ida-footer-links a:hover{color:var(--teal-500);}
.ida-footer-bottom{max-width:1240px;margin:0 auto;display:flex;flex-wrap:wrap;gap:12px 24px;justify-content:space-between;align-items:center;padding:24px clamp(18px,3vw,44px);font-size:.92rem;color:rgba(255,255,255,.66);}
.ida-footer-legal{display:flex;gap:20px;flex-wrap:wrap;}
.ida-footer-legal a{color:rgba(255,255,255,.72);text-decoration:none;}
.ida-footer-legal a:hover{color:#fff;}
@media (max-width:600px){.ida-footer-inner{flex-direction:column;gap:22px;}.ida-footer-bottom{flex-direction:column;align-items:flex-start;}}


/* ---- Selected-location bar (steps 2-5) ---- */
.location-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--navy-100);border:1px solid var(--ink-100);border-radius:var(--radius);padding:14px 20px;margin:0 0 24px;font-size:20px;color:var(--navy-900);}
.location-bar-label{color:var(--ink-700);}
.location-bar strong{color:var(--navy-900);font-weight:700;}
.location-bar-change{margin-left:auto;color:var(--link);font-weight:600;text-decoration:underline;font-size:18px;}
.location-bar-change:hover{color:var(--link-hover,#003A94);}
@media (max-width:600px){.location-bar-change{margin-left:0;}}

/* ---- Mobile: breathing room under the action buttons ---- */
@media (max-width:820px){
  .form-block{padding-bottom:36px;}
  .buttons-row-mobile{margin-top:18px;margin-bottom:28px;padding-bottom:calc(env(safe-area-inset-bottom, 0px) + 12px);}
  .buttons-row{margin-bottom:24px;}
}


/* ---- FIX: afternoon slots hidden — remove the 50px single-row clamp so time slots wrap ---- */
@media (max-width:820px){
  .slots-wrapper,
  .slick-list, .slick-list.draggable,
  .slick-track,
  .blocks-wrapper-days, .row.blocks-mb, .blocks-mb{
    max-height:none !important;
    height:auto !important;
    overflow:visible !important;
    flex-wrap:wrap !important;
    row-gap:12px !important;
  }
  .slot-block{ margin-bottom:0 !important; }
}
/* Honeypot (bot trap) — off-screen, not display:none */
.hp-wrap{position:absolute!important;left:-9999px!important;top:auto;width:1px;height:1px;overflow:hidden;}

/* ---- Insurance search field ---- */
.insurance-search-wrap{margin:14px 0 4px;max-width:520px;}
.ins-label{display:block;font-weight:600;color:var(--navy-900);margin-bottom:8px;font-size:1rem;}
.ins-search{position:relative;}
#insSearch{width:100%;min-height:52px;border:1.5px solid var(--ink-200);border-radius:var(--radius);padding:0 16px;font-size:16px;color:var(--ink-900);background:#fff;}
#insSearch:focus{border-color:var(--teal-600);box-shadow:0 0 0 3px rgba(0,187,204,.18);outline:none;}
.ins-list{display:none;position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);margin:0;padding:6px 0;list-style:none;background:#fff;border:1.5px solid var(--ink-200);border-radius:var(--radius);box-shadow:var(--shadow);max-height:280px;overflow-y:auto;}
.ins-list li{padding:12px 16px;cursor:pointer;font-size:16px;color:var(--navy-900);}
.ins-list li:hover{background:rgba(0,187,204,.08);}
.ins-list li[data-val="__not_listed__"]{font-weight:600;border-bottom:1px solid var(--ink-100);}
.ins-hint{margin:10px 2px 0;color:var(--ink-700);font-size:.95rem;line-height:1.5;}
.ins-list li.ins-group{padding:9px 16px 5px;font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-500);font-weight:600;cursor:default;}
.ins-list li.ins-group:hover{background:transparent;}
