/* The Mango Tree House · ajustes para telemóvel (até 760 px). Ligado em todas as páginas.
   Nota: os estilos são escritos pelo React no formato "propriedade: valor" (com espaço). */
.m-only { display: none !important; }
@media (max-width: 760px) {
  /* menu: logo numa linha, ligações e botões na seguinte */
  nav { flex-wrap: wrap !important; row-gap: 10px !important; }
  nav > div[style*="margin-left: auto"] { margin-left: 0 !important; padding-left: 0 !important; width: 100% !important; justify-content: space-between !important; gap: 8px !important; }
  nav > div[style*="margin-left: auto"] > div[style*="gap: 18px"] { gap: 14px !important; font-size: 14px !important; }
  nav a[style*="padding: 11px 20px"] { padding: 9px 14px !important; font-size: 14px !important; }
  nav button[style*="padding: 10px 14px"] { padding: 8px 10px !important; font-size: 14px !important; }
  nav img[alt*="Mango"] { height: 32px !important; }

  /* grelhas passam a uma coluna, exceto calendário (7 colunas) e pares pequenos */
  [style*="grid-template-columns"]:not([style*="repeat(7"]):not([style*="grid-template-columns: 1fr 1fr"]):not([style*="36px minmax"]) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  [style*="grid-template-columns"] { height: auto !important; }

  /* secções e cartões: margens interiores de telemóvel */
  [style*="max-width: 1600px"] > section,
  [style*="max-width: 1600px"] > div > section,
  [style*="max-width: 1600px"] > div > div > section { padding-left: 20px !important; padding-right: 20px !important; }
  [style*="max-width: 1600px"] > section[style*="padding: 76px"] { padding-top: 40px !important; padding-bottom: 40px !important; }
  [style*="padding: 26px 28px"] { padding: 20px 18px !important; }
  [style*="padding: 0px 36px"] { padding: 0 !important; }

  /* títulos grandes */
  h1 { font-size: clamp(30px, 9vw, 40px) !important; line-height: 1.1 !important; }
  h2 { font-size: clamp(24px, 7vw, 30px) !important; line-height: 1.15 !important; }

  /* página de reserva: o resumo da estadia fica logo a seguir ao calendário */
  .stay-grid { gap: 40px !important; }
  .stay-grid > div:first-child { display: contents !important; }
  .stay-grid > div:first-child > section { order: 3; }
  .stay-grid > div:first-child > section[data-screen-label="Calendar"] { order: 1; }
  .stay-grid > .stay-card { order: 2; }

  /* ---------- página inicial: ordem e peso das secções (grelha de 8 px) ---------- */
  .m-only { display: block !important; }

  /* 1. descrição sai do cartão da foto e substitui o título "Why…" */
  .hero-desc, .why-title, .why-text, .why-mango { display: none !important; }
  section[data-screen-label="Hero"] { min-height: 440px !important; }
  .why { padding: 0 20px 8px !important; gap: 0 !important; }
  .why > div:first-child { gap: 24px !important; }
  .why .why-stats[style][style][style] { margin-top: 8px !important; gap: 12px !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .why-stats > div { gap: 8px !important; }
  .why-stats span[style*="width: 56px"] { width: 48px !important; height: 48px !important; font-size: 24px !important; }
  .why-stats strong { font-size: 20px !important; }
  .why-stats span[style*="font-size: 16px"] { font-size: 13px !important; line-height: 1.35 !important; }

  /* 2. cartões laranja: uma linha por item, só ícone e título */
  .perks { gap: 8px !important; padding: 0 20px 8px !important; }
  .perk-card { flex-direction: row !important; align-items: center !important; gap: 12px !important; padding: 12px 16px !important; border-radius: 12px !important; }
  .perk-icon { width: 32px !important; height: 32px !important; border-radius: 8px !important; }
  .perk-icon svg { width: 18px !important; height: 18px !important; }
  .perk-card strong { font-size: 16px !important; }
  .perk-text { display: none !important; }

  /* 3. plataformas: botões da mesma largura */
  .where-btns { flex-direction: column !important; width: 100% !important; margin-left: 0 !important; gap: 8px !important; }
  .where-btns a { display: block !important; text-align: center !important; padding: 14px 24px !important; font-size: 16px !important; }

  /* 5. interior da casa: só texto e botão */
  .rooms-wrap, .rooms-nav { display: none !important; }

  /* 6. mapa: menos distâncias, numa linha, mapa mais baixo */
  .map { gap: 16px !important; }
  .map > div:first-child { gap: 12px !important; }
  .map > div:first-child p { font-size: 14px !important; line-height: 1.45 !important; }
  .map-pills { flex-direction: row !important; flex-wrap: wrap !important; gap: 8px !important; }
  .pill { font-size: 13px !important; padding: 8px 12px !important; }
  .pill-1, .pill-3 { display: none !important; }
  .map-box { height: 240px !important; }

  /* "Around the island": só o botão do guia; cartões de fotos saem */
  .exp { padding: 0 20px !important; }
  .exp-text, .exp-img { display: none !important; }
  .exp-card { min-height: 0 !important; padding: 16px !important; align-items: center !important; }
  .exp-btn { align-self: stretch !important; text-align: center !important; padding: 14px 24px !important; font-size: 16px !important; }

  /* 7. reserva em 3 passos: só número e título */
  .booking { gap: 24px !important; }
  .booking > div:first-child { gap: 16px !important; }
  .booking > div:first-child > div { gap: 8px !important; }
  .step { align-items: center !important; gap: 12px !important; }
  .step-n { width: 32px !important; height: 32px !important; font-size: 16px !important; }
  .step-text { display: none !important; }

  /* ---------- menu fixo: esconde ao descer (mobile.js) ---------- */
  nav[style*="sticky"]:not([data-screen-label]) { transition: transform .3s ease, padding .25s ease, background .25s ease !important; will-change: transform; }
  html.nav-hidden nav[style*="sticky"]:not([data-screen-label]) { transform: translateY(-110%); box-shadow: none !important; }

  /* ---------- A Casa ---------- */
  nav[data-screen-label="Rooms nav"] { top: calc(var(--navh, 110px) + 8px) !important; flex-wrap: nowrap !important; overflow-x: auto !important; justify-content: flex-start !important; max-width: calc(100vw - 32px); scrollbar-width: none; transition: top .3s ease, opacity .25s ease !important; padding: 6px !important; }
  nav[data-screen-label="Rooms nav"]::-webkit-scrollbar { display: none; }
  nav[data-screen-label="Rooms nav"] a { flex: none; padding: 7px 12px !important; font-size: 13px !important; }
  html.nav-hidden nav[data-screen-label="Rooms nav"] { top: 8px !important; }
  /* visualizador de fotos em ecrã inteiro */
  .lb { padding: 0 !important; gap: 0 !important; background: #14100B !important; justify-content: center !important; touch-action: pan-y; }
  .lb .lb-img { width: 100vw !important; max-width: 100vw !important; height: auto !important; max-height: 74vh !important; object-fit: contain !important; border-radius: 0 !important; box-shadow: none !important; }
  .lb .lb-cap { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); display: grid !important; grid-template-columns: auto 1fr auto; gap: 10px !important; font-size: 14px !important; line-height: 1.35; }
  .lb .lb-cap span:nth-child(2) { min-width: 0; }
  .lb .lb-prev, .lb .lb-next { top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)); transform: none !important; width: 40px !important; height: 40px !important; font-size: 20px !important; border-width: 1.5px !important; background: rgba(20,16,11,.4) !important; }
  .lb .lb-prev { left: 16px !important; } .lb .lb-next { right: 16px !important; background: #C47C20 !important; border-color: #C47C20 !important; }
  .lb .lb-close { top: calc(16px + env(safe-area-inset-top)) !important; right: 16px !important; width: 40px !important; height: 40px !important; font-size: 16px !important; }

  /* ---------- Reservar ---------- */
  .bk-banner { min-height: 300px !important; margin-top: -12px !important; }
  .bk-banner > div:last-child { padding: 20px 20px 92px !important; gap: 12px !important; }
  .bk-banner .bk-logo { width: 82vw !important; }
  .bk-banner .bk-sub { font-family: 'Nunito', sans-serif !important; font-size: 17px !important; font-weight: 700 !important; line-height: 1.35 !important; color: #FFD27A !important; max-width: 300px !important; }
  .pill-wrap { margin-top: -88px !important; padding: 0 12px !important; }
  .pill-wrap .guest-pill { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 !important; padding: 12px 8px 14px !important; border-radius: 22px !important; align-items: start !important; }
  .pill-wrap .guest-pill .guest-head { grid-column: 1 / -1; flex-direction: row !important; align-items: baseline !important; justify-content: space-between !important; gap: 8px !important; padding: 0 8px 10px !important; margin-bottom: 10px; border-bottom: 1px solid #E5DCCD; }
  .pill-wrap .guest-pill .guest-head br { display: none; }
  .pill-wrap .guest-pill .guest-item { flex-direction: column !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; padding: 0 4px !important; border-top: none !important; border-left: 1px solid #E5DCCD !important; text-align: center; }
  .pill-wrap .guest-pill .guest-head + .guest-item { border-left: none !important; }
  .pill-wrap .guest-pill .guest-item > div:first-child { align-items: center; }
  .pill-wrap .guest-pill .guest-item > div:first-child span:first-child { font-size: 14px !important; }
  .pill-wrap .guest-pill .guest-item > div:first-child span:last-child { font-size: 11px !important; }
  .pill-wrap .guest-pill .guest-item button { width: 28px !important; height: 28px !important; font-size: 16px !important; }
  /* calendário: um mês de cada vez, com preços */
  .cal-months > *:nth-child(n+2) { display: none !important; }
  .stay-grid section[data-screen-label="Calendar"][style] { padding-left: 0 !important; padding-right: 0 !important; }
  section[data-screen-label="Calendar"] > div { padding: 16px 10px 14px !important; gap: 14px !important; border-radius: 18px !important; }
  section[data-screen-label="Calendar"] > div > div:first-child { padding: 0 6px; }
  .cal-months [style*="repeat(7"] { gap: 3px !important; }
  .cal-months [style*="aspect-ratio"] { border-radius: 9px !important; gap: 3px !important; padding: 2px 0; }
  .cal-months [style*="aspect-ratio"] > span:first-child { font-size: 15px !important; }
  .cal-months .cal-price { display: block !important; font-size: 10px !important; font-weight: 700 !important; letter-spacing: -0.01em; max-width: 100%; overflow: hidden; }
  .cal-months .cal-eur, .cal-months .cal-out { display: none !important; }
  /* passos: só número e título */
  .steps { gap: 8px !important; }
  .steps > div { flex-direction: row !important; align-items: center !important; gap: 12px !important; padding: 12px 14px !important; }
  .steps > div > span:first-child { width: 32px !important; height: 32px !important; flex: none; font-size: 15px; }
  .steps .step-d { display: none !important; }
  /* condições e regras: linhas compactas */
  .conds, .rules { gap: 16px !important; }
  .conds .cond-grid, .rules .cond-grid { gap: 8px !important; }
  .cond { display: grid !important; grid-template-columns: 36px 1fr; align-items: center; column-gap: 12px !important; row-gap: 2px !important; padding: 12px 14px !important; }
  .cond > div:first-child { width: 36px !important; height: 36px !important; border-radius: 9px !important; grid-row: span 2; }
  .cond > div:first-child svg { width: 18px; height: 18px; }
  .cond strong { font-size: 15px !important; }
  .cond .cond-t { font-size: 13px !important; line-height: 1.4 !important; }
  .rules .cond-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .rule { grid-template-columns: 32px 1fr; padding: 10px 12px !important; }
  .rule > div:first-child { width: 32px !important; height: 32px !important; grid-row: auto; }
  .rule strong { font-size: 13px !important; line-height: 1.25; }
  .rule .cond-t { display: none !important; }
  /* mapa: sem texto, distâncias por baixo */
  .bk-map { gap: 14px !important; }
  .bk-map .map-intro, .bk-map .map-pills-in { display: none !important; }
  .bk-map .map-pills-out { display: flex !important; }
  .bk-map .gmaps-btn { font-size: 13px !important; padding: 8px 12px 8px 14px !important; right: 10px !important; bottom: 10px !important; }
  /* resumo da estadia: barra no fundo do ecrã */
  .stay-grid > .stay-card { display: none !important; }
  body:has(.m-bar.on) { padding-bottom: 96px; }
}
.m-bar { display: none; }
@media (max-width: 760px) {
  .m-bar { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 300; background: #2A2118; color: #FCFAF6; border-radius: 20px; box-shadow: 0 18px 40px rgba(42,33,24,.35); transform: translateY(160%); transition: transform .3s ease; overflow: hidden; }
  .m-bar.on { transform: none; }
  .m-bar-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; }
  .m-bar-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: transparent; color: inherit; padding: 0; text-align: left; font-family: 'Nunito', sans-serif; cursor: pointer; }
  .m-bar-dates { font-size: 12px; font-weight: 700; color: #FFD27A; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .m-bar-total { display: flex; align-items: center; gap: 8px; font-family: 'Fredoka', sans-serif; font-size: 19px; }
  .m-bar-total strong:empty { display: none; }
  .m-bar-chev { width: 8px; height: 8px; border-right: 1.6px solid #FCFAF6; border-bottom: 1.6px solid #FCFAF6; transform: translateY(-2px) rotate(225deg); transition: transform .2s ease; }
  .m-bar.open .m-bar-chev { transform: translateY(1px) rotate(45deg); }
  .m-bar-cta { flex: none; border: 0; background: #C47C20; color: #fff; font: 700 15px 'Nunito', sans-serif; padding: 12px 18px; border-radius: 999px; cursor: pointer; }
  .m-bar-sheet { padding: 16px 16px 4px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; border-bottom: 1px solid rgba(252,250,246,.12); max-height: 50vh; overflow-y: auto; }
  .m-bar-sheet > div { display: flex; justify-content: space-between; gap: 10px; }
}
