/* Roamavia native app — simplified task-first interface. */
:root {
  color-scheme: light;
  --bg: #f7fbff;
  --card: #ffffff;
  --line: #dce9f4;
  --purple: #347fab;
  --cyan: #5b9fd3;
  --action: #2f78a8;
  --action-strong: #215f8a;
  --text: #18324a;
  --muted: #71869a;
  --chrome: rgba(255, 255, 255, .96);
  --nav: rgba(255, 255, 255, .98);
  --sheet: #ffffff;
  --field: #edf6fc;
}

html[data-colour-style] {
  --purple: #347fab;
  --cyan: #5b9fd3;
  --action: #2f78a8;
  --action-strong: #215f8a;
}

html[data-colour-style] body {
  background-image: none;
}

html,
body {
  background: var(--bg);
}

html body button:not(.backdrop) {
  color: var(--text);
}

html body button:focus-visible,
html body summary:focus-visible,
html body a:focus-visible {
  outline: 3px solid #2f78a8;
  outline-offset: 3px;
}

.app {
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.topbar {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: calc(var(--safe-top) + 13px) 20px 13px;
  border-color: var(--line);
  background: var(--chrome);
  box-shadow: none;
}

.brand,
.wordmark {
  background: linear-gradient(100deg, #20d9e4, #a15cff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -.04em;
  -webkit-text-fill-color: transparent;
}

.topbar .brand {
  justify-self: center;
  text-align: center;
}

.header-balance {
  display: none !important;
}

main {
  max-width: 560px;
  padding: 23px 18px;
}

#home > h1 {
  margin: 2px 0 18px;
  color: var(--text);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -.045em;
}

.eyebrow,
.pale {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
}

#home .hero.payg-card,
#home .card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--card);
  color: var(--text);
  box-shadow: none;
}

.rate-reminder-banner {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  padding: 13px 14px;
  border: 1px solid #b9d9ee;
  border-radius: 14px;
  background: #edf7fd;
  color: var(--text);
  text-align: left;
}

.rate-reminder-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--action);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.rate-reminder-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rate-reminder-copy b {
  font-size: 13px;
  font-weight: 750;
}

.rate-reminder-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.rate-reminder-copy em {
  color: var(--action-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

#home .hero.payg-card {
  margin: 0 0 14px;
  padding: 20px;
}

#home .hero.payg-card::after,
#home .bubbles {
  display: none;
}

#home .payg-card h2,
#home .payg-card .balance,
#home .payg-card .label {
  color: var(--text);
}

#home .payg-card h2 {
  font-size: 18px;
  font-weight: 650;
}

.app-balance-heading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

#home .payg-card .label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

#home .payg-card .balance {
  margin: 17px 0 0;
  text-align: center;
  font-size: 48px;
  font-weight: 650;
  letter-spacing: -.055em;
}

#home .payg-card .pill {
  padding: 6px 9px;
  border-color: var(--line);
  background: var(--field);
  color: var(--muted);
}

#home .payg-card .pill.active {
  border-color: #cfe5f5;
  background: #edf7fd;
  color: #3f83b6;
}

.balance-refresh {
  position: absolute;
  right: 0;
  width: auto;
  height: auto;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

#home .payg-card .balance-data-estimate {
  justify-content: center;
  margin: 10px auto 14px;
  text-align: center;
  border-color: var(--line);
  background: var(--field);
  color: var(--text);
}

#home .payg-card .balance-data-estimate span:last-child {
  color: var(--text);
}

#home .payg-card .button {
  width: 100%;
  min-height: 48px;
  margin-top: 20px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
}

#home .payg-card .button.light,
.button.primary,
.button.light {
  border: 1px solid var(--action);
  background: var(--action);
  color: #ffffff;
}

html[data-colour-style] .button.primary,
html[data-colour-style] .button.light {
  border-color: var(--action);
  background: var(--action);
  color: #ffffff;
}

.button.secondary,
html[data-colour-style] .button.secondary {
  border: 1px solid #a9cee5;
  background: #edf7fd;
  color: var(--action-strong);
}

.button.danger,
html[data-colour-style] .button.danger {
  border: 1px solid #d9949c;
  background: #fff1f2;
  color: #9b2f3d;
}

.text-button,
.receipt-button,
.global-back,
.global-support-link,
.support-human-button,
.signup-change-email {
  color: var(--action-strong);
  font-weight: 750;
  text-decoration-color: #8ebbd7;
}

#home .payg-card .button.glass {
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--text);
}

.balance-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}

.balance-links button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.balance-links .network-finder-link {
  border-color: #b9d9ee;
  background: #edf7fd;
  color: var(--action-strong);
  font-weight: 750;
}

.network-finder-link span {
  margin-right: 4px;
  font-size: 17px;
  line-height: 0;
}

.network-card .network-connect-guide {
  border-color: #b9d9ee;
  background: #edf7fd;
  color: var(--action-strong);
  font-weight: 750;
}

.first-use-card {
  padding: 21px !important;
}

.first-use-heading {
  display: block;
}

.first-use-card h2 {
  margin-top: 5px;
  font-size: 23px;
  font-weight: 650;
}

.first-use-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.first-use-amounts,
.amount-grid.first-topup-amounts {
  gap: 8px;
}

.first-use-amounts .topup-choice,
.amount-grid.first-topup-amounts .topup-choice {
  min-height: 66px;
  padding: 14px 11px !important;
  border-color: var(--line) !important;
  border-radius: 13px !important;
  background: var(--field) !important;
  box-shadow: none !important;
}

.first-use-amounts .topup-choice.recommended {
  border-color: #a9d2ee !important;
  background: #edf7fd !important;
}

.first-use-amounts .topup-choice em {
  background: var(--action);
  color: #fff;
}

.holiday-current-plan-card {
  padding: 19px !important;
}

.holiday-current-plan-card h2 {
  font-size: 20px;
  font-weight: 650;
}

nav.tabbar {
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(68px + env(safe-area-inset-bottom));
  gap: 0;
  padding: 6px 5px env(safe-area-inset-bottom);
  border-width: 1px 0 0;
  border-color: var(--line);
  border-radius: 0;
  background: var(--nav);
  box-shadow: 0 -5px 24px rgba(22, 32, 26, .07);
}

nav.tabbar::before {
  display: none;
}

nav.tabbar button {
  min-height: 55px;
  border-radius: 8px;
  color: var(--muted);
}

nav.tabbar button.active {
  background: transparent;
  color: var(--action);
  box-shadow: none;
}

html[data-colour-style] nav.tabbar button.active {
  background: transparent;
  color: var(--action);
  box-shadow: none;
}

nav.tabbar button svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.7;
}

nav.tabbar button small {
  font-size: 9px;
  font-weight: 650;
}

.sheet-card,
.card,
.menu,
.travel-ready-card,
.global-summary-link {
  box-shadow: none;
}

.connectivity-setting-icon {
  color: var(--action);
  font-size: 12px;
}

#online.offline .connectivity-setting-icon {
  color: #d66b6b;
}

#topup-sheet #topup-amounts.compact-topup-amounts button {
  min-height: 68px;
  align-items: center;
  justify-content: center;
  padding: 12px !important;
  border-color: var(--line) !important;
  background: #f5faff !important;
  text-align: center;
}

#topup-sheet #topup-amounts .topup-credit {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

#home .payg-card .payg-reserve {
  border-color: #d9d2f5;
  background: #f3f0ff;
  color: #413b78;
  box-shadow: none;
}

#home .payg-card .payg-reserve .reserve-compact-heading h2,
#home .payg-card .reserve-state-pill,
#home .payg-card .payg-reserve p,
#home .payg-card .reserve-explainer summary {
  color: #62599f;
}

#home .payg-card .reserve-compact-icon {
  background: #e7e1ff;
}

#home .payg-card .reserve-inline-action,
#home .payg-card .reserve-action {
  border-color: #cfc6f0;
  background: #7b70c9;
  color: #ffffff;
}

#reserve-sheet .button.primary,
#reserve-suggestion-sheet .button.primary {
  background: #7b70c9;
}

/* Consistent contrast for the app's card-style actions. */
.account-profile-card,
.account-setting-link,
.menu,
.global-action,
.global-summary-link,
.travel-ready-card,
.credit-auto-topup,
.referral-card,
.giveaway-card,
.plan-package,
.plan-topup-button,
.holiday-sim-primary,
.plan-connection-help,
.country-choice,
.support-prompts button,
.social-auth-button.google {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

.account-profile-card small,
.account-setting-link small,
.menu small,
.global-action small,
.global-summary-link small,
.travel-ready-card small,
.credit-auto-topup small,
.referral-card em,
.giveaway-card em {
  color: #607b93;
}

.close,
.network-search-clear {
  border: 1px solid var(--line);
  background: #edf6fc;
  color: var(--action-strong);
}

.toggle {
  background: #9aabb9;
}

.toggle[aria-checked="true"] {
  background: var(--action);
}

button:disabled {
  opacity: .65;
}

/* Restore a real desktop layout after the mobile-first simplification layer. */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  body {
    min-width: 900px;
    overflow-x: hidden;
  }

  .app {
    min-height: 100vh;
    padding: 0 0 40px 230px;
  }

  .topbar {
    min-height: 76px;
    padding: 17px 36px;
  }

  .topbar .brand {
    font-size: 28px;
  }

  main {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 46px 84px;
  }

  #home.view.active {
    max-width: 820px;
    margin: 0 auto;
  }

  #home > h1 {
    font-size: 36px;
  }

  #signed-in-home:not(.hidden) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  #signed-in-home > * {
    min-width: 0;
  }

  .rate-reminder-banner {
    grid-column: 1 / -1;
  }

  #home .hero.payg-card {
    padding: 28px;
  }

  #home .payg-card .balance {
    font-size: 58px;
  }

  .plans-view.active,
  .esim-view.active,
  #global.view.active,
  #network.view.active,
  #account.view.active {
    width: 100%;
    max-width: 1080px;
    margin-right: auto;
    margin-left: auto;
  }

  nav.tabbar {
    left: 24px;
    right: auto;
    top: 100px;
    bottom: 24px;
    width: 182px;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 44px rgba(30, 74, 107, .12);
  }

  nav.tabbar button {
    min-height: 58px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 10px 13px;
    border: 1px solid transparent;
    border-radius: 13px;
    background: transparent;
    color: #5f7488;
    text-align: left;
  }

  nav.tabbar button span {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 9px;
    background: #edf6fc;
  }

  nav.tabbar button.active,
  html[data-colour-style] nav.tabbar button.active {
    border-color: #b9d9ee;
    background: #edf7fd;
    color: var(--action-strong);
  }

  nav.tabbar button small {
    font-size: 13px;
    font-weight: 700;
  }

  .sheet {
    align-items: center;
    justify-content: center;
    padding: 30px;
  }

  .sheet-card {
    width: min(700px, 100%);
    max-height: calc(100dvh - 60px);
    padding: 34px 30px;
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(30, 62, 89, .22);
  }
}

@media (min-width: 1320px) and (hover: hover) and (pointer: fine) {
  .app {
    padding-left: 260px;
  }

  nav.tabbar {
    left: max(28px, calc((100vw - 1540px) / 2));
    width: 204px;
  }
}
