/* Settings component */

.settings-dropdown-scrim {
  position: fixed;
  inset: 0;
  z-index: 149;
  display: none;
}

.settings-dropdown-scrim.open {
  display: block;
}

.settings-dropdown-wrapper {
  display: none;
  position: fixed;
  top: var(--nav-h);
  right: 12px;
  z-index: 150;
}

.settings-dropdown-wrapper.open {
  display: block;
}

.settings-dropdown-panel {
  margin-top: 6px;
  width: 280px;
  background: var(--doc-bg);
  border-radius: 8px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.18),
    0 1px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.settings-dropdown-head {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(11, 82, 89, 0.1);
}

/* Indented group for display preferences (currency, language, temperature).
   Shift the whole block right so it reads as subordinate to Save Preferences. */
.setting-prefs-group {
  padding-left: 25px;
  margin-left: 16px;
  margin-right: 0;
}

.setting-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: #fff;
}

.setting-expand.open {
  max-height: 400px;
}

.setting-expand-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 10px 46px;
  border: none;
  border-bottom: 1px solid rgba(11, 82, 89, 0.06);
  cursor: pointer;
  min-height: 40px;
  font-family: "Dosis", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #2e2e2e;
  background: none;
  width: 100%;
  text-align: left;
}

.setting-expand-option:last-child {
  border-bottom: none;
}

.setting-expand-option:hover {
  background: rgba(11, 82, 89, 0.04);
}

.setting-expand-option.selected {
  color: var(--label);
}

.setting-expand-option .check-icon {
  width: 16px;
  height: 16px;
  stroke: var(--banner-bg);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0;
}

.setting-expand-option.selected .check-icon {
  opacity: 1;
}

.settings-back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: none;
  background: none;
  color: var(--label);
  font-family: "Dosis", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  width: 100%;
  border-bottom: 1px solid rgba(11, 82, 89, 0.1);
}

.settings-back svg {
  width: 18px;
  height: 18px;
  stroke: var(--label);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  min-height: 52px;
  border-bottom: 1px solid rgba(11, 82, 89, 0.1);
}

.setting-label {
  display: flex;
  gap: 10px;
  color: var(--label);
  font-size: 14px;
  font-weight: 600;
  min-width: 0;
  flex: 1 1 0;
  align-items: center;
}

.setting-label svg {
  width: 24px;
  height: 18px;
  fill: var(--label);
  flex-shrink: 0;
  margin-top: 2px;
}

.setting-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.setting-copy small {
  margin-top: 3px;
  color: #666;
  font-size: 10.5px;
  font-weight: 600;
}

.setting-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1.5px solid var(--banner-bg);
  border-radius: 20px;
  background: #fff;
  color: var(--label);
  font-family: "Dosis", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 32px;
  box-shadow: 3px 3px var(--content-bg);
}

.setting-pill:active {
  background: rgba(11, 82, 89, 0.08);
}

.setting-pill svg {
  width: 12px;
  height: 12px;
  stroke: var(--label);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.setting-pill.expanded svg {
  transform: rotate(180deg);
}

.setting-toggle {
  display: flex;
  border: 1.5px solid var(--banner-bg);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 3px 3px var(--content-bg);
}

.setting-toggle button {
  padding: 5px 14px;
  border: none;
  background: none;
  color: var(--label);
  font-family: "Dosis", sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 32px;
  transition:
    background 0.15s,
    color 0.15s;
}

.setting-toggle button.active {
  background: var(--banner-bg);
  color: var(--banner-text);
}

.setting-row-checkbox {
  cursor: pointer;
}

.setting-row-checkbox:hover {
  background: rgba(11, 82, 89, 0.03);
}

.setting-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid var(--banner-bg);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.setting-checkbox:checked {
  background: var(--banner-bg);
}

.setting-checkbox:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 7px;
  height: 11px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.setting-checkbox:focus-visible {
  outline: 3px solid rgba(11, 82, 89, 0.3);
  outline-offset: 2px;
}

.setting-arrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  min-height: 52px;
  cursor: pointer;
  width: 100%;
  border: none;
  border-bottom: 1px solid rgba(11, 82, 89, 0.1);
  background: none;
  font-family: "Dosis", sans-serif;
}

.setting-arrow:active {
  background: rgba(11, 82, 89, 0.04);
}

.setting-reset {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: none;
  border-top: 1px solid rgba(11, 82, 89, 0.08);
  background: none;
  color: #666;
  font-family: "Dosis", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.setting-reset:hover,
.setting-reset:active {
  background: rgba(102, 102, 102, 0.06);
}

.setting-reset svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.setting-arrow svg.chevron {
  width: 16px;
  height: 16px;
  stroke: var(--label);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0.5;
}

.picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.picker-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.picker-sheet {
  background: var(--doc-bg);
  border-radius: 12px 12px 0 0;
  width: 100%;
  max-width: 400px;
  max-height: 60vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.picker-overlay.open .picker-sheet {
  transform: translateY(0);
}

.picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(11, 82, 89, 0.12);
  position: sticky;
  top: 0;
  background: var(--doc-bg);
}

.picker-header span {
  font-weight: 700;
  font-size: 16px;
  color: var(--label);
}

.picker-close {
  background: none;
  border: none;
  color: var(--label);
  cursor: pointer;
  padding: 8px;
  margin-right: -8px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.picker-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(11, 82, 89, 0.08);
  cursor: pointer;
  min-height: 48px;
  font-family: "Dosis", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #2e2e2e;
  background: none;
  width: 100%;
  text-align: left;
}

.picker-option:active {
  background: rgba(11, 82, 89, 0.06);
}

.picker-option.selected {
  color: var(--label);
}

.picker-option .check {
  width: 18px;
  height: 18px;
  stroke: var(--banner-bg);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0;
}

.picker-option.selected .check {
  opacity: 1;
}

@media (min-width: 768px) {
  .settings-dropdown-wrapper {
    right: 20px;
  }
}

@media (min-width: 1280px) {
  .settings-dropdown-wrapper {
    right: 32px;
  }
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.confirm-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(380px, 100%);
  background: var(--doc-bg);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  padding: 20px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
}

.confirm-overlay.open .confirm-dialog {
  transform: translateY(0) scale(1);
}

.confirm-title {
  color: var(--label);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
}

.confirm-copy {
  margin-top: 8px;
  color: #555;
  font-size: 13.5px;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.confirm-btn {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 5px;
  border: 1.5px solid var(--banner-bg);
  font-family: "Dosis", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.confirm-btn-cancel {
  background: #fff;
  color: var(--label);
}

.confirm-btn-reset {
  background: #8a3c32;
  border-color: #666;
  color: #fff;
}

@media (min-width: 768px) {
  .settings-dropdown-panel,
  .confirm-dialog {
    background: #fff;
  }
}
