/* =====================================================================
   Now Insurance Agency · Mobile Health-Quotation App (index-mobile)
   Standalone, mobile-first stylesheet that overlays css/styles.css.
   Only active on the mobile page (body[data-mobile="true"]).
   ===================================================================== */

html { -webkit-text-size-adjust: 100%; }

body[data-mobile="true"] {
  margin: 0;
  color: var(--text-dark);
  background:
    radial-gradient(120% 60% at 50% 0%, #14402a 0%, #0d2a1c 42%, #071e13 100%);
  background-attachment: fixed;
  font-family: inherit;
}

body[data-mobile="true"] * {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

body[data-mobile="true"] ::selection { background: rgba(212, 175, 55, 0.28); }

/* Users should never see wide desktop columns on this page. */
body[data-mobile="true"] main,
body[data-mobile="true"] .m-shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

body[data-mobile="true"] main {
  padding-bottom: 96px; /* space for the sticky quote action bar */
}

/* ---------------------------------------------------------------------
   Top app bar
   --------------------------------------------------------------------- */
.m-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: env(safe-area-inset-top, 0) 0 0;
  background: rgba(7, 30, 19, 0.9);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.24);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

.m-header-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.m-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.m-brand-logo { width: 36px; height: 41px; flex: none; display: block; }

.m-brand-text { min-width: 0; }

.m-brand-name {
  display: block;
  font-weight: 800;
  font-size: 0.96rem;
  letter-spacing: 0.04em;
  line-height: 1.02;
  white-space: nowrap;
}

.m-brand-sub {
  display: block;
  margin-top: 2px;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-gold);
  white-space: nowrap;
}

.m-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.m-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 12px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.m-header-btn:active { transform: scale(0.96); opacity: 0.86; }
.m-header-btn.call { background: rgba(255, 255, 255, 0.13); }
.m-header-btn.wa { background: var(--whatsapp-green); }

/* ---------------------------------------------------------------------
   Hero / intro
   --------------------------------------------------------------------- */
.m-hero {
  padding: 22px 16px 8px;
}

.m-hero-inner {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 22px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(212, 175, 55, 0.28) 0%, rgba(212, 175, 55, 0) 45%),
    linear-gradient(160deg, #174f30 0%, #0f3623 60%, #0a2919 100%);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.m-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.14);
  border: 1px solid rgba(212, 175, 55, 0.42);
}

.m-hero h1 {
  margin: 14px 0 8px;
  font-size: 1.9rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 900;
}

.m-hero h1 span {
  display: block;
  background: linear-gradient(92deg, #f6d477, var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.m-hero p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.m-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}

.m-hero-stat {
  padding: 10px 8px;
  border-radius: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.m-hero-stat b {
  display: block;
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--accent-gold);
}

.m-hero-stat span {
  display: block;
  margin-top: 2px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------------------------------------------------------------------
   Quote form — phone friendly cards
   --------------------------------------------------------------------- */
body[data-mobile="true"] #quote-form {
  margin: 14px 0 0;
  padding: 0 16px;
}

body[data-mobile="true"] #quote-form > h2 {
  margin: 4px 2px 12px;
  font-size: 1.15rem;
}

body[data-mobile="true"] .mobile-quote-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.28);
}

body[data-mobile="true"] .mobile-quote-intro-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(160deg, #1c6b40, #0f3a24);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

body[data-mobile="true"] .mobile-quote-intro strong { display: block; font-size: 0.9rem; }
body[data-mobile="true"] .mobile-quote-intro small {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: rgba(30, 41, 59, 0.72);
}

body[data-mobile="true"] .quote-step-card,
body[data-mobile="true"] .selected-plan-notice {
  margin: 12px 0;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(30, 41, 59, 0.08);
  background: #fff;
  box-shadow: 0 14px 34px rgba(10, 40, 80, 0.12);
}

body[data-mobile="true"] .mobile-step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

body[data-mobile="true"] .mobile-step-title > span {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(160deg, var(--accent-gold), #b98311);
  box-shadow: 0 6px 14px rgba(212, 175, 55, 0.5);
}

body[data-mobile="true"] .mobile-step-title strong {
  display: block;
  font-size: 1rem;
}

body[data-mobile="true"] .mobile-step-title small {
  display: block;
  margin-top: 2px;
  font-size: 0.76rem;
  color: rgba(30, 41, 59, 0.62);
}

/* Larger touch targets */
body[data-mobile="true"] select,
body[data-mobile="true"] input[type="number"],
body[data-mobile="true"] input[type="text"],
body[data-mobile="true"] input[type="tel"],
body[data-mobile="true"] input[type="email"],
body[data-mobile="true"] input[type="search"] {
  min-height: 48px;
  border-radius: 12px;
  font-size: 1rem;
}

body[data-mobile="true"] label,
body[data-mobile="true"] .cover-type-heading span,
body[data-mobile="true"] .family-item label span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body[data-mobile="true"] .cover-type-card,
body[data-mobile="true"] .insurer-card {
  border-radius: 16px;
  border: 1px solid rgba(30, 41, 59, 0.08);
}

body[data-mobile="true"] .cover-type-toggle label,
body[data-mobile="true"] .group-age-options label,
body[data-mobile="true"] .radio-option {
  border-radius: 12px;
}

/* Sticky "Get Quotes" bar inside the form */
body[data-mobile="true"] .mobile-quote-actions-shell {
  position: sticky;
  bottom: 0;
  z-index: 35;
  margin: 8px -16px -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(243, 245, 250, 0), rgba(243, 245, 250, 0.9) 22%, #f3f5fa 60%);
}

body[data-mobile="true"] .actions-quote {
  display: flex;
  gap: 10px;
}

body[data-mobile="true"] .actions-quote .btn-primary {
  flex: 1;
  min-height: 54px;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(46, 125, 50, 0.45);
}

body[data-mobile="true"] .actions-quote .btn-secondary {
  flex: none;
  min-height: 54px;
  border-radius: 16px;
}

/* ---------------------------------------------------------------------
   Results
   --------------------------------------------------------------------- */
body[data-mobile="true"] .results-header {
  border-radius: 18px;
}

body[data-mobile="true"] #resultsContainer {
  margin: 6px 0 0;
}

body[data-mobile="true"] .provider-card {
  border-radius: 20px;
  box-shadow: 0 16px 38px rgba(10, 40, 80, 0.16);
}

body[data-mobile="true"] .provider-card .price {
  border-radius: 14px;
}

body[data-mobile="true"] .quote-carousel-arrow {
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

/* Trust strip */
body[data-mobile="true"] #trust .trust-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

body[data-mobile="true"] #trust .trust-item {
  border-radius: 16px;
  border: 1px solid rgba(30, 41, 59, 0.08);
  box-shadow: 0 10px 24px rgba(10, 40, 80, 0.08);
}

/* ---------------------------------------------------------------------
   Bottom footer
   --------------------------------------------------------------------- */
.m-footer {
  margin-top: 24px;
  padding: 22px 20px calc(30px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  font-size: 0.78rem;
  line-height: 1.6;
}

.m-footer strong { color: var(--accent-gold); }

/* Keep the WhatsApp bubble above the sticky quote bar. */
body[data-mobile="true"] .floating-chat {
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

/* ---------------------------------------------------------------------
   Two-col story rows collapse gracefully on phones
   --------------------------------------------------------------------- */
body[data-mobile="true"] .family-row,
body[data-mobile="true"] .personal-form-row {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

body[data-mobile="true"] .family-age-pair,
body[data-mobile="true"] .group-composition-grid {
  grid-template-columns: 1fr;
}

/* ---------------------------------------------------------------------
   Modal / popup sizing for phones
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
  body[data-mobile="true"] .modal-content {
    width: 100%;
    max-width: none;
    border-radius: 22px 22px 0 0;
    margin: auto 0 0;
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body[data-mobile="true"] .modal-overlay,
  body[data-mobile="true"] .payment-popup-overlay {
    align-items: flex-end;
  }

  body[data-mobile="true"] .payment-popup-card {
    width: 100%;
    max-width: none;
    border-radius: 22px 22px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto 0 0;
  }

  body[data-mobile="true"] .summary-row {
    flex-direction: column;
    gap: 8px;
  }

  body[data-mobile="true"] .modal-actions {
    flex-direction: column;
  }

  body[data-mobile="true"] .modal-actions .btn-success,
  body[data-mobile="true"] .modal-actions .btn-whatsapp,
  body[data-mobile="true"] .modal-actions .btn-secondary {
    width: 100%;
  }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  body[data-mobile="true"] * {
    transition: none !important;
    animation: none !important;
  }
}
