/*
 * SRFTC Mobile App UI v1.3.1
 * All rules are intentionally scoped to <= 767px so desktop/tablet desktop UI remains unchanged.
 */
.srftc-mobile-app-dock,.srftc-mobile-section-kicker{display:none}

@media (max-width: 767px) {
  :root{--srftc-mobile-safe-bottom:env(safe-area-inset-bottom,0px);--srftc-mobile-header:68px;--srftc-mobile-dock:70px}
  html{scroll-padding-top:76px;background:#f4f7fb}
  body{overflow-x:hidden;background:#f4f7fb;padding-bottom:calc(var(--srftc-mobile-dock) + var(--srftc-mobile-safe-bottom));font-size:15px}
  body.admin-bar{--srftc-mobile-header:68px}
  body.srftc-mobile-menu-open{overflow:hidden}
  main#main-content{min-height:calc(100dvh - var(--srftc-mobile-header));overflow:hidden;background:#f4f7fb}
  .container-custom{width:100%;max-width:100%;padding-left:16px!important;padding-right:16px!important}
  .section-padding{padding-top:42px!important;padding-bottom:42px!important}

  /* App-style sticky header */
  .srftc-site-header{height:var(--srftc-mobile-header);background:rgba(255,255,255,.96)!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border-bottom:1px solid #e6edf4!important;box-shadow:0 8px 28px rgba(7,27,51,.08)!important}
  .srftc-site-header .srftc-header-inner{height:var(--srftc-mobile-header)!important;padding-left:16px!important;padding-right:14px!important}
  .srftc-site-header .srftc-brand{min-width:0;gap:10px!important}
  .srftc-site-header .srftc-brand-text{display:block!important;min-width:0}
  .srftc-site-header .srftc-brand-text>span:first-child{font-size:13px!important;line-height:1.05!important;white-space:nowrap;max-width:180px;overflow:hidden;text-overflow:ellipsis}
  .srftc-site-header .srftc-brand-text>span:last-child{font-size:8px!important;letter-spacing:.12em!important;margin-top:3px;white-space:nowrap}
  .srftc-site-header .srftc-brand>a,.srftc-site-header .srftc-custom-logo{max-width:220px}
  .srftc-site-header .srftc-custom-logo img{max-height:44px!important;max-width:210px!important;object-fit:contain}
  .srftc-site-header .srftc-brand>.w-10{width:44px!important;height:44px!important;border-radius:14px!important;box-shadow:0 8px 18px rgba(7,27,51,.16)}
  .srftc-site-header .srftc-mobile-toggle{width:44px;height:44px;display:grid!important;place-items:center;padding:0!important;border:1px solid #e3eaf1;background:#f8fafc!important;border-radius:14px!important;color:#071b33;box-shadow:0 6px 16px rgba(7,27,51,.06)}
  .srftc-site-header .srftc-mobile-toggle svg{width:24px!important;height:24px!important}

  /* Full app menu sheet */
  .srftc-site-header .srftc-mobile-menu:not(.hidden){display:block!important;position:fixed;z-index:100;top:var(--srftc-mobile-header);left:0;right:0;height:calc(100dvh - var(--srftc-mobile-header) - var(--srftc-mobile-dock) - var(--srftc-mobile-safe-bottom));overflow-y:auto;background:rgba(245,248,252,.98)!important;border-top:0!important;padding:10px 0 24px;box-shadow:0 24px 50px rgba(7,27,51,.15)}
  .srftc-mobile-menu-inner{gap:8px!important;padding-top:8px!important}
  .srftc-mobile-link{display:flex!important;align-items:center;min-height:52px;padding:0 16px!important;border:1px solid #e5ecf3;border-radius:16px;background:#fff;color:#132c45!important;font-size:15px!important;font-weight:700!important;box-shadow:0 6px 16px rgba(7,27,51,.04)}
  .srftc-mobile-menu-inner>div{margin-top:8px!important;padding-top:12px!important;gap:10px!important}
  .srftc-mobile-menu-inner .btn-primary,.srftc-mobile-menu-inner .btn-secondary{min-height:50px;border-radius:15px!important;font-size:14px!important}

  /* Hero becomes a clean app card instead of a giant overlay */
  .srftc-hero-visual{padding:10px 0 0!important;background:#f4f7fb!important}
  .srftc-hero-visual__frame{margin:0 10px!important;border-radius:24px!important;overflow:visible!important;background:#fff;box-shadow:0 16px 42px rgba(7,27,51,.12)!important}
  .srftc-hero-visual__image{width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:16/10;object-fit:cover!important;object-position:center center;border-radius:24px 24px 18px 18px}
  .srftc-hero-visual__shade{display:none!important}
  .srftc-hero-visual__content{position:relative!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:-22px!important;padding:0 12px 14px!important;z-index:3}
  .srftc-hero-visual__panel{margin:0!important;max-width:none!important;padding:14px!important;border-radius:20px!important;background:rgba(7,27,51,.96)!important;backdrop-filter:none!important;box-shadow:0 14px 34px rgba(7,27,51,.24)!important;border:1px solid rgba(255,255,255,.12)!important}
  .srftc-hero-visual__chips{display:flex!important;gap:7px!important;margin:0 0 12px!important;overflow-x:auto;scrollbar-width:none;flex-wrap:nowrap!important;padding-bottom:1px}
  .srftc-hero-visual__chips::-webkit-scrollbar{display:none}
  .srftc-hero-visual__chips span{flex:0 0 auto!important;font-size:10px!important;padding:7px 10px!important;border-radius:999px!important;white-space:nowrap}
  .srftc-hero-visual__actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important}
  .srftc-hero-visual__actions .srftc-cta{width:100%!important;min-height:46px!important;padding:10px 11px!important;border-radius:14px!important;font-size:12px!important;font-weight:800!important;line-height:1.2!important;text-align:center!important;justify-content:center!important}
  .srftc-hero-visual__actions .srftc-cta--whatsapp{grid-column:1/-1!important;min-height:44px!important}

  /* Quick quote is a compact native-app style form card */
  .srftc-quick-quote-section{padding-top:26px!important;padding-bottom:34px!important;background:#f4f7fb!important}
  .srftc-quick-quote-card{padding:20px 16px 18px!important;border-radius:24px!important;box-shadow:0 12px 34px rgba(7,27,51,.08)!important;border:1px solid #e6edf4!important}
  .srftc-mobile-section-kicker{display:inline-flex!important;align-items:center;margin:0 0 8px;padding:6px 10px;border-radius:999px;background:#eaf3fb;color:#1268b3;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
  .srftc-quick-quote-card>h3{font-size:24px!important;line-height:1.15!important;margin-bottom:18px!important;letter-spacing:-.02em}
  .srftc-quick-quote-card .grid{gap:12px!important;margin-bottom:12px!important}
  .srftc-quick-quote-card label,.label-field{font-size:12px!important;font-weight:800!important;color:#31465c!important;margin-bottom:6px!important}
  .srftc-quick-quote-card .input-field,.srftc-quick-quote-card input,.srftc-quick-quote-card select,.srftc-quick-quote-card textarea{min-height:48px!important;border-radius:14px!important;font-size:16px!important;padding:11px 13px!important;background:#fbfcfe!important;border-color:#dbe5ee!important;box-shadow:none!important}
  .srftc-quick-quote-card button[type=submit]{min-height:50px!important;border-radius:15px!important;font-size:14px!important;margin-top:4px}

  /* General card/section rhythm */
  .card{border-radius:20px!important;padding:18px!important;box-shadow:0 8px 24px rgba(7,27,51,.06)!important;border-color:#e3eaf1!important}
  h1{letter-spacing:-.03em}
  h2{letter-spacing:-.025em}
  .text-4xl{font-size:2rem!important;line-height:1.08!important}
  .text-3xl{font-size:1.75rem!important;line-height:1.15!important}
  .text-2xl{font-size:1.4rem!important;line-height:1.2!important}
  .text-lg{font-size:1rem!important}
  .srftc-trade-banner__content{padding-top:46px!important;padding-bottom:46px!important;gap:24px!important}
  .srftc-trade-banner__content h2{font-size:28px!important;line-height:1.15!important}
  .srftc-trade-grid{grid-template-columns:1fr!important;gap:10px!important}
  .srftc-trade-grid>div{border-radius:17px!important;padding:15px!important}
  .srftc-section-heading{margin-bottom:26px!important;padding:0 4px}
  .srftc-section-heading h2{font-size:27px!important;line-height:1.15!important}
  .srftc-proof-banners{margin:24px auto 22px!important;gap:14px!important}
  .srftc-client-logos-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
  .srftc-client-logo-tile{border-radius:16px!important;padding:12px!important}
  .srftc-client-logo-tile__art{height:58px!important;border-radius:13px!important}
  .srftc-testimonial-card--premium{border-radius:20px!important;padding:17px!important}
  .srftc-testimonial-card--premium blockquote{font-size:16px!important;line-height:1.65!important}

  /* Tracking: app-style carrier selector and result */
  .srftc-tracking-hero{min-height:290px!important;border-radius:0 0 28px 28px;overflow:hidden!important}
  .srftc-tracking-hero .container-custom{padding-top:54px!important;padding-bottom:54px!important}
  .srftc-tracking-hero nav{margin-bottom:14px!important;font-size:12px!important}
  .srftc-tracking-hero h1{font-size:32px!important;line-height:1.08!important;margin-bottom:12px!important}
  .srftc-tracking-hero p{font-size:14px!important;line-height:1.6!important}
  .srftc-tracking-main{padding-top:28px!important;padding-bottom:34px!important;background:#f4f7fb!important}
  .srftc-tracking-widget{padding:14px!important;border-radius:22px!important;background:#fff!important;border:1px solid #e3eaf1!important;box-shadow:0 12px 34px rgba(7,27,51,.08)!important}
  .srftc-tracking-source-tabs{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;margin-bottom:12px!important}
  .srftc-tracking-source-tabs button{min-height:42px!important;border-radius:13px!important;font-size:11px!important;padding:8px 7px!important;justify-content:center!important}
  .srftc-tracking-search-row{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .srftc-tracking-search-row input{min-height:50px!important;border-radius:14px!important;font-size:16px!important;padding:11px 13px!important}
  .srftc-tracking-search-row [data-track-submit]{width:100%!important;min-height:48px!important;border-radius:14px!important}
  .srftc-tracking-result{padding:14px!important;border-radius:18px!important}
  .srftc-tracking-card{padding:16px!important;border-radius:18px!important}
  .srftc-tracking-result-head{gap:10px!important;align-items:flex-start!important}
  .srftc-tracking-card .grid.grid-cols-2{grid-template-columns:1fr 1fr!important;gap:10px!important}

  /* Chat no longer covers forms; it becomes a bottom sheet above app dock */
  .srftc-floating-whatsapp{display:none!important}
  #srftc-chat-closed{right:12px!important;bottom:calc(var(--srftc-mobile-dock) + var(--srftc-mobile-safe-bottom) + 12px)!important;gap:0!important}
  #srftc-chat-closed .srftc-chat-teaser{display:none!important}
  .srftc-chat-launcher{width:48px!important;height:48px!important;border-radius:16px!important;box-shadow:0 10px 26px rgba(7,27,51,.28)!important}
  .srftc-chat-launcher span{font-size:22px!important}
  #srftc-chat-panel{left:8px!important;right:8px!important;bottom:calc(var(--srftc-mobile-dock) + var(--srftc-mobile-safe-bottom) + 8px)!important;width:auto!important;height:min(620px,calc(100dvh - var(--srftc-mobile-header) - var(--srftc-mobile-dock) - var(--srftc-mobile-safe-bottom) - 20px))!important;max-width:none!important;max-height:none!important;border-radius:24px!important;box-shadow:0 24px 70px rgba(7,27,51,.32)!important}
  .srftc-chat-header{padding:13px 14px!important}
  #srftc-chat-messages{padding:13px!important}
  .srftc-chat-lead-form{width:100%!important}
  .srftc-chat-form-grid{grid-template-columns:1fr!important}
  #srftc-chat-panel .border-t{padding:10px!important}
  #srftc-chat-input{min-width:0!important;font-size:16px!important;min-height:44px!important}
  #srftc-chat-send{min-height:44px!important;padding:8px 13px!important}

  /* Fixed mobile bottom dock */
  .srftc-mobile-app-dock{position:fixed;display:grid!important;grid-template-columns:repeat(5,1fr);z-index:90;left:8px;right:8px;bottom:calc(8px + var(--srftc-mobile-safe-bottom));height:62px;padding:5px 6px;background:rgba(255,255,255,.96);border:1px solid #e1e9f0;border-radius:20px;box-shadow:0 14px 42px rgba(7,27,51,.18);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .srftc-mobile-dock-item{appearance:none;border:0;background:transparent;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;color:#52677a;font-size:10px;font-weight:800;line-height:1;cursor:pointer;border-radius:14px;padding:3px 2px}
  .srftc-mobile-dock-item small{font-size:9px!important;line-height:1!important;white-space:nowrap}
  .srftc-mobile-dock-icon{width:20px;height:20px;display:grid;place-items:center;color:#173b5e}.srftc-mobile-dock-icon svg{width:20px;height:20px;display:block}
  .srftc-mobile-dock-item--primary{background:#0e315c;color:#fff!important;transform:translateY(-7px);box-shadow:0 8px 20px rgba(14,49,92,.25)}
  .srftc-mobile-dock-item--primary .srftc-mobile-dock-icon{color:#fff}

  body.page-template-page-admin-login,body.page-template-page-admin-login-php{padding-bottom:0}

  /* Footer becomes compact above dock */
  footer.bg-navy .container-custom.py-16{padding-top:42px!important;padding-bottom:34px!important}
  footer.bg-navy .grid{gap:28px!important}
  footer.bg-navy .border-t .container-custom{padding-top:20px!important;padding-bottom:20px!important;text-align:center!important}

  /* Touch / overflow safeguards */
  a,button{touch-action:manipulation}
  input,select,textarea{max-width:100%;font-size:16px}
  img,svg{max-width:100%}
  .overflow-hidden{max-width:100vw}
}

@media (max-width: 380px) {
  .srftc-site-header .srftc-brand-text>span:first-child{max-width:145px}
  .srftc-hero-visual__actions{grid-template-columns:1fr!important}
  .srftc-hero-visual__actions .srftc-cta--whatsapp{grid-column:auto!important}
  .srftc-client-logos-grid{grid-template-columns:1fr!important}
  .srftc-mobile-dock-item small{font-size:8px!important}
}
