/*
 * The small parts: buttons, segmented buttons, drop-downs, chips, switches, steppers, setting rows, the guide's
 * cover and the message at the bottom. Sizes are large enough for a thumb (44 points high where tapped).
 */

.button {
  min-height: 40px;
  padding: 8px 14px;
  border: 0.5px solid var(--line2);
  border-radius: 8px;
  background: var(--bg);
  font-weight: 500;
}

.small-button.danger {
  color: var(--danger);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.button.wide {
  width: 100%;
  margin: 4px 0 8px;
}

.small-button {
  min-width: 40px;
  min-height: 36px;
  padding: 4px 10px;
  border: 0.5px solid var(--line2);
  border-radius: 8px;
  background: var(--bg2);
  font-weight: 600;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 2px;
  border-radius: 9px;
  background: var(--bg3);
}

.segment {
  min-height: 34px;
  padding: 6px 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
}

.segment.on {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 25, 45, 0.16);
}

.drop-down {
  min-height: 38px;
  padding: 6px 10px;
  border: 0.5px solid var(--line2);
  border-radius: 8px;
  background: var(--bg);
  font-size: 15px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}

.chips-label {
  color: var(--text3);
  font-size: 13px;
}

.chip {
  min-height: 34px;
  padding: 5px 12px;
  border: 0.5px solid var(--line2);
  border-radius: 999px;
  background: var(--bg2);
  font-size: 14px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  background: none;
  font-size: 15px;
}

.toggle-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--line2);
  transition: background 0.15s ease;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: left 0.15s ease;
}

.toggle.on .toggle-track {
  background: var(--ok);
}

.toggle.on .toggle-knob {
  left: 21px;
}

.stepper {
  display: inline-flex;
  align-items: stretch;
  border: 0.5px solid var(--line2);
  border-radius: 999px;
  overflow: hidden;
}

.stepper-side {
  min-width: 40px;
  min-height: 38px;
  border: 0;
  background: var(--bg2);
  font-size: 18px;
  font-weight: 600;
}

.stepper-middle {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  font-size: 14px;
}

.stepper-label {
  color: var(--text2);
}

.section-label {
  margin: 22px 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text3);
}

.setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--line);
}

.setting-label {
  font-weight: 500;
}

.setting-description,
.hint {
  font-size: 13px;
  color: var(--text2);
  margin: 4px 0;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
}

.cover {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.cover-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 8px) 14px 8px;
  border-bottom: 0.5px solid var(--line);
  background: var(--bg2);
}

.cover-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px calc(env(safe-area-inset-bottom) + 24px);
  -webkit-overflow-scrolling: touch;
}

.guide h2 {
  font-size: 17px;
  margin: 20px 0 6px;
}

.guide p {
  margin: 6px 0;
}

.message {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-height) + env(safe-area-inset-bottom) + 14px);
  transform: translateX(-50%);
  max-width: 90%;
  padding: 10px 16px;
  border-radius: 10px;
  background: #2c2e33;
  color: #ffffff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 30;
}

.message.shown {
  opacity: 1;
}

.about p {
  margin: 4px 0;
}

.update-status {
  margin-top: 8px;
}
