/**
 * User Options Modal Styles
 *
 * Aligns the User Settings modal with the WarMap visual contract, adds the
 * glass-surface treatment, keeps the layout responsive, and keeps tokens centralized.
 */
.wm-panel--user-options {
  color: var(--wm-color-text-primary);
}

.wm-panel--user-options .wm-panel__inner {
  padding: var(--wm-space-lg, 1.5rem) var(--wm-space-xl, 2rem);
  display: flex;
  flex-direction: column;
  gap: var(--wm-space-lg, 1.5rem);
  min-height: 520px;
  max-height: min(78vh, 760px);
  height: 100%;
  overflow: hidden;
}

.wm-panel--user-options .user-options-modal {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.user-options-modal__layout {
  display: flex;
  gap: var(--wm-space-lg, 1.5rem);
  min-height: 0;
  flex: 1 1 auto;
}

.user-options-modal__nav,
.user-options-modal__panel,
.option-group,
.option-field {
  border-radius: var(--wm-radius-lg, 0.5rem);
}

.user-options-modal__nav,
.user-options-modal__panel {
  padding: var(--wm-space-md, 1rem);
  min-height: 0;
}

.user-options-modal__nav {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-options-modal__nav > nav {
  min-height: 0;
  overflow: auto;
  padding-right: 0.25rem;
}

.user-options-modal__search {
  display: flex;
  flex-direction: column;
  gap: var(--wm-space-xs, 0.5rem);
  margin-bottom: var(--wm-space-sm, 0.75rem);
}
.user-options-modal__search .form-control {
  background: var(--wm-color-surface);
  border: 1px solid var(--wm-color-border);
  color: var(--wm-color-text-primary);
  border-radius: var(--wm-radius-sm);
  padding: 0.55rem 0.8rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.user-options-modal__search .form-control::-moz-placeholder {
  color: var(--wm-color-text-muted);
}
.user-options-modal__search .form-control::placeholder {
  color: var(--wm-color-text-muted);
}
.user-options-modal__search .form-control:focus-visible {
  border-color: var(--wm-color-focus);
  box-shadow: var(--wm-shadow-focus);
}

.options-tabs {
  margin: 0;
  padding: 0;
  list-style: none;
}

.options-tab {
  text-transform: capitalize;
  font-weight: var(--wm-font-weight-semibold);
  letter-spacing: 0.02em;
  border-radius: var(--wm-radius-md);
  border: 1px solid transparent;
  background: var(--wm-color-surface);
  color: var(--wm-color-text-primary);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.options-tab:hover, .options-tab:focus-visible {
  background: var(--wm-color-surface-elevated);
  border-color: var(--wm-color-border);
  outline: none;
}
.options-tab.active {
  background: var(--wm-overlay-accent-15);
  border-color: var(--wm-overlay-accent-60);
  color: var(--wm-color-text-primary);
}
.options-tab:focus-visible {
  outline: 2px solid var(--wm-color-focus);
  outline-offset: 2px;
}

.user-options-modal__panel {
  flex: 1 1 auto;
  padding: var(--wm-space-lg, 1.5rem);
  overflow: auto;
}

.user-options-modal__panel .tab-content {
  overflow: visible;
}

.loading {
  color: var(--wm-color-text-muted);
}

.user-options-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--wm-space-sm, 0.5rem);
  flex-wrap: wrap;
}

.user-options-modal__footer button {
  min-width: 180px;
  flex: 1;
  font-weight: var(--wm-font-weight-semibold);
  border-radius: var(--wm-radius-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.user-options-modal__footer button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.user-options-modal__footer-primary {
  background: var(--wm-color-accent-primary);
  color: var(--wm-color-text-inverse);
  border: none;
  box-shadow: var(--wm-shadow-glow-strong);
}
.user-options-modal__footer-primary:hover:not(:disabled), .user-options-modal__footer-primary:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--wm-shadow-glow-strong);
}

.user-options-modal__footer-secondary {
  border: 1px solid var(--wm-color-border);
  background: var(--wm-color-surface);
  color: var(--wm-color-text-primary);
}
.user-options-modal__footer-secondary:hover:not(:disabled), .user-options-modal__footer-secondary:focus-visible:not(:disabled) {
  border-color: var(--wm-color-accent-primary);
  color: var(--wm-color-text-primary);
}

.user-options-modal__footer-tertiary {
  border: 1px solid var(--wm-overlay-danger-50);
  background: var(--wm-color-danger-bg);
  color: var(--wm-color-danger);
}
.user-options-modal__footer-tertiary:hover:not(:disabled), .user-options-modal__footer-tertiary:focus-visible:not(:disabled) {
  border-color: var(--wm-overlay-danger-80);
  background: var(--wm-overlay-danger-12);
}

#wm-modal .user-options-modal__header-actions {
  margin-left: auto;
}

#wm-modal .user-options-modal__header-actions .btn-close {
  margin-left: 0;
}

@media (max-width: 992px) {
  .user-options-modal__layout {
    flex-direction: column;
  }
  .user-options-modal__nav {
    flex: 0 0 auto;
    max-height: 34vh;
  }
  .options-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: var(--wm-space-xs, 0.5rem);
  }
  .options-tabs .options-tab {
    flex: 1 1 45%;
    text-align: center;
  }
  .user-options-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (max-width: 576px) {
  .options-tabs .options-tab {
    flex: 1 1 100%;
  }
}
.options-tab-content {
  display: flex;
  flex-direction: column;
  gap: var(--wm-space-lg, 1.5rem);
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: var(--wm-space-md, 1rem);
  padding: var(--wm-space-md, 1rem);
}
.option-group h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: var(--wm-font-weight-semibold);
  color: var(--wm-color-text-primary);
}

.option-group__body {
  display: flex;
  flex-direction: column;
  gap: var(--wm-space-sm, 0.75rem);
}

.option-field {
  display: flex;
  flex-direction: column;
  gap: var(--wm-space-xs, 0.5rem);
  padding: var(--wm-space-sm, 0.75rem);
}

.option-field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wm-space-xs);
  font-weight: var(--wm-font-weight-semibold);
  color: var(--wm-color-text-primary);
}

.option-field__label-text {
  flex: 1;
}

.option-help {
  background: var(--wm-overlay-accent-08);
  border: 1px solid var(--wm-overlay-accent-60);
  color: var(--wm-color-accent-primary);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.option-help:hover, .option-help:focus-visible {
  background: var(--wm-overlay-accent-20);
  transform: translateY(-1px);
  outline: none;
}

.option-description {
  font-size: var(--wm-font-size-sm);
  color: var(--wm-color-text-muted);
  margin: 0;
}

.pwa-subscribe-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.pwa-subscribe-controls__button {
  background: linear-gradient(135deg, rgba(55, 214, 255, 0.92), rgba(8, 128, 255, 0.92));
  border: 1px solid rgba(167, 241, 255, 0.9);
  color: #04131d;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(6, 94, 168, 0.28);
}
.pwa-subscribe-controls__button:hover, .pwa-subscribe-controls__button:focus-visible {
  background: linear-gradient(135deg, rgba(125, 233, 255, 0.98), rgba(43, 152, 255, 0.98));
  border-color: rgba(220, 249, 255, 0.95);
  color: #031018;
  transform: translateY(-1px);
}
.pwa-subscribe-controls__button:disabled {
  background: rgba(124, 145, 160, 0.35);
  border-color: rgba(194, 206, 214, 0.35);
  color: rgba(230, 240, 245, 0.78);
  box-shadow: none;
  transform: none;
}

.pwa-subscribe-controls__status {
  color: var(--wm-color-text-secondary);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.option-input:not([type=checkbox]):not([type=radio]) {
  width: 100%;
  border-radius: var(--wm-radius-sm);
  border: 1px solid var(--wm-color-border);
  background: var(--wm-color-surface);
  color: var(--wm-color-text-primary);
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.option-input:not([type=checkbox]):not([type=radio]):focus-visible {
  border-color: var(--wm-color-focus);
  box-shadow: var(--wm-shadow-focus);
  outline: none;
}

.options-tab-content input[type=checkbox].option-input,
.options-tab-content input[type=radio].option-input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--wm-color-accent-primary);
}

.toggle-switch {
  position: relative;
  width: 52px;
  height: 28px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch input:focus-visible + .slider {
  box-shadow: var(--wm-shadow-focus);
}
.toggle-switch input:checked + .slider {
  background-color: var(--wm-overlay-accent-50);
}
.toggle-switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--wm-overlay-white-10);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.toggle-switch .slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  border-radius: 50%;
  background-color: var(--wm-color-text-primary);
  top: 3px;
  left: 4px;
  transition: transform 0.2s ease;
}
.toggle-switch input:checked + .slider::before {
  transform: translateX(26px);
}

.multiselect-options {
  display: grid;
  gap: var(--wm-space-xs, 0.5rem);
}
.multiselect-options .checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--wm-space-sm, 0.5rem);
  color: var(--wm-color-text-primary);
}
.multiselect-options input {
  accent-color: var(--wm-color-accent-primary);
}

.interval-input {
  display: flex;
  align-items: center;
  gap: var(--wm-space-sm, 0.5rem);
}
.interval-input input {
  flex: 1;
}
.interval-input span {
  font-weight: var(--wm-font-weight-semibold);
  color: var(--wm-color-text-muted);
}

.time-input {
  font-family: var(--wm-font-family-mono);
}

#toast-container {
  position: fixed;
  bottom: var(--wm-space-lg, 1.5rem);
  right: var(--wm-space-lg, 1.5rem);
  z-index: 10000;
}
#toast-container .toast {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: var(--wm-radius-sm);
  background: var(--wm-color-surface-dark-100);
  color: var(--wm-color-text-primary);
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
#toast-container .toast.show {
  opacity: 1;
  transform: translateX(0);
}

.help-offcanvas {
  position: fixed;
  right: 0;
  top: 0;
  width: min(360px, 90vw);
  height: 100vh;
  background: var(--wm-color-surface-dark-100);
  border-left: 1px solid var(--wm-overlay-white-10);
  box-shadow: var(--wm-shadow-xl);
  padding: var(--wm-space-lg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 10001;
  backdrop-filter: blur(16px);
}
.help-offcanvas.open {
  transform: translateX(0);
}
.help-offcanvas .option-help-content h4 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--wm-color-text-primary);
}
.help-offcanvas .option-help-content .help-description,
.help-offcanvas .option-help-content .help-details {
  color: var(--wm-color-text-muted);
  line-height: var(--wm-line-height-relaxed);
}
.help-offcanvas .option-help-content .help-metadata {
  margin-top: var(--wm-space-md);
  padding-top: var(--wm-space-sm);
  border-top: 1px solid var(--wm-overlay-white-08);
  color: var(--wm-color-text-muted);
}
.help-offcanvas .option-help-content .help-metadata ul {
  margin: var(--wm-space-xs) 0;
  padding-left: 1.25rem;
}

/*# sourceMappingURL=user-options.css.map */