/* Copyright (c) 2026 PrepLocal. All rights reserved. */
/* PrepLocal's own list for every drop-down (pl-select.js), in place of the phone's grey wheel and
   the browser's menu. The closed field keeps the look every box has (theme.css); this is the
   list that opens from it.

   Its colours are variables, as the calendar's are (pl-datepicker.css). In the console, Internal
   Tools and the customer pages they are the theme's, so it follows day and night. On a kitchen's
   website they are the site's own, set at the end of this file. A page without the theme (the
   front page's Get started form) gets the theme's day values from the fallbacks. */
.pl-select-list {
  --pl-select-fill: var(--pl-primary, #1e3a8a);  /* the chosen option */
  --pl-select-on-fill: var(--pl-on-primary, #ffffff);
  --pl-select-mark: var(--pl-primary, #1e3a8a);  /* the tick, what the pointer or keys are on */
  --pl-select-soft: var(--pl-primary-soft, rgba(30, 58, 138, 0.1));
  position: fixed;
  z-index: 2147483000;
  box-sizing: border-box;
  max-width: calc(100vw - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--pl-border, #c9ddf2);
  border-radius: var(--pl-radius-md, 12px);
  background: var(--pl-surface, #ffffff);
  color: var(--pl-ink, #1f2a4a);
  box-shadow: var(--pl-shadow-pop, 0 12px 32px rgb(16 28 45 / 0.18));
  font-family: var(--pl-font, 'Archivo', system-ui, sans-serif);
  font-size: 0.9rem;
  line-height: 1.3;
}
select.pl-select {
  cursor: pointer;
}
.pl-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;                              /* a finger's tap */
  padding: 8px 12px 8px 34px;
  border: 0;
  border-radius: var(--pl-radius-sm, 8px);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
}
.pl-select-option:hover:not([disabled]),
.pl-select-option:focus-visible {
  background: var(--pl-select-soft);
  color: var(--pl-select-mark);
  outline: none;
}
.pl-select-option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--pl-select-mark);
}
.pl-select-option[aria-selected="true"] {
  font-weight: 700;
  color: var(--pl-select-mark);
}
.pl-select-option[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 6px;
  height: 11px;
  margin-top: -7px;
  border: solid var(--pl-select-mark);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.pl-select-option[disabled] {
  opacity: 0.4;
  cursor: default;
}
.pl-select-group {
  padding: 10px 12px 4px;
  color: var(--pl-muted, #4e5672);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* On a kitchen's website (body.site-branded): its own colours, type and corners (sitestyle.py),
   each pair already checked for contrast - --accent-text is the accent as words. */
.site-branded .pl-select-list {
  --pl-surface: var(--site-surface);
  --pl-ink: var(--ink);
  --pl-muted: var(--muted);
  --pl-border: var(--border);
  --pl-font: var(--site-body-font);
  --pl-select-fill: var(--accent);
  --pl-select-on-fill: var(--on-accent);
  --pl-select-mark: var(--accent-text);
  --pl-select-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: var(--radius);
}
