/* The sponsor page's amount picker (scripts/donor.js). Fills follow the theme
   variables, with fallbacks; the Stripe purple and preset green are brand
   colors and stay literal. */
.donor {
  display: flex;
  flex-direction: column;
  background: var(--layers-theme-secondary, #1e1d22);
  border-radius: 5px;
  padding: 20px;
  gap: 20px;
  font-size: 1.2rem;
}

.switch-freq {
  position: relative;
  background: var(--layers-theme-tertiary, #111013);
  border-radius: 5px;
  height: 80px;
  display: flex;
}

.freq-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  border: 2px solid var(--layers-theme-foreground, #f0f0f0);
  box-sizing: border-box;
  border-radius: 3px;
  transition: left 0.3s ease;
}

.freq-slider.right {
  left: 50%;
}

.freq-labels {
  z-index: 1;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
}

.freq-label {
  display: flex;
  flex: 1;
  height: 100%;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.25s ease, font-weight 0.25s ease;
  user-select: none;
  justify-content: center;
  align-items: center;
}

.freq-label.active {
  opacity: 1;
  font-weight: bold;
}

.currency-symbol {
  user-select: none;
}

.price-presets {
  display: flex;
  width: 100%;
  gap: 10px;
  padding: 0 10px;
}

.price-preset {
  display: flex;
  flex: 1;
  background: var(--layers-theme-tertiary, #658042);
  border-radius: 3px;
  height: 50px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.price-preset-text {
  font-weight: bold;
}

.amount-editor {
  display: flex;
  background: var(--layers-theme-tertiary, #111013);
  border-radius: 10px;
  height: 60px;
  align-items: center;
  padding-left: 20px;
  gap: 5px;
}

.amount-editor.disabled {
  background: #5a2d2d;
}

.amount-editor .currency-symbol {
  opacity: 0.5;
  font-size: 1.5rem;
}

.amount-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.5rem;
  width: 100%;
  height: 100%;
  font-family: inherit;
}

/* Hide number input spinners */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-input {
  -moz-appearance: textfield;
}

.checkout-button {
  display: flex;
  background: #533afd;
  border: 2px solid #755dff;
  box-sizing: border-box;
  border-radius: 5px;
  color: #f0f0f0;
  height: 60px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  user-select: none;
  cursor: pointer;
  font-weight: bold;
}

.checkout-button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.donor-status {
  color: #e57373;
  font-size: 0.9rem;
  text-align: center;
  /* min-height: 1.2em; */
}

/* The picker fills a slightly wider content-page sidebar on wide screens. */
#uv-content-sidebar {
  width: 340px;
}

#uv-content-sidebar .donor {
  align-self: stretch;
  width: 100%;
}

/* Full width once the sidebar stacks above the body. */
@media screen and (max-width: 960px) {
  #uv-content-sidebar {
    width: auto;
  }
}
