/* =========================================================
   WITHDRAWAL PAGE
========================================================= */

.withdrawal-page {
  width: min(1060px, 100%);
  margin: 0 auto;
}

.withdrawal-page .legal-page__header {
  margin-bottom: 2rem;
}

.withdrawal-page .legal-page__eyebrow {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.withdrawal-page .legal-page__header h1 {
  margin: 0;
  color: var(--card-foreground);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.withdrawal-page .legal-page__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* =========================================================
   LEGAL CONTENT CARDS
========================================================= */

.withdrawal-page .legal-page__section {
  padding: 2rem;

  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);

  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.withdrawal-page .legal-page__section h2 {
  margin: 0 0 1.25rem;

  color: var(--card-foreground);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  line-height: 1.25;
}

.withdrawal-page .legal-page__section p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.withdrawal-page .legal-page__section > :last-child {
  margin-bottom: 0;
}

.withdrawal-page .legal-page__section a {
  color: var(--color-accent);
  text-underline-offset: 0.15em;
}

.withdrawal-page .legal-page__section a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}


/* =========================================================
   CONTACT ADDRESS
========================================================= */

.withdrawal-page address {
  margin: 1.5rem 0;
  padding: 1.25rem;

  background: rgba(255, 0, 152, 0.04);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;

  color: var(--card-foreground);
  font-style: normal;
  line-height: 1.7;
}


/* =========================================================
   WITHDRAWAL FORM
========================================================= */

.withdrawal-form-section {
  padding: 2rem;
}

.withdrawal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  margin-top: 2rem;
}

.withdrawal-form__recipient,
.withdrawal-form__declaration {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.25rem;

  background: rgba(255, 0, 152, 0.04);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;

  color: var(--card-foreground);
}

.withdrawal-form__declaration {
  font-weight: 400;
}


/* =========================================================
   FORM GROUPS
========================================================= */

.withdrawal-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.withdrawal-form .form-field:has(textarea),
.withdrawal-form .form-field:has(#withdrawal-products),
.withdrawal-form .form-field:has(#withdrawal-message) {
  grid-column: 1 / -1;
}

.withdrawal-form label,
.withdrawal-form legend {
  color: var(--card-foreground);
  font-size: 0.95rem;
  font-weight: 400;
}

.withdrawal-form label span {
  color: var(--color-text);
  font-size: 0.85rem;
  font-weight: 300;
}

.withdrawal-form input,
.withdrawal-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  box-sizing: border-box;

  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 8px;

  font: inherit;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.withdrawal-form textarea {
  min-height: 130px;
  resize: vertical;
}

.withdrawal-form input:hover,
.withdrawal-form textarea:hover {
  border-color: var(--color-text);
}

.withdrawal-form input:focus,
.withdrawal-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(255, 0, 152, 0.08);
}

.withdrawal-form input.is-invalid,
.withdrawal-form textarea.is-invalid,
.withdrawal-form input:user-invalid,
.withdrawal-form textarea:user-invalid {
  border-color: #dc2626;
  background: #fff7f7;
}

.withdrawal-form input.is-invalid:focus,
.withdrawal-form textarea.is-invalid:focus,
.withdrawal-form input:user-invalid:focus,
.withdrawal-form textarea:user-invalid:focus {
  border-color: #dc2626;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.withdrawal-form input.is-valid,
.withdrawal-form textarea.is-valid {
  border-color: var(--border);
}

.withdrawal-form .form-field--full {
  grid-column: 1 / -1;
}

.withdrawal-form select {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  box-sizing: border-box;

  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: 8px;

  font: inherit;
  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.withdrawal-form select:hover {
  border-color: var(--color-text);
}

.withdrawal-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(255, 0, 152, 0.08);
}

.form-group input,
.form-group select {
  width: 100%;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.select-wrapper {
  position: relative;
  display: inline-block;
  margin: 0;
}

.select-arrow {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--color-text);
}

/* =========================================================
   SUBMIT BUTTON
========================================================= */

.withdrawal-form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  grid-column: 1 / -1;

  min-height: 48px;
  margin-top: 0.75rem;
  padding: 0.75rem 1.5rem;

  background: var(--color-accent);
  color: #ffffff;
  border: 1px solid var(--color-accent);
  border-radius: 8px;

  font: inherit;
  font-weight: 600;
  cursor: pointer;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.withdrawal-form button[type="submit"]:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.withdrawal-form button[type="submit"]:active {
  transform: translateY(0);
}

.withdrawal-form button[type="submit"]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.withdrawal-form button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}


/* =========================================================
   STATUS MESSAGE
========================================================= */

.withdrawal-form__status {
  grid-column: 1 / -1;
  min-height: 1.5rem;

  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.5;
}

.withdrawal-form__status:not(:empty) {
  padding: 1rem;

  background: rgba(255, 0, 152, 0.04);
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
  .withdrawal-page {
    margin-top: 72px;
  }

  .withdrawal-page .legal-page__section {
    padding: 1.5rem;
  }

  .withdrawal-form {
    grid-template-columns: 1fr;
  }

  .withdrawal-form .form-field,
  .withdrawal-form .form-field:has(textarea),
  .withdrawal-form__recipient,
  .withdrawal-form__declaration,
  .withdrawal-form__address,
  .withdrawal-form button[type="submit"],
  .withdrawal-form__status {
    grid-column: 1;
  }

  .withdrawal-form__address {
    grid-template-columns: 1fr;
  }

  .withdrawal-form button[type="submit"] {
    width: 100%;
  }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .withdrawal-form input,
  .withdrawal-form textarea,
  .withdrawal-form button[type="submit"] {
    transition: none;
  }
}