/* ==========================================================================
   Formularz darowizny (Przelewy24)
   --------------------------------------------------------------------------
   Kolory sterowane zmiennymi — Elementor nadpisuje je inline na .hello-donation.
   ========================================================================== */

.hello-donation {
  --hd-accent: #E9C24D;
  --hd-accent-ink: #1F1B12;
  --hd-ink: #1C2024;
  --hd-muted: #6B7280;
  --hd-line: #DFE3E8;
  --hd-surface: #FFFFFF;
  --hd-surface-alt: #F6F7F9;
  --hd-error: #C0392B;
  --hd-radius: 14px;

  max-width: 640px;
  margin-inline: auto;
  color: var(--hd-ink);
  font-size: 16px;
  line-height: 1.5;
}

.hello-donation *,
.hello-donation *::before,
.hello-donation *::after {
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Sekcje
   -------------------------------------------------------------------------- */

.hello-donation__section {
  border: 0;
  margin: 0 0 28px;
  padding: 0;
  min-width: 0; /* fieldset nie może rozpychać gridu */
}

.hello-donation__legend {
  display: block;
  float: left; /* legend ignoruje część własności — float przywraca normalne pudełko */
  width: 100%;
  margin-bottom: 12px;
  padding: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hello-donation__legend + * {
  clear: both;
}

/* --------------------------------------------------------------------------
   Kwoty
   -------------------------------------------------------------------------- */

.hello-donation__amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
}

.hello-donation__amount {
  position: relative;
  display: block;
  cursor: pointer;
}

/* Input czytelny dla czytników ekranu, ale wizualnie zastąpiony kafelkiem. */
.hello-donation__amount input,
.hello-donation__type input,
.hello-donation__consent input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hello-donation__amount > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 2px solid var(--hd-line);
  border-radius: var(--hd-radius);
  background: var(--hd-surface);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}

.hello-donation__amount:hover > span {
  border-color: var(--hd-accent);
}

.hello-donation__amount input:checked + span {
  border-color: var(--hd-accent);
  background: color-mix(in srgb, var(--hd-accent) 16%, var(--hd-surface));
}

.hello-donation__amount input:focus-visible + span,
.hello-donation__type input:focus-visible + span,
.hello-donation__consent input:focus-visible + span {
  outline: 3px solid color-mix(in srgb, var(--hd-accent) 60%, transparent);
  outline-offset: 2px;
}

.hello-donation__amount input:active + span {
  transform: scale(0.98);
}

/* Kwota własna */

.hello-donation__custom {
  margin-top: 12px;
}

.hello-donation__custom-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--hd-muted);
}

.hello-donation__custom-field {
  position: relative;
  display: flex;
  align-items: center;
}

.hello-donation__custom-field input {
  width: 100%;
  min-height: 56px;
  padding: 12px 52px 12px 16px;
  border: 2px solid var(--hd-line);
  border-radius: var(--hd-radius);
  background: var(--hd-surface);
  font-size: 1.125rem;
  font-weight: 600;
  font-family: inherit;
  color: inherit;
  -moz-appearance: textfield;
  appearance: textfield;
}

.hello-donation__custom-field input::-webkit-outer-spin-button,
.hello-donation__custom-field input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.hello-donation__custom-field input:focus {
  border-color: var(--hd-accent);
  outline: none;
}

.hello-donation__currency {
  position: absolute;
  right: 18px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--hd-muted);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Typ darowizny
   -------------------------------------------------------------------------- */

.hello-donation__types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.hello-donation__type {
  display: block;
  cursor: pointer;
}

.hello-donation__type > span {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 2px solid var(--hd-line);
  border-radius: var(--hd-radius);
  background: var(--hd-surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hello-donation__type:hover > span {
  border-color: var(--hd-accent);
}

.hello-donation__type input:checked + span {
  border-color: var(--hd-accent);
  background: color-mix(in srgb, var(--hd-accent) 16%, var(--hd-surface));
}

.hello-donation__type-name {
  display: block;
  font-weight: 700;
}

.hello-donation__type-note {
  display: block;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--hd-muted);
}

.hello-donation__type--disabled {
  cursor: not-allowed;
}

.hello-donation__type--disabled > span {
  background: var(--hd-surface-alt);
  opacity: 0.65;
}

.hello-donation__type--disabled:hover > span {
  border-color: var(--hd-line);
}

/* Treść wewnątrz kafelka to zwykły tekst — nigdy druga ramka. */
.hello-donation__type-name,
.hello-donation__type-note {
  padding: 0;
  border: 0;
  background: none;
}

/* --------------------------------------------------------------------------
   Pola danych
   -------------------------------------------------------------------------- */

.hello-donation__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.hello-donation__field--wide {
  grid-column: 1 / -1;
}

.hello-donation__field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.hello-donation__req {
  color: var(--hd-error);
}

.hello-donation__field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2px solid var(--hd-line);
  border-radius: var(--hd-radius);
  background: var(--hd-surface);
  font-size: 1rem;
  font-family: inherit;
  color: inherit;
}

.hello-donation__field input:focus {
  border-color: var(--hd-accent);
  outline: none;
}

.hello-donation__field input[aria-invalid="true"] {
  border-color: var(--hd-error);
}

/* --------------------------------------------------------------------------
   Zgody
   -------------------------------------------------------------------------- */

.hello-donation__consents {
  display: grid;
  gap: 12px;
}

.hello-donation__consent {
  display: block;
  position: relative;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--hd-muted);
}

.hello-donation__consent > span {
  display: block;
  padding-left: 34px;
}

.hello-donation__consent > span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--hd-line);
  border-radius: 6px;
  background: var(--hd-surface);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.hello-donation__consent > span::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  width: 7px;
  height: 12px;
  border: solid var(--hd-accent-ink);
  border-width: 0 2.5px 2.5px 0;
  opacity: 0;
  transform: rotate(45deg);
}

.hello-donation__consent input:checked + span::before {
  border-color: var(--hd-accent);
  background: var(--hd-accent);
}

.hello-donation__consent input:checked + span::after {
  opacity: 1;
}

.hello-donation__consent input:focus-visible + span::before {
  outline: 3px solid color-mix(in srgb, var(--hd-accent) 60%, transparent);
  outline-offset: 2px;
}

.hello-donation__consent a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Wysyłka
   -------------------------------------------------------------------------- */

.hello-donation__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  margin-top: 24px;
  padding: 16px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--hd-accent);
  color: var(--hd-accent-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.hello-donation__submit:hover {
  filter: brightness(0.95);
}

.hello-donation__submit:active {
  transform: scale(0.99);
}

.hello-donation__submit[disabled] {
  cursor: progress;
  opacity: 0.7;
}

.hello-donation__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 0.8125rem;
  color: var(--hd-muted);
  text-align: center;
}

.hello-donation__secure svg {
  flex: none;
}

/* --------------------------------------------------------------------------
   Komunikaty
   -------------------------------------------------------------------------- */

.hello-donation__notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: var(--hd-radius);
  border-left: 4px solid currentColor;
  font-size: 0.9375rem;
}

.hello-donation__notice--error {
  color: var(--hd-error);
  background: color-mix(in srgb, var(--hd-error) 8%, var(--hd-surface));
}

.hello-donation__notice--success {
  color: #1E7A46;
  background: color-mix(in srgb, #1E7A46 8%, var(--hd-surface));
}

.hello-donation__error {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--hd-error);
}

@media (prefers-reduced-motion: reduce) {

  .hello-donation * {
    transition: none !important;
  }
}
