/*!
 * CaseTech Main Menu — search trigger + modal.
 * Bundled with the plugin on purpose: the rest of the header is styled from Divi's
 * custom CSS, but a modal that loses its stylesheet is a broken page, so this one
 * ships with the code. Everything is scoped to .ctmms-*.
 */

/* ---- Logo baseline (v1.1.2) ----
   The safety net for the header's one non-negotiable: a sane logo size even if
   the Divi stylesheet vanishes. Same 42px as the Divi rule, no !important, so
   your CSS or an explicit logo_height="…" on the shortcode still wins. */
.ctmm .ctmm-logo img{height:42px;width:auto;display:block}
.ctmm-panel .ctmm-logo img{height:42px;width:auto;display:block}

/* ---- Trigger in the header bar ---- */
.ctmms-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;flex:none;padding:0;cursor:pointer;
  border:1px solid #E5E7F0;background:#fff;border-radius:10px;
  color:#101425;transition:.18s ease;
}
.ctmms-btn:hover{border-color:#C7CBDD;color:#D1202F;transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(16,20,37,.10)}
.ctmms-btn:focus-visible{outline:2px solid #272D92;outline-offset:2px}
.ctmms-btn svg{width:19px;height:19px;display:block}

/* In the navy mobile panel the light chrome would disappear. */
.ctmm-panel .ctmms-btn{
  width:100%;height:auto;justify-content:flex-start;gap:.7rem;
  border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.06);
  color:#fff !important;padding:.85rem 1rem;margin-top:1.2rem;
  font-family:'Inter',system-ui,sans-serif;font-size:1rem;font-weight:600;
}
.ctmm-panel .ctmms-btn:hover{background:rgba(255,255,255,.14);color:#fff !important}

/* ---- Modal ---- */
.ctmms{position:fixed;inset:0;z-index:100000;display:flex;align-items:flex-start;
  justify-content:center;padding:clamp(1rem,10vh,7rem) 1rem 1rem}
.ctmms[hidden]{display:none !important}
.ctmms-backdrop{position:absolute;inset:0;background:rgba(8,11,28,.62);
  -webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);
  animation:ctmmsFade .18s ease-out}
.ctmms-card{
  position:relative;width:100%;max-width:620px;
  background:#fff;border:1px solid #E5E7F0;border-radius:16px;
  box-shadow:0 30px 80px rgba(8,11,28,.45);
  padding:1.5rem 1.6rem 1.3rem;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  animation:ctmmsPop .2s cubic-bezier(.4,0,.2,1);
}
@keyframes ctmmsFade{from{opacity:0}to{opacity:1}}
@keyframes ctmmsPop{from{opacity:0;transform:translateY(-10px) scale(.985)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){
  .ctmms-backdrop,.ctmms-card{animation:none}
}

.ctmms-eyebrow{display:block;font-family:'Barlow Condensed',sans-serif;
  text-transform:uppercase;letter-spacing:.18em;font-weight:600;
  font-size:.78rem;color:#D1202F;margin:0 0 .55rem}

.ctmms-row{display:flex;align-items:center;gap:.6rem;
  border:1px solid #D7DAE8;border-radius:11px;padding:.35rem .35rem .35rem .85rem;
  transition:border-color .15s ease,box-shadow .15s ease}
.ctmms-row:focus-within{border-color:#272D92;box-shadow:0 0 0 3px rgba(39,45,146,.14)}
.ctmms-row svg{width:19px;height:19px;flex:none;color:#8B91A7}

.ctmms-input{
  flex:1;min-width:0;border:0 !important;outline:0 !important;background:transparent !important;
  font-family:inherit;font-size:1.02rem;font-weight:500;color:#101425 !important;
  padding:.7rem 0;box-shadow:none !important;
}
.ctmms-input::placeholder{color:#8B91A7;font-weight:400}
.ctmms-input::-webkit-search-cancel-button{display:none}

.ctmms-go,.ctmms-go:link,.ctmms-go:visited,.ctmms-go:hover,.ctmms-go:focus{
  flex:none;cursor:pointer;border:0;border-radius:9px;
  background:#D1202F !important;background-image:none !important;color:#fff !important;
  font-family:inherit;font-weight:600;font-size:.92rem;padding:.7rem 1.25rem;
  text-decoration:none !important;transition:.18s ease;
}
.ctmms-go:hover{background:#B21826 !important}
.ctmms-go:focus-visible{outline:2px solid #272D92;outline-offset:2px}

.ctmms-hint{margin:.85rem 0 0;font-size:.82rem;line-height:1.5;color:#4A5169}
.ctmms-hint b{color:#101425;font-weight:700}

.ctmms-x{
  position:absolute;top:.6rem;right:.6rem;width:34px;height:34px;
  cursor:pointer;border:0;background:transparent;border-radius:8px;
  color:#8B91A7;font-size:1.5rem;line-height:1;transition:.15s ease;
}
.ctmms-x:hover{background:#F5F6FB;color:#101425}

html.ctmms-lock,html.ctmms-lock body{overflow:hidden}

@media (max-width:520px){
  .ctmms-card{padding:1.2rem 1.1rem 1rem}
  .ctmms-go{padding:.7rem .95rem;font-size:.86rem}
}

/* ---- Responsive header collapse ---------------------------------------
   These four rules used to live only in the Divi custom CSS. When that sheet
   goes missing or gets truncated the bar keeps rendering the desktop layout —
   quote button visible, no hamburger, everything overflowing off-screen. The
   plugin owns its own collapse now so the header can't end up unusable. */
@media (max-width:960px){
  .ctmm .ctmm-desktop{display:none !important}
  .ctmm .ctmm-actions .ctmm-quote{display:none !important}
  .ctmm .ctmm-burger{display:inline-flex !important}
  .ctmm .ctmm-inner{gap:.75rem}
  .ctmm .ctmm-logo img{max-width:52vw;height:auto !important}
}
@media (max-width:420px){
  .ctmm .ctmms-btn{width:40px;height:40px}
  .ctmm .ctmm-burger{width:40px;height:40px}
}
