/*
 * Public redemption form styles.
 * Module: Rachat
 */

.wap-rachat-form-section {
  max-width: 1100px;
  margin: 0 auto;
  color: #000e0a;
}

.wap-rachat-intro {
  max-width: 760px;
  margin-bottom: 48px;
}

.wap-rachat-intro h1 {
  margin: 0 0 0.75rem;
}

.wap-rachat-intro p {
  margin: 0;
  color: rgba(0, 14, 10, 0.722);
}

.wap-section-title {
  margin-bottom: 2rem;
  text-align: left;
}

.wap-section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #ba8714;
  margin-top: 0.5rem;
}

.wap-rachat-form {
  display: grid;
  gap: 2rem;
}

.wap-form-fieldset {
  border: 1px solid rgba(0, 14, 10, 0.16);
  border-radius: 1rem;
  padding: 1.5rem;
  background: #ffffff;
}

.wap-form-fieldset legend {
  padding: 0 0.5rem;
  font-weight: 700;
}

.wap-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.wap-form-field {
  display: grid;
  gap: 0.45rem;
}

.wap-form-field-full,
.wap-form-field-wide {
  grid-column: 1 / -1;
}

.wap-form-field label {
  font-weight: 600;
  color: #000e0a;
}

.wap-form-field input[type="text"],
.wap-form-field input[type="email"],
.wap-form-field input[type="number"],
.wap-form-field input[type="file"],
.wap-form-field textarea,
.wap-form-field select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid rgba(0, 14, 10, 0.24);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #f0f0f0;
  color: #000e0a;
  font: inherit;
}

.wap-form-field textarea {
  resize: vertical;
}

.wap-form-field input[type="text"]:focus,
.wap-form-field input[type="email"]:focus,
.wap-form-field input[type="number"]:focus,
.wap-form-field input[type="file"]:focus,
.wap-form-field textarea:focus,
.wap-form-field select:focus {
  outline: 3px solid rgba(186, 135, 20, 0.25);
  border-color: #ba8714;
  background: #ffffff;
}

.wap-form-field input[type="checkbox"],
.wap-form-field-checkbox input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.wap-form-field-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.wap-form-field-checkbox label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.wap-form-field-consent {
  display: flex;
  flex-direction: column;
}

.wap-form-help {
  margin: 0 0 1rem;
  color: rgba(0, 14, 10, 0.72);
}

.wap-form-rgpd-notice {
  color: rgba(0, 14, 10, 0.72);
}

.wap-form-rgpd-notice p {
  margin: 0 0 0.75rem;
}

.wap-form-rgpd-notice a {
  color: #000e0a;
  font-weight: 600;
  text-decoration: underline;
}

.wap-form-error {
  margin: 0;
  color: #a42d0f;
  font-weight: 600;
}

.wap-form-message {
  border-radius: 0.75rem;
  padding: 1rem;
  font-weight: 600;
}

.wap-form-message-success {
  background: rgba(54, 120, 15, 0.12);
  color: #36780f;
}

.wap-form-message-error {
  background: rgba(164, 45, 15, 0.12);
  color: #a42d0f;
}

.wap-card-entry {
  display: grid;
  gap: 1rem;
}

.wap-cards-summary {
  margin-top: 1.5rem;
}

.wap-cards-summary h3 {
  margin: 0 0 1rem;
}

.wap-cards-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(0, 14, 10, 0.12);
  border-radius: 0.75rem;
}

.wap-cards-table {
  width: 100%;
  border-collapse: collapse;
  background: #f0f0f0;
}

.wap-cards-table th,
.wap-cards-table td {
  border-bottom: 1px solid rgba(0, 14, 10, 0.12);
  padding: 0.75rem;
  text-align: left;
  white-space: nowrap;
}

.wap-cards-table th {
  background: rgba(237, 222, 219, 0.549);
  font-weight: 700;
}

.wap-cards-table tr:last-child td {
  border-bottom: 0;
}

.wap-btn-primary,
.wap-btn-secondary {
  border: 0.063rem solid #f0f0f0;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  font-family: "Montserrat Alternates", sans-serif;
  font-weight: 700;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow:
    0 2px 2px 0 rgba(233, 30, 99, 0.14),
    0 3px 1px -2px rgba(233, 30, 99, 0.2),
    0 1px 5px 0 rgba(233, 30, 99, 0.12);
}

.wap-btn-primary {
  background-color: #2d2308;
  color: #eddedb;
}

.wap-btn-primary:hover,
.wap-btn-primary:focus {
  background-color: rgba(45, 35, 8, 0.815);
  color: #eddedb;
  box-shadow:
    0 14px 26px -12px rgba(233, 30, 99, 0.42),
    0 4px 23px 0 rgba(0, 0, 0, 0.12),
    0 8px 10px -5px rgba(233, 30, 99, 0.2);
}

.wap-btn-secondary {
  background-color: #ba8714;
  color: #000e0a;
}

.wap-btn-secondary:hover,
.wap-btn-secondary:focus {
  background-color: #ad680e;
  color: #eddedb;
  box-shadow:
    0 14px 26px -12px rgba(233, 30, 99, 0.42),
    0 4px 23px 0 rgba(0, 0, 0, 0.12),
    0 8px 10px -5px rgba(233, 30, 99, 0.2);
}

.wap-btn-primary:hover,
.wap-btn-primary:focus,
.wap-btn-secondary:hover,
.wap-btn-secondary:focus {
  opacity: 0.9;
}

.wap-btn-primary:active,
.wap-btn-secondary:active {
  transform: translateY(1px);
}

.wap-submit-btn {
  display: flex;
  justify-content: center;
}

.wap-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .wap-rachat-form-section {
    padding: 48px 1rem;
  }

  .wap-form-grid {
    grid-template-columns: 1fr;
  }

  .wap-form-fieldset {
    padding: 1rem;
  }

  .wap-btn-primary,
  .wap-btn-secondary {
    width: 100%;
  }
}

/* Keep the cards table contained on tablet and mobile. */
.wap-rachat-form,
.wap-form-fieldset,
.wap-card-entry,
.wap-cards-summary,
.wap-cards-table-wrapper {
  min-width: 0;
  max-width: 100%;
}

.wap-cards-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 833px) {
  .wap-cards-table {
    min-width: 720px;
  }

  .wap-cards-table .wap-btn-secondary {
    width: auto;
    white-space: nowrap;
  }
}
