/* CryptoATM shared preference controls · v2.7.5
 * This file is the single visual source for Laravel, Laravel errors and
 * static Nginx errors. Do not duplicate these measurements elsewhere.
 */
:root {
  --pref-control-height: 42px;
  --pref-control-radius: 13px;
  --pref-menu-width: 204px;
  --pref-line: rgba(255, 255, 255, .11);
  --pref-surface: rgba(17, 20, 35, .86);
  --pref-surface-strong: rgba(22, 26, 44, .98);
  --pref-hover: rgba(255, 255, 255, .065);
  --pref-active: rgba(157, 134, 255, .13);
  --pref-text: #f7f8ff;
  --pref-muted: #aab1c5;
  --pref-accent: #9d86ff;
  --pref-success: #70e5aa;
  --pref-shadow: 0 24px 60px rgba(0, 0, 0, .38);
  --pref-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  --pref-line: rgba(17, 21, 34, .12);
  --pref-surface: rgba(255, 255, 255, .91);
  --pref-surface-strong: rgba(255, 255, 255, .99);
  --pref-hover: rgba(17, 21, 34, .055);
  --pref-active: rgba(111, 82, 232, .10);
  --pref-text: #111522;
  --pref-muted: #626d80;
  --pref-accent: #6f52e8;
  --pref-success: #17885f;
  --pref-shadow: 0 24px 60px rgba(44, 53, 84, .17);
}

.preference-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-family: var(--pref-font);
}

.preference-locale-switcher {
  position: relative;
  margin: 0;
}

.preference-locale-trigger,
.preference-theme-button {
  height: var(--pref-control-height);
  border: 1px solid var(--pref-line);
  border-radius: var(--pref-control-radius);
  color: var(--pref-text);
  background: var(--pref-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(16px) saturate(135%);
  -webkit-backdrop-filter: blur(16px) saturate(135%);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.preference-locale-trigger {
  min-width: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  list-style: none;
  cursor: pointer;
  font: 900 11px/1 var(--pref-font);
  letter-spacing: .08em;
  user-select: none;
}

.preference-locale-trigger::-webkit-details-marker { display: none; }

.preference-locale-trigger:hover,
.preference-theme-button:hover {
  border-color: color-mix(in srgb, var(--pref-accent) 48%, var(--pref-line));
  background: color-mix(in srgb, var(--pref-surface) 92%, var(--pref-accent) 8%);
  transform: translateY(-1px);
}

.preference-locale-trigger:focus-visible,
.preference-theme-button:focus-visible,
.preference-locale-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--pref-accent) 45%, transparent);
  outline-offset: 3px;
}

.preference-locale-switcher .flag-icon,
.preference-current-flag .flag-icon {
  width: 24px;
  height: 16px;
  flex: 0 0 24px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.preference-current-flag {
  width: 24px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.preference-locale-code {
  min-width: 18px;
  text-align: center;
}

.preference-chevron {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.preference-locale-switcher[open] .preference-chevron { transform: rotate(180deg); }

.preference-locale-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 10px);
  right: 0;
  width: var(--pref-menu-width);
  padding: 7px;
  border: 1px solid var(--pref-line);
  border-radius: 16px;
  background: var(--pref-surface-strong);
  box-shadow: var(--pref-shadow);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.preference-locale-menu form { margin: 0; }

.preference-locale-option {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 11px;
  color: var(--pref-text);
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: 400 13px/1.2 var(--pref-font);
}

.preference-locale-option:hover,
.preference-locale-option[aria-checked="true"] {
  background: var(--pref-active);
}

.preference-locale-option:hover { background: var(--pref-hover); }
.preference-locale-option[aria-checked="true"]:hover { background: var(--pref-active); }

.preference-locale-name {
  min-width: 0;
  overflow: hidden;
  color: var(--pref-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preference-locale-check {
  color: var(--pref-success);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.preference-locale-option[aria-checked="false"] .preference-locale-check { opacity: 0; }

.preference-theme-button {
  width: var(--pref-control-height);
  min-width: var(--pref-control-height);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  font: 400 16px/1 var(--pref-font);
}

.preference-theme-button svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.preference-theme-moon { display: none; }
html[data-theme="light"] .preference-theme-sun { display: none; }
html[data-theme="light"] .preference-theme-moon { display: block; }

[data-error-current-flag][hidden],
[data-error-copy][hidden] { display: none !important; }

@media (max-width: 560px) {
  .preference-controls { gap: 7px; }
  .preference-locale-trigger {
    min-width: var(--pref-control-height);
    width: var(--pref-control-height);
    padding: 0 7px;
    gap: 0;
  }
  .preference-locale-code,
  .preference-chevron { display: none; }
  .preference-locale-menu {
    position: fixed;
    top: 70px;
    right: 12px;
    width: min(var(--pref-menu-width), calc(100vw - 24px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .preference-locale-trigger,
  .preference-theme-button,
  .preference-chevron { transition: none !important; }
}
