* {
  box-sizing: border-box;
}

body {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-content: center;
  accent-color: #af9664;
}

.image-radius img {
  border-radius: 5px;
}

#spenden-container {
    max-width: 1000px;
    margin: auto;
    align-self: center;
    padding-top: 40px;
    accent-color: #af9664;
}

#spenden-container h4 {
  font-family: "Open Sans", sans-serif;
}

#payment-status h3 {
  font-family: "Open Sans", sans-serif;
}

/* form {
  align-self: center;
  margin-top: 20px;
} */

.hidden {
  display: none;
}

#payment-message {
  color: rgb(105, 115, 134);
  font-size: 16px;
  line-height: 20px;
  padding-top: 12px;
  text-align: center;
}

#payment-element {
  margin-bottom: 24px;
  margin-top: 16px;
}

/* Größere Schrift für Eingabefelder */
input, select {
  font-size: 18px;
}

#email {
  border-radius: 8px;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.03), 0px 3px 6px rgba(0, 0, 0, 0.02);
  display: block;
  margin-top: 0.25rem;
  padding: 0.75rem;
  background-color: #ffffff;
  color: #333;
  border: 1px solid #ddd;
  height: 44px;
  transform: none;
  opacity: 1;
  position: inherit;
  outline: none;
  width: 100%;
}

#email:focus {
  border: 1px solid #af9664;
}

#email-errors {
  margin-top: 4px;
  color: #df1b41;
}

#email.error {
  color: #df1b41;
  border: 1px solid #df1b41;
}

input:focus {
  border: 1px solid #af9664;
}

#payment-form .row {
  margin-left: 0px;
  margin-right: 0px;
}

.amount-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 20px 0 10px;
}

.amount-btn {
  height: 50px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  padding: 0;
  margin-bottom: 0;
}

.amount-btn:hover {
  background: #f3f4ff;
}

.amount-btn.active {
  background: #af9664;
  color: #fff;
  border-color: #af9664;
}

#custom-amount {
  height: 50px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  padding: 0 12px;
  font-size: 16px;
  margin-bottom: 0;
}

/* Dropdown schöner */
#spenden-container select {
  margin-top: 12px;
}

#spenden-container select:focus {
  border: 1px solid #af9664;
}

#spenden-container select option:hover option:checked {
    text-decoration: none;
    color: #ffffff;
    background-color: #af9664;
}

/* Zwei-spaltiges Layout: Labels in Reihe 1, Inputs/Selects in Reihe 2 */
.form-row {
  display: grid;
  grid-template-columns: 160px;
  grid-auto-rows: auto;
  gap: 0px 16px;
  align-items: start;
}

/* Damit die Kinder (label + select) direkt im Grid platziert werden,
   setzen wir field-pair auf display: contents (moderne Browser). */
.field-pair {
  display: contents;
}

/* Labels in die erste Grid-Zeile, am unteren Rand ausrichten damit sie auf einer Linie stehen */
.form-row label {
  grid-row: 1;
  align-self: end;
  justify-self: start;
  margin: 0;
  color: #666;
}

/* Selects/Inputs in die zweite Grid-Zeile, volle Breite der Spalte */
.form-row select,
.form-row input[type="number"] {
  grid-row: 2;
  width: 100%;
  box-sizing: border-box;
  padding-right: 30px;
}

.two-col {
  display: flex;
  gap: 12px;
}

.two-col label {
  flex: 1;
}

/* full-row sorgt für volle Breite (z. B. Straße, Firma) */
.full-row {
  display: block;
}

/* Inline-Checkbox-Label (Text neben Checkbox) */
label.inline-checkbox {
  display: inline-flex;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 5px;
}

/* Optional: Checkbox visuell anpassen */
label.inline-checkbox input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
}

#optional-address {
    display: none;
    margin-top: 15px;
}

#zahlungsdetails {
    display: none;
    margin-top: 20px;
}

/* Buttons and links */
#submit {
  margin-top: 20px;
  border-radius: 8px;
  border: 0;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: block;
  transition: all 0.2s ease;
  box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
  width: 100%;
  white-space: nowrap;
}
#submit:hover {
  filter: contrast(115%);
}
#submit:disabled {
  opacity: 0.5;
  cursor: default;
}

/* spinner/processing state, errors */
.spinner,
.spinner:before,
.spinner:after {
  border-radius: 50%;
}
.spinner {
  color: #ffffff;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0px auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  -webkit-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}
.spinner:before,
.spinner:after {
  position: absolute;
  content: "";
}
.spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: #333;
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  -webkit-transform-origin: 10.4px 10.2px;
  transform-origin: 10.4px 10.2px;
  -webkit-animation: loading 2s infinite ease 1.5s;
  animation: loading 2s infinite ease 1.5s;
}
.spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: #333;
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  -webkit-transform-origin: 0px 10.2px;
  transform-origin: 0px 10.2px;
  -webkit-animation: loading 2s infinite ease;
  animation: loading 2s infinite ease;
}

@-webkit-keyframes loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes loading {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.footer {
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 0;
}

/* Payment status page */
#payment-status {
  display: none; /* flex */
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
  row-gap: 30px;
  /* width: 30vw;
  min-width: 500px;
  min-height: 380px;
  align-self: center;
  box-shadow: 0px 0px 0px 0.5px rgba(50, 50, 93, 0.1),
    0px 2px 5px 0px rgba(50, 50, 93, 0.1), 0px 1px 1.5px 0px rgba(0, 0, 0, 0.07);
  border-radius: 7px; */
  padding-top: 40px;
  /* opacity: 0;
  animation: fadeInAnimation 1s ease forwards; */
  font-size: 1.3em;
}

#status-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 40px;
  border-radius: 50%;
}

#status-text {
  width: auto;
  margin: auto;
}

#reloadButton {
  text-align: center;
  border-radius: 4px;
  border: 0;
  /* padding: 12px 16px; */
  transition: all 0.2s ease;
  box-shadow: 0px 4px 5.5px 0px rgba(0, 0, 0, 0.07);
  width: 100%;
  margin: auto;
}

/* Mobile */
@media (max-width: 600px) {

  /* Bei den Buttons Anzahl pro Reihe reduzieren */
  .amount-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  } 

  /* wieder gestapelt, damit Label über dem Feld steht  */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0px 0;
  }
  .field-pair {
    display: block;
  }
  .form-row label {
    align-self: start;
    margin-bottom: 6px;
  }
  .form-row select,
  .form-row input[type="number"] {
    grid-row: auto;
  }
}