.square-flex-panel {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  gap: 1.15rem;
  margin: 1.5rem 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(16, 33, 61, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 18px 44px rgba(16, 33, 61, 0.08);
}

.square-flex-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.square-flex-heading h3,
.square-flex-heading p {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.square-flex-panel button,
.square-flex-panel label,
.square-flex-panel span,
.square-flex-panel small,
.square-flex-panel strong,
.square-flex-panel em,
.square-flex-panel p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.square-flex-heading h3 {
  color: #10213d;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.square-flex-heading > strong {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #17603b;
  background: #eafbf2;
  border: 1px solid #b8e8d0;
  font-size: 0.82rem;
}

.square-flex-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.square-flex-amounts legend {
  grid-column: 1 / -1;
  margin-bottom: 0.15rem;
  color: #10213d;
  font-weight: 850;
}

.square-flex-amounts label {
  position: relative;
  display: block;
  cursor: pointer;
}

.square-flex-amounts input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.square-flex-amounts span {
  display: grid;
  gap: 0.35rem;
  min-height: 132px;
  padding: 1rem;
  border: 2px solid #dbe4f1;
  border-radius: 18px;
  background: #ffffff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.square-flex-amounts input:checked + span {
  border-color: #1752d1;
  box-shadow: 0 0 0 4px rgba(23, 82, 209, 0.1);
  transform: translateY(-1px);
}

.square-flex-amounts strong {
  color: #10213d;
  font-size: 1.05rem;
}

.square-flex-amounts small {
  color: #1752d1;
  font-size: 1.35rem;
  font-weight: 900;
}

.square-flex-amounts em {
  color: #5d6a7d;
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.45;
}

.square-flex-selection {
  margin: 0;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  color: #174266;
  background: #edf7ff;
  font-weight: 800;
}

.square-flex-online-methods {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(16, 33, 61, 0.1);
  border-radius: 18px;
  background: #ffffff;
}

.square-flex-method-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.square-flex-method-heading strong {
  color: #10213d;
}

.square-flex-method-heading span,
.square-flex-online-methods > small {
  color: #68758a;
  font-size: 0.86rem;
}

.square-flex-card {
  min-height: 90px;
  padding: 0.35rem 0;
}

.square-flex-wallet-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #778398;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.square-flex-wallet-divider::before,
.square-flex-wallet-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.square-flex-wallets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.square-flex-wallet[hidden] {
  display: none !important;
}

.square-flex-wallet {
  min-height: 48px;
}

.square-flex-wallet > * {
  width: 100% !important;
}

.square-flex-staff {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
  max-width: 100%;
  padding: clamp(0.85rem, 2.4vw, 1.1rem);
  border: 2px solid #75d2ad;
  border-radius: 18px;
  background: #f1fff8;
  overflow: hidden;
}

.square-flex-staff[hidden] {
  display: none !important;
}

.square-flex-staff-intro,
.square-flex-staff-choice,
.square-flex-staff-choice > div,
.square-flex-staff-fields,
.square-flex-staff-fields label {
  min-width: 0;
}

.square-flex-staff strong,
.square-flex-staff p {
  margin: 0;
  overflow-wrap: anywhere;
}

.square-flex-staff strong {
  color: #17603b;
}

.square-flex-staff p,
.square-flex-staff small {
  color: #486757;
}

.square-flex-facebook {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: #294e3a;
  font-weight: 750;
}

.square-flex-facebook input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 1.15rem;
  width: 1.15rem;
  min-width: 1.15rem;
  height: 1.15rem;
  min-height: 1.15rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  box-shadow: none;
  accent-color: #1752d1;
}

.square-flex-facebook span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.square-flex-staff-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  min-width: 0;
}

.square-flex-staff-choice {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid #b8e8d0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.square-flex-staff-choice.is-square {
  border-color: #bdd9ff;
  background: #f7fbff;
}

.square-flex-staff-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.square-flex-staff-fields label {
  gap: 0.3rem;
  color: #294e3a;
  font-size: 0.82rem;
}

.square-flex-staff-fields input,
.square-flex-staff-fields select {
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.65rem;
}

.square-flex-staff .btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-inline: 0.8rem;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.square-flex-staff small {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.square-flex-status {
  margin: 0;
  min-height: 1.4em;
  color: #58677c;
  font-weight: 700;
}

.square-flex-status.ready,
.square-flex-status.success {
  color: #17603b;
}

.square-flex-status.error {
  color: #9a3412;
}

.square-flex-status.processing,
.square-flex-status.working {
  color: #174266;
}

.square-flex-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.square-flex-trust span {
  min-width: 0;
  max-width: 100%;
  padding: 0.45rem 0.65rem;
  overflow-wrap: anywhere;
  border-radius: 999px;
  color: #475569;
  background: #f3f6fa;
  font-size: 0.78rem;
  font-weight: 700;
}

.square-deposit-confirmation {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 2px solid #75d2ad;
  border-radius: 18px;
  background: #f1fff8;
}

.square-deposit-confirmation strong,
.square-deposit-confirmation p,
.square-deposit-confirmation small {
  margin: 0;
}

.square-deposit-confirmation strong {
  color: #17603b;
  font-size: 1.12rem;
}

.square-deposit-confirmation.error {
  border-color: #f1c27d;
  background: #fff8e8;
}

.square-deposit-confirmation.error strong {
  color: #8a4b08;
}

@media (max-width: 900px) {
  .square-flex-staff-choices {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .square-flex-heading,
  .square-flex-method-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .square-flex-amounts,
  .square-flex-wallets {
    grid-template-columns: 1fr;
  }

  .square-flex-amounts span {
    min-height: 0;
  }

  .square-flex-staff-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  #booking-form .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  #booking-form .form-actions .btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-inline: 0.8rem;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .square-flex-trust {
    flex-direction: column;
  }

  .square-flex-trust span {
    border-radius: 12px;
  }
}


@media (max-width: 480px) {
  .square-flex-panel {
    gap: 0.9rem;
    margin-block: 1rem;
    padding: 0.85rem;
    border-radius: 16px;
  }

  .square-flex-online-methods,
  .square-flex-staff,
  .square-flex-staff-choice {
    padding: 0.75rem;
    border-radius: 13px;
  }

  .square-flex-heading h3 {
    font-size: 1.25rem;
  }

  .square-flex-wallet-divider {
    gap: 0.45rem;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .square-flex-staff .btn,
  #booking-form .form-actions .btn {
    font-size: 0.92rem;
    line-height: 1.25;
  }
}
