/* Desktop presentation for the public web build only.
   The shared game CSS remains unchanged for Android and iOS. */

.web-account-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  overflow: auto;
  color: #eef8fb;
  background:
    radial-gradient(circle at 50% 18%, rgba(44, 208, 210, .2), transparent 30rem),
    rgba(1, 10, 16, .94);
  backdrop-filter: blur(18px);
  animation: web-account-in .2s ease-out;
}

.web-account-gate.is-leaving { animation: web-account-out .2s ease-in forwards; }
.web-account-card {
  width: min(100%, 460px);
  padding: 32px;
  border: 1px solid #345c70;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(155deg, rgba(8, 41, 59, .98), rgba(2, 18, 28, .98));
  box-shadow: 0 32px 90px #000b, inset 0 1px rgba(255, 255, 255, .05);
}
.web-account-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(58, 220, 220, .55);
  border-radius: 18px;
  color: #56e5e2;
  background: rgba(20, 125, 136, .18);
  font-size: 2rem;
}
.web-account-kicker { margin: 0 0 6px; color: #ffbf21; font-size: .74rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.web-account-card h1 { margin: 0; font-size: clamp(2rem, 8vw, 2.7rem); line-height: 1; }
.web-account-copy { margin: 15px auto 22px; color: #afc5d0; line-height: 1.5; }
.web-account-user { margin: -6px 0 16px; color: #77e9e6; font-size: .82rem; font-weight: 800; }
.web-account-actions { display: grid; gap: 12px; }
.web-account-card button {
  width: 100%;
  min-height: 52px;
  border: 1px solid #426b7d;
  border-radius: 13px;
  color: #edf8fb;
  background: #0a2d40;
  font: 800 .96rem/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}
.web-account-card button:focus-visible { outline: 3px solid #55e0dc; outline-offset: 3px; }
.web-account-card button:disabled { cursor: wait; opacity: .58; }
.web-account-google { display: flex; align-items: center; justify-content: center; gap: 12px; color: #172026 !important; background: #fff !important; }
.web-google-g { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #4285f4; background: #eef3ff; font-size: 1.05rem; font-weight: 950; }
.web-account-guest { border-color: #dc9d16 !important; color: #07141b !important; background: linear-gradient(135deg, #ffca24, #ff9818) !important; }
.web-account-divider { display: flex; align-items: center; gap: 12px; color: #718d9b; font-size: .75rem; }
.web-account-divider::before, .web-account-divider::after { content: ""; height: 1px; flex: 1; background: #294b5c; }
.web-account-note, .web-account-status, .web-account-privacy { margin: 0; color: #809eac; font-size: .76rem; line-height: 1.45; }
.web-account-status { min-height: 2.2em; margin-top: 15px; color: #b6cbd4; }
.web-account-privacy { margin-top: 14px; }
.web-account-privacy a { color: #7be5e4; }
.web-account-manage { margin-top: 12px; display: flex; gap: 8px; }
.web-account-manage[hidden] { display: none; }
.web-account-manage button { min-height: 38px; padding: 7px; border: 0; color: #91adba; background: transparent; font-size: .72rem; }
.web-account-delete { color: #ff9898 !important; }
.web-account-choice { display: grid; gap: 12px; }
.web-account-choice[hidden] { display: none; }
.web-account-choice button { min-height: 76px; padding: 13px 16px; text-align: left; }
.web-account-choice button:first-child { border-color: #36d8d5; background: rgba(22, 110, 122, .3); }
.web-account-choice strong, .web-account-choice span { display: block; }
.web-account-choice span { margin-top: 5px; color: #a8c0ca; font-size: .8rem; font-weight: 600; }

@keyframes web-account-in { from { opacity: 0; } }
@keyframes web-account-out { to { opacity: 0; } }

@media (max-width: 520px) {
  .web-account-card { padding: 26px 20px; border-radius: 20px; }
  .web-account-mark { width: 56px; height: 56px; }
  .web-account-manage { flex-direction: column; }
}

@media (max-width: 600px) {
  html.public-web-game #app {
    width: 100%;
    max-width: 460px;
  }

  html.public-web-game .onboarding-name .setup-header {
    height: auto;
    min-height: 76px;
    padding: max(15px, env(safe-area-inset-top)) 16px 10px;
    font-size: 20px;
  }

  html.public-web-game .onboarding-name .garage-hero {
    height: clamp(220px, 58vw, 275px);
    background-position: center 28%;
  }

  html.public-web-game .onboarding-name .garage-sign {
    top: 42px;
    left: 15%;
    width: 49%;
    height: 50px;
    font-size: 22px;
  }

  html.public-web-game .onboarding-name .setup-body {
    width: 100%;
    margin: -21px 0 0;
    padding: 0 12px 24px;
  }

  html.public-web-game .onboarding-name .setup-panel {
    min-height: 0;
    padding: 19px 17px 18px;
    border-radius: 17px;
  }

  html.public-web-game .onboarding-name .heading {
    margin-bottom: 16px;
  }

  html.public-web-game .onboarding-name .heading h1 {
    font-size: 34px;
  }

  html.public-web-game .onboarding-name .heading p {
    font-size: 13px;
  }

  html.public-web-game .onboarding-name form label {
    font-size: 12px;
  }

  html.public-web-game .onboarding-name .setup-body input {
    height: 49px;
    padding: 11px 48px 11px 13px;
    font-size: 16px;
  }

  html.public-web-game .onboarding-name .name-field > span {
    right: 12px;
    top: 10px;
    width: 29px;
    height: 29px;
  }

  html.public-web-game .onboarding-name .name-suggestions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
  }

  html.public-web-game .onboarding-name .name-suggestions button {
    height: 40px;
    font-size: 11px;
  }

  html.public-web-game .onboarding-name .name-suggestions button:last-child {
    grid-column: 2;
  }

  html.public-web-game .onboarding-name .change-note {
    margin: 8px 0 12px;
    font-size: 11px;
  }

  html.public-web-game .onboarding-name .gold {
    height: 52px;
    font-size: 24px;
  }
}

/* Keep the logo-step artwork in proportion and give its title a clear panel. */
html.public-web-game .onboarding-logo {
  width: 100%;
  max-width: 760px;
  min-height: 100svh;
  height: auto;
  margin-inline: auto;
  overflow: visible;
  background-color: #001b2c;
  background-image: none;
}

html.public-web-game .onboarding-logo .logo-layout {
  display: flex;
  width: min(calc(100% - 28px), 720px);
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin: 12px auto max(20px, env(safe-area-inset-bottom));
}

html.public-web-game .onboarding-logo .setup-header {
  z-index: 5;
  height: 76px;
  padding: 10px 20px 8px;
  align-items: center;
  background: linear-gradient(rgba(0, 17, 29, .96), rgba(0, 17, 29, .72));
}

html.public-web-game .onboarding-logo .logo-hero {
  position: relative;
  width: 100%;
  height: clamp(300px, min(103vw, calc(100svh - 10px)), 564px);
  flex: none;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(79, 127, 151, .72);
  border-radius: 12px;
  background-color: #061b2d;
  background-image: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .26);
}

html.public-web-game .onboarding-logo .logo-hero > .logo-truck-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center !important;
}

html.public-web-game .onboarding-logo .logo-selection {
  display: flex;
  width: 100%;
  flex-direction: column;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(79, 127, 151, .72);
  border-radius: 15px;
  background: rgba(4, 34, 53, .94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .26), inset 0 1px rgba(255, 255, 255, .04);
}

html.public-web-game .onboarding-logo .logo-selection-title {
  margin: 0 0 10px;
  color: #eef8fb;
  font: 26px/1.1 League, Arial, sans-serif;
  text-align: center;
}

html.public-web-game .onboarding-logo .logo-selection .logo-grid {
  margin: 0;
}

html.public-web-game .onboarding-logo .logo-selection .logo-grid button {
  min-height: 0;
  aspect-ratio: 1.1;
}

html.public-web-game .onboarding-logo .logo-selection > .gold {
  min-height: 54px;
  margin-top: 12px;
}

@media (min-width: 600px) {
  html.public-web-game .onboarding-logo .logo-selection .logo-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
  }

  html.public-web-game .onboarding-logo .logo-selection .logo-grid button {
    aspect-ratio: 1.05;
    padding: 5px;
  }

}

@media (min-width: 600px) and (max-width: 899px) {
  html.public-web-game .onboarding-logo .logo-layout {
    width: min(calc(100% - 36px), 760px);
  }
}

@media (max-width: 599px) {
  html.public-web-game .onboarding-logo .setup-header {
    height: 70px;
    padding: 8px 16px;
  }

  html.public-web-game .onboarding-logo .logo-layout {
    width: calc(100% - 18px);
    gap: 10px;
    margin-top: 9px;
  }

  html.public-web-game .onboarding-logo .logo-selection {
    padding: 10px;
    border-radius: 13px;
  }

  html.public-web-game .onboarding-logo .logo-selection-title {
    margin-bottom: 8px;
    font-size: 23px;
  }
}

@media (min-width: 900px) {
  html.public-web-game,
  html.public-web-game body {
    min-height: 100%;
    background-color: #020c13;
  }

  html.public-web-game body {
    overflow-x: hidden;
    background-image:
      radial-gradient(circle at 18% 18%, rgba(22, 211, 194, 0.09), transparent 28rem),
      radial-gradient(circle at 82% 76%, rgba(255, 184, 0, 0.07), transparent 30rem),
      linear-gradient(115deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
      linear-gradient(25deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
    background-size: auto, auto, 42px 42px, 42px 42px;
  }

  html.public-web-game #app {
    width: min(760px, 100%);
    max-width: 760px;
    min-height: 100svh;
    margin-inline: auto;
    border-inline: 1px solid rgba(91, 147, 174, 0.35);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.35),
      0 0 80px rgba(0, 0, 0, 0.62);
  }

  /* Give first-time setup a calmer, centered form on desktop web. */
  html.public-web-game .onboarding-name .garage-hero {
    height: 320px;
    background-position: center 38%;
  }

  html.public-web-game .onboarding-name .garage-sign {
    top: 52px;
  }

  html.public-web-game .onboarding-name .setup-body {
    width: min(calc(100% - 64px), 650px);
    margin: -30px auto 0;
    padding: 0 0 34px;
  }

  html.public-web-game .onboarding-name .setup-panel {
    min-height: 0;
    padding: 25px 30px 26px;
    border-color: rgba(113, 153, 173, 0.58);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(3, 27, 43, .96), rgba(1, 17, 29, .97));
    box-shadow: 0 16px 42px rgba(0, 0, 0, .38), inset 0 1px rgba(255, 255, 255, .035);
  }

  html.public-web-game .onboarding-name .heading {
    margin-bottom: 19px;
  }

  html.public-web-game .onboarding-name .heading h1 {
    font-size: 38px;
  }

  html.public-web-game .onboarding-name .heading p {
    margin-top: 6px;
    font-size: 14px;
  }

  html.public-web-game .onboarding-name form label {
    margin-bottom: 7px;
    font-size: 13px;
  }

  html.public-web-game .onboarding-name .setup-body input {
    height: 52px;
    font-size: 19px;
  }

  html.public-web-game .onboarding-name .name-suggestions {
    gap: 9px;
    margin: 11px 0;
  }

  html.public-web-game .onboarding-name .name-suggestions button {
    height: 42px;
    font-size: 11px;
  }

  html.public-web-game .onboarding-name .change-note {
    margin: 8px 0 13px;
    font-size: 12px;
  }

  html.public-web-game .onboarding-name .gold {
    height: 54px;
    border-radius: 12px;
    font-size: 25px;
  }

  html.public-web-game .game > .hud {
    padding-inline: 24px;
  }

  html.public-web-game .game > .content {
    padding-inline: 20px;
  }

  html.public-web-game .game > .content:has(.dashboard-map) {
    padding-inline: 0;
  }

  html.public-web-game .fleet-status {
    left: 20px;
  }

  html.public-web-game .action-rail {
    right: 20px;
  }

  html.public-web-game .game > nav {
    left: 50%;
    width: min(760px, 100%);
    padding-inline: 16px;
    transform: translateX(-50%);
  }

  html.public-web-game #web-simulated-banner {
    width: min(760px, 100%);
  }

  html.public-web-game.native-banner-visible #app::after {
    width: min(760px, 100%);
  }
}

/* Simple, fluid company-name setup for the public web game. */
html.public-web-game .onboarding-name {
  width: 100%;
  min-height: 100svh;
  height: auto;
  overflow: visible;
  background: #001b2c;
}

html.public-web-game .onboarding-name .garage-hero {
  height: clamp(270px, 43svh, 410px);
  background-image: url('../Truck-UI/01-company-name/Backgrounds/background_company_name_1080x1920.webp');
  background-position: center 34%;
  background-size: cover;
  background-repeat: no-repeat;
}

html.public-web-game .onboarding-name .garage-sign {
  display: none;
}

html.public-web-game .onboarding-name .setup-body {
  width: min(calc(100% - 40px), 640px);
  margin: -30px auto 0;
  padding: 0 0 max(28px, env(safe-area-inset-bottom));
}

html.public-web-game .onboarding-name .setup-panel {
  min-height: 0;
  padding: clamp(22px, 4vw, 34px);
  border-color: rgba(113, 153, 173, .62);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(3, 27, 43, .97), rgba(1, 17, 29, .98));
  box-shadow: 0 16px 42px rgba(0, 0, 0, .4), inset 0 1px rgba(255, 255, 255, .04);
}

html.public-web-game .onboarding-name .heading {
  margin: 0 0 22px;
  text-align: center;
}

html.public-web-game .onboarding-name .heading h1 {
  font-size: clamp(34px, 5vw, 46px);
}

html.public-web-game .onboarding-name .heading p {
  margin-top: 8px;
  font-size: clamp(13px, 1.8vw, 16px);
}

html.public-web-game .onboarding-name form label {
  display: block;
  margin-bottom: 9px;
  color: #42ddb2;
  font-size: 14px;
  font-weight: 800;
}

html.public-web-game .onboarding-name .setup-body input {
  width: 100%;
  height: 58px;
  padding: 13px 54px 13px 16px;
  border: 2px solid #ffae13;
  border-radius: 12px;
  background: #062236;
  font-size: clamp(17px, 2.5vw, 21px);
}

html.public-web-game .onboarding-name .name-field > span {
  top: 13px;
  right: 15px;
}

html.public-web-game .onboarding-name .change-note {
  margin: 12px 0 18px;
  color: #afc2cc;
  font-size: 13px;
  text-align: center;
}

html.public-web-game .onboarding-name .gold {
  min-height: 58px;
  height: auto;
  font-size: 27px;
}

html.public-web-game .onboarding-name .suggest-name {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 10px auto 0;
  padding: 10px 16px;
  border: 1px solid #345b70;
  border-radius: 10px;
  color: #8be4df;
  background: transparent;
  font: 700 14px/1.2 Arial, sans-serif;
}

html.public-web-game .onboarding-name .suggest-name span {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 600px) {
  html.public-web-game #app {
    width: 100%;
    max-width: 460px;
  }

  html.public-web-game .onboarding-name .setup-header {
    min-height: 76px;
    height: auto;
    padding: max(15px, env(safe-area-inset-top)) 16px 10px;
  }

  html.public-web-game .onboarding-name .garage-hero {
    height: clamp(270px, 42svh, 360px);
    background-position: center 34%;
  }

  html.public-web-game .onboarding-name .setup-body {
    width: calc(100% - 24px);
    margin-top: -24px;
  }

  html.public-web-game .onboarding-name .setup-panel {
    padding: 22px 18px 20px;
    border-radius: 18px;
  }

  html.public-web-game .onboarding-name .heading {
    margin-bottom: 18px;
  }

  html.public-web-game .onboarding-name .heading h1 {
    font-size: 36px;
  }

  html.public-web-game .onboarding-name form label {
    font-size: 13px;
  }

  html.public-web-game .onboarding-name .setup-body input {
    height: 54px;
    font-size: 17px;
  }

  html.public-web-game .onboarding-name .gold {
    min-height: 56px;
    font-size: 25px;
  }
}
