/* ScrimMate Web — desktop layout and website polish. Loaded after every other stylesheet.
   Mobile (<768px) is untouched. 768–1023px keeps the bottom tab bar. 1024px and up gets a sidebar. */

/* ---------- Everywhere ---------- */
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: color-mix(in srgb, var(--primary) 32%, transparent); color: inherit; }
:where(button, a, input, select, textarea, summary, [tabindex], [data-action]):focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px;
}
.sm-app-shell__sidebrand, .sm-app-shell__sidecta { display: none; }

@media (pointer: fine) {
  [data-action]:not(:disabled) { cursor: pointer; }
  .sm-app-shell__content, .sm-bottom-sheet { scrollbar-width: thin; scrollbar-color: var(--outline) transparent; }
}
@media (hover: hover) {
  .sm-app-shell__tab:not(.is-active):hover { background: color-mix(in srgb, var(--surface-container-high) 75%, transparent); color: var(--on-surface); }
  .sm-app-shell__icon:hover { background: var(--surface-container-high); color: var(--on-surface); }
}

/* ---------- Sign-in page ---------- */
.sm-auth-aside { display: none; }
.sm-auth-page .sm-auth-card.auth-card { width: 100%; max-width: 28rem; margin-inline: auto; }

@media (min-width: 960px) {
  .sm-auth-page.sm-auth-page { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(27rem, 0.8fr) !important; align-items: stretch; justify-items: stretch; gap: 0; padding: 0; min-height: 100dvh; }
  .sm-auth-aside {
    display: flex; flex-direction: column; justify-content: space-between; gap: 3rem;
    position: relative; isolation: isolate; overflow: hidden; padding: 3rem clamp(2.5rem, 5vw, 5rem);
    background: #0b0c10; color: #f4f5f7; position: sticky; top: 0; align-self: start; height: 100dvh; box-sizing: border-box;
  }
  .sm-auth-aside::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("/maps/erangel_v1.webp") center / cover no-repeat; opacity: 0.55; filter: saturate(0.75); }
  .sm-auth-aside::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(9,9,11,0.45) 0%, rgba(9,9,11,0.94) 72%), radial-gradient(60% 45% at 15% 100%, rgba(246,196,69,0.2), transparent 70%); }
  .sm-auth-aside__brand { display: flex; align-items: center; gap: 0.7rem; font-size: 1.15rem; font-weight: 800; }
  .sm-auth-aside__copy h2 { margin: 0 0 1.75rem; max-width: 15ch; font-size: clamp(2.1rem, 3.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; font-weight: 800; color: #f4f5f7; }
  .sm-auth-aside__copy ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; max-width: 33rem; }
  .sm-auth-aside__copy li { padding-left: 1rem; border-left: 2px solid rgba(246,196,69,0.6); color: rgba(244,245,247,0.74); line-height: 1.5; font-size: 0.98rem; }
  .sm-auth-aside__copy li b { color: #f4f5f7; font-weight: 700; }
  .sm-auth-card .sm-auth-logo, .sm-auth-card .sm-auth-brand, .sm-auth-card .sm-auth-tagline { display: none; }
  .sm-auth-page .sm-auth-card.auth-card { align-self: center; justify-self: center; max-width: 27rem; background: transparent; border: 0; box-shadow: none; padding: 2rem 1.5rem; }
}

/* Logo in the sidebar and on the sign-in panel (the base logo style only sizes it inside the mobile header) */
.sm-auth-aside__brand .sm-logo-mark, .sm-app-shell__sidebrand .sm-logo-mark { display: block; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 10px; }

/* ---------- Setup-required screen ---------- */
.setup-required-screen { display: grid; place-items: center; min-height: 100dvh; padding: 1.5rem; box-sizing: border-box; }
.setup-required-screen .setup-required-card { width: 100% !important; max-width: 30rem !important; margin: 0 auto !important; }

/* ---------- Dialogs: centered on larger screens ---------- */
@media (min-width: 768px) {
  .sm-bottom-sheet-backdrop { justify-content: center; align-items: center; padding: 1.5rem; }
  .sm-bottom-sheet { width: min(34rem, 100%); margin: 0 auto; border: 1px solid var(--outline-variant); border-radius: 24px; padding-bottom: 24px; max-height: min(85dvh, 44rem); }
  .sm-sheet-handle { display: none; }
  .sm-coach-marks { background: rgba(0, 0, 0, 0.45); align-items: flex-end; padding: 1.5rem; }
  .sm-coach-card { width: min(24rem, 100%); margin-bottom: 0; }
}

/* ---------- Desktop: sidebar layout ---------- */
@media (min-width: 1024px) {
  .sm-app-shell.sm-app-shell:not(.sm-app-shell--task):not(.sm-app-shell--immersive) {
    display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "nav header" "nav main"; max-width: none; margin: 0; padding-bottom: 0;
  }
  .sm-app-shell.sm-app-shell:not(.sm-app-shell--task):not(.sm-app-shell--immersive) > .sm-app-shell__header { grid-area: header; padding: 0.85rem 2rem; min-height: 4.25rem; background: var(--surface); }
  .sm-app-shell.sm-app-shell:not(.sm-app-shell--task):not(.sm-app-shell--immersive) > .sm-app-shell__content { grid-area: main; padding: 1.75rem 2rem 3rem; max-width: 76rem; }
  .sm-app-shell.sm-app-shell:not(.sm-app-shell--task):not(.sm-app-shell--immersive) > .sm-app-shell__header .sm-app-shell__brand { display: none; }
  .sm-app-shell.sm-app-shell:not(.sm-app-shell--task):not(.sm-app-shell--immersive) > .sm-fab { display: none; }

  .sm-app-shell.sm-app-shell:not(.sm-app-shell--task):not(.sm-app-shell--immersive) > .sm-app-shell__nav {
    grid-area: nav; position: static !important; transform: none !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important;
    width: auto !important; max-width: none !important; height: auto; margin: 0 !important;
    display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem; padding: 1.1rem 0.85rem;
    border: 0 !important; border-right: 1px solid var(--outline-variant) !important; border-radius: 0 !important;
    background: var(--surface-container-low, var(--surface-container)) !important; backdrop-filter: none !important; box-shadow: none !important; overflow-y: auto;
  }
  .sm-app-shell__sidebrand { display: flex; align-items: center; gap: 0.65rem; padding: 0.3rem 0.8rem 1.25rem; font-size: 1.08rem; font-weight: 800; color: var(--on-surface); background: transparent; border: 0; border-radius: 0.75rem; text-align: left; }
  .sm-app-shell__nav .sm-app-shell__tab { flex-direction: row; justify-content: flex-start; gap: 0.8rem; min-height: 2.75rem; padding: 0 0.8rem; font-size: 0.92rem; font-weight: 650; border-radius: 0.75rem; position: relative; }
  .sm-app-shell__nav .sm-app-shell__tab span { font-size: 0.92rem !important; font-weight: 650 !important; letter-spacing: 0 !important; }
  .sm-app-shell__nav .sm-app-shell__tab svg { width: 1.3rem; height: 1.3rem; }
  .sm-app-shell__nav .sm-app-shell__tab.is-active { background: color-mix(in srgb, var(--primary) 14%, transparent) !important; color: var(--primary) !important; box-shadow: inset 3px 0 0 var(--primary) !important; }
  .sm-app-shell__nav .sm-app-shell__tab.is-active::before { display: none !important; }
  .sm-app-shell__sidecta { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: auto; min-height: 2.85rem; padding: 0 1rem; border-radius: 0.85rem; border: 1px solid color-mix(in srgb, var(--primary) 60%, transparent); background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); font-weight: 700; font-size: 0.92rem; }
  .sm-app-shell__sidecta svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
  @media (hover: hover) { .sm-app-shell__sidecta:hover { background: color-mix(in srgb, var(--primary) 22%, transparent); } }

  .sm-app-shell__global .sm-app-shell__icon[data-action="native.search"] { width: auto !important; min-width: 0; padding: 0 1rem 0 0.8rem !important; gap: 0.5rem; margin-right: 0.35rem; border-radius: 999px !important; border: 1px solid var(--outline-variant); background: var(--surface-container-low, var(--surface-container)); }
  .sm-app-shell__global .sm-app-shell__icon[data-action="native.search"]::after { content: "Search"; font-size: 0.85rem; font-weight: 600; }
  .sm-app-shell__global { gap: 0.4rem; align-items: center; }

  .hm-home { max-width: 60rem; }
}
