/* Petbucket v2 site preferences, isolated to the Flea Collarz tenant.
   Uses the shared site-preferences.js controller and native preference routes. */
.pb-prefs, .pb-prefs-pill {
  --pb-band: #EEF2F7;
  --pb-blue: #567BDA;
  --pb-blue-100: #DCE6FA;
  --pb-blue-dark: #3961c8;
  --pb-border: #DCE2EA;
  --pb-radius: 12px;
  --pb-radius-pill: 999px;
  --pb-radius-sm: 8px;
  --pb-shadow-lg: 0 4px 12px rgba(31, 41, 55, 0.08), 0 16px 40px rgba(31, 41, 55, 0.10);
  --pb-shadow-sm: 0 1px 2px rgba(31, 41, 55, 0.06);
  --pb-text: #4B5563;
  --pb-text-dark: #1F2937;
  --pb-text-fade: #9CA3AF;
  --pb-text-muted: #6B7280;
  font-family: var(--font-sans, system-ui, sans-serif);
}
.pb-prefs-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--pb-border);
  border-radius: 999px;
  background: #fff;
  color: var(--pb-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.pb-prefs-pill:hover,
.pb-prefs-pill:focus-visible {
  border-color: var(--pb-blue);
  color: var(--pb-blue);
  outline: none;
}

.pb-prefs-pill__sep {
  color: var(--pb-text-fade);
  font-weight: 400;
}

.pb-prefs-pill__icon {
  flex-shrink: 0;
  opacity: 0.75;
}

.pb-prefs-pill__value {
  display: inline-block;
  letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────────────────────────────
 * Site Preferences dialog — destination / language / currency.
 *
 * One layout, centred on both desktop and mobile (mobile only resizes
 * the card to ~90% viewport width). The close × in the top-right is
 * the only dismiss control — no Cancel button.
 *
 * The selects use a single-line BEM block (`.pb-prefs__select`) that
 * wraps the native control so we can paint the chevron consistently
 * across browsers. Native `<select>` chrome is hidden via
 * `appearance: none`.
 *
 * Class names use the `.pb-prefs__*` BEM convention; the legacy
 * `.pb-prefs-modal__*` names were retired with the redesign.
 * ───────────────────────────────────────────────────────────────────── */

.pb-prefs {
  width: 92%;
  max-width: 320px;
  margin: auto;
  padding: 16px 18px 14px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--pb-text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.4;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 30px rgba(15, 23, 42, 0.12);
}

.pb-prefs::backdrop {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.pb-prefs__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--pb-text-muted);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.pb-prefs__close:hover,
.pb-prefs__close:focus-visible {
  color: var(--pb-text-dark);
  background: var(--pb-band);
  outline: none;
}

.pb-prefs__head { margin: 0 0 10px; padding-right: 24px; }

.pb-prefs__title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--pb-text-dark);
  letter-spacing: -0.005em;
}

.pb-prefs__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pb-prefs__field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 0;
}

.pb-prefs__label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--pb-text-muted);
}

/* Wrapper that paints the chevron and owns the focus ring. The inner
   <select> is reset to a transparent control so the box style is
   consistent across Chromium / WebKit / Firefox. */
.pb-prefs__select {
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid var(--pb-border);
  border-radius: 7px;
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.pb-prefs__select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 11px;
  width: 7px;
  height: 7px;
  pointer-events: none;
  border-right: 1.5px solid var(--pb-text-muted);
  border-bottom: 1.5px solid var(--pb-text-muted);
  transform: translateY(-70%) rotate(45deg);
}
.pb-prefs__select:focus-within {
  border-color: var(--pb-blue);
  box-shadow: 0 0 0 3px rgba(86, 123, 218, 0.18);
}
.pb-prefs__select > select {
  width: 100%;
  height: 32px;
  padding: 0 30px 0 11px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--pb-text-dark);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}
.pb-prefs__select > select:focus { outline: none; }

.pb-prefs__footnote {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--pb-text-muted);
}

.pb-prefs__actions {
  display: flex;
  margin-top: 10px;
}

.pb-prefs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 34px;
  padding: 0 16px;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.pb-prefs__btn--primary {
  background: var(--pb-blue);
  color: #fff;
}
.pb-prefs__btn--primary:hover  { background: var(--pb-blue-dark); }
.pb-prefs__btn--primary:disabled { opacity: 0.55; cursor: not-allowed; }
.pb-prefs__btn--primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(86, 123, 218, 0.35);
}

/* Mobile keeps the same centred layout — just shrinks the card to a
   comfortable 90% of the viewport (a full-width sheet looked weird per
   user feedback) and bumps select / button heights for thumb reach.
   iOS auto-zooms on focus when the input font is below 16px, so we
   raise the select font on mobile only. */
@media (max-width: 480px) {
  .pb-prefs {
    width: 90%;
    max-width: 90%;
    padding: 16px 16px 14px;
  }
  .pb-prefs__form { gap: 7px; }
  .pb-prefs__select > select { height: 40px; font-size: 16px; }
  .pb-prefs__btn { height: 42px; font-size: 14px; }
}


/* Current Petbucket v2 control refinements. */
.pb-prefs-pill { border-radius: var(--pb-radius-pill); border-color: var(--pb-blue-100); padding: 4px 12px; transition: border-color 120ms ease, box-shadow 120ms ease; }
.pb-prefs-pill:hover { border-color: var(--pb-blue); box-shadow: var(--pb-shadow-sm); }
.pb-prefs { border-radius: var(--pb-radius); box-shadow: var(--pb-shadow-lg); }
.pb-prefs__select, .pb-prefs__btn { border-radius: var(--pb-radius-sm); }
.pb-prefs__btn--primary { border-radius: var(--pb-radius-pill); }
