/* The colour theme switch (two labelled choices in menus, one quiet icon elsewhere) and the light theme's depth and colour. */
.theme-switch {
  display: grid;
  gap: 8px;
}

.theme-switch-label {
  color: var(--color-silver-500);
  font-size: .8125rem;
  font-weight: 600;
}

.theme-switch-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--color-well);
}

.theme-switch-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 10px;
  border-radius: 9px;
  color: var(--color-silver-400);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.theme-switch-option:hover {
  color: var(--color-silver-100);
}

.theme-switch-option[aria-pressed="true"] {
  background: var(--color-surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-shade) 12%, transparent);
  color: var(--color-paper);
}

.theme-switch.is-compact {
  display: inline-flex;
  align-items: center;
}

.theme-switch.is-compact.has-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--color-silver-500);
  cursor: pointer;
  touch-action: manipulation;
  transition: color .15s ease, background-color .15s ease;
}

.theme-toggle:hover {
  background: var(--color-raised);
  color: var(--color-silver-100);
}

.station .theme-toggle {
  width: 44px;
  height: 44px;
}

.theme-toggle [data-theme-icon] {
  display: none;
}

:root[data-theme="dark"] .theme-toggle [data-theme-icon="light"],
:root[data-theme="light"] .theme-toggle [data-theme-icon="dark"] {
  display: grid;
}

.kiosk-menu-theme {
  padding: 4px 12px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--color-line);
}

.staff-login-brand .theme-switch {
  margin-left: auto;
}

.control-bar > .theme-switch {
  grid-column: 3;
  justify-self: end;
}

.control-auth-theme {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.admin-sidebar-theme {
  margin-top: 18px;
  padding: 12px 12px 0;
  border-top: 1px solid var(--color-line);
}

@media (max-width: 760px) {
  .admin-sidebar-theme {
    margin-top: 10px;
    padding: 8px 0 0;
  }
}

:root[data-theme="light"] :is(body, .station, .kiosk, .control-body, .control-auth, .setup-page) {
  background:
    radial-gradient(1200px 560px at -5% -12%, color-mix(in srgb, var(--color-paper) 11%, transparent), transparent 70%),
    radial-gradient(1000px 520px at 105% -8%, color-mix(in srgb, var(--color-tag-ice) 11%, transparent), transparent 70%),
    radial-gradient(1100px 640px at 50% 118%, color-mix(in srgb, var(--color-note-violet) 7%, transparent), transparent 70%),
    var(--color-ink);
  background-attachment: fixed;
}

:root[data-theme="light"] :is(.panel, .lgd-app-card, .bar-order, .bar-station-tile, .reception-reader-strip, .staff-login-reader,
  .cashier-desk, .bar-category, .bar-tab) {
  box-shadow: 0 1px 2px color-mix(in srgb, var(--color-shade) 5%, transparent),
    0 10px 28px -16px color-mix(in srgb, var(--color-shade) 22%, transparent);
}

:root[data-theme="light"] .bar-product {
  box-shadow: inset 0 4px 0 var(--tag, var(--color-line)), 0 1px 2px color-mix(in srgb, var(--color-shade) 6%, transparent),
    0 10px 24px -16px color-mix(in srgb, var(--color-shade) 26%, transparent);
}

:root[data-theme="light"] .lgd-app-card[href]:hover {
  border-color: color-mix(in srgb, var(--color-paper) 40%, var(--color-line));
  box-shadow: 0 16px 36px -18px color-mix(in srgb, var(--color-paper) 45%, transparent);
}

:root[data-theme="light"] .lgd-app-card-icon {
  box-sizing: content-box;
  padding: 9px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-paper) 10%, var(--color-surface));
  color: var(--color-paper);
}

:root[data-theme="light"] .btn-primary {
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--color-paper) 80%, transparent);
}

:root[data-theme="light"] :is(.reception-tab[aria-current="page"], .bar-tab[aria-pressed="true"]) {
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-paper) 22%, var(--color-line)),
    0 8px 18px -12px color-mix(in srgb, var(--color-paper) 55%, transparent);
}

:root[data-theme="light"] .admin-nav-link.is-active {
  background: color-mix(in srgb, var(--color-paper) 9%, var(--color-surface));
  color: var(--color-paper);
}
