/* Surya's Chandana Inn — mobile layer.
   Page styles are inline, so overrides need !important.
   Selectors are scoped: never use body > div:first-of-type, that is the
   full-page flex wrapper, not the contact strip. */

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, iframe { max-width: 100%; }

/* ================= floating action buttons ================= */
.fab-stack {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.fab {
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease;
}
.fab:active { transform: scale(.93); }

.fab-secondary {
  width: 48px; height: 48px;
  background: rgba(27, 22, 16, .92);
  box-shadow: inset 0 0 0 1px #6B5B48, 0 8px 22px rgba(27, 22, 16, .38);
  color: #E3B04B;
  font-family: Karla, system-ui, sans-serif;
  font-size: 9.5px !important;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}
.fab-wa {
  width: 62px; height: 62px;
  background: #25D366;
  box-shadow: 0 6px 18px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .25);
}
.fab-wa svg { width: 34px; height: 34px; display: block; fill: #fff; }
.fab-wa::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, .55);
  animation: fabPulse 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes fabPulse {
  0%   { transform: scale(.86); opacity: .75; }
  70%  { transform: scale(1.22); opacity: 0; }
  100% { transform: scale(1.22); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .fab-wa::after { animation: none; opacity: 0; } }

/* ================= phones ================= */
@media (max-width: 720px) {

  .fab-stack { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; }
  .fab-wa { width: 64px; height: 64px; }
  .fab-wa svg { width: 36px; height: 36px; }
  .fab-secondary { width: 46px; height: 46px; }

  /* ---- top contact strip: one tight line ---- */
  .topbar {
    padding: 7px 12px !important;
    gap: 10px !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }
  .topbar > span { display: none !important; }
  .topbar > a[href^="mailto:"] { display: none !important; }
  .topbar > a { font-size: 12.5px !important; }

  /* ---- masthead: compact, nav on one scrollable line ---- */
  .masthead > div { padding: 10px 12px !important; gap: 8px !important; }
  .masthead nav {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px !important;
    justify-content: flex-start !important;
  }
  .masthead nav::-webkit-scrollbar { display: none; }
  .masthead nav > a {
    white-space: nowrap !important;
    min-height: 40px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    display: inline-flex !important;
    align-items: center;
  }
  /* gold WhatsApp pill and divider duplicate the floating button */
  .masthead nav > a[href*="wa.me"],
  .masthead nav > span { display: none !important; }

  /* ---- hero ---- */
  [data-carousel] { height: 88svh !important; min-height: 520px !important; }
  [data-carousel] [data-prev],
  [data-carousel] [data-next] { width: 42px !important; height: 42px !important; font-size: 18px !important; }
  [data-dot] { width: 24px !important; padding: 12px 0 !important; background-clip: content-box !important; box-sizing: content-box !important; }
  [data-caption-target] { display: none !important; }
  [data-carousel] span:has(> [data-caption-target]) { display: none !important; }
  [data-carousel] div:has(> [data-dot]) { gap: 6px !important; margin-right: 4px !important; }
  [data-carousel] *:has([data-prev]) { max-width: 100% !important; overflow: hidden !important; box-sizing: border-box !important; }

  /* ---- content ---- */
  main [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  main [style*="font-size: 10px"] { font-size: 11.5px !important; }
  main [style*="font-size: 11px"] { font-size: 12px !important; }
  main [style*="font-size: 12px"] { font-size: 12.5px !important; }
  table { display: block; overflow-x: auto; }

  /* ---- forms: 16px stops iOS zooming on focus ---- */
  input, select, textarea { font-size: 16px !important; }
  [data-send] { min-height: 52px !important; width: 100% !important; }


  /* ---- tap targets: contact strip + footer links ---- */
  .topbar > a { display: inline-flex !important; align-items: center; min-height: 34px !important; }
  footer a {
    display: inline-flex !important;
    align-items: center;
    min-height: 40px !important;
    font-size: 14px !important;
  }
  footer a[href*="wa.me"] { min-height: 48px !important; }

  /* keep the footer's own floating buttons from doubling up */
  footer .fab-stack { display: none !important; }

  /* keep the floating buttons clear of the footer's last row */
  footer { padding-bottom: 92px !important; }
}

@media (max-width: 420px) {
  [data-carousel] { height: 84svh !important; min-height: 480px !important; }
  .fab-secondary { width: 44px; height: 44px; }
}
