/* ============================================================
   Phase 21p: Settings / Pricing / Booking settings polish
   ============================================================ */

body.p21p-settings-page {
  background: #f8fafc !important;
}

body.p21p-settings-page .settings-polish-page {
  max-width: 1280px;
  margin: 0 auto;
}

body.p21p-settings-page .card {
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .055) !important;
  overflow: hidden;
}

body.p21p-settings-page h1,
body.p21p-settings-page h2 {
  color: #0f172a !important;
  font-weight: 950 !important;
  letter-spacing: -.03em;
}

body.p21p-settings-page .text-muted,
body.p21p-settings-page .form-text,
body.p21p-settings-page p.small {
  color: #64748b !important;
  font-weight: 650;
}

body.p21p-settings-page .btn {
  border-radius: 12px !important;
  font-weight: 850 !important;
}

body.p21p-settings-page .form-control,
body.p21p-settings-page .form-select {
  border-radius: 12px !important;
  border-color: #cbd5e1 !important;
}

body.p21p-settings-page .form-control:focus,
body.p21p-settings-page .form-select:focus {
  border-color: #334155 !important;
  box-shadow: 0 0 0 .2rem rgba(15, 23, 42, .11) !important;
}

body.p21p-settings-page textarea.form-control {
  line-height: 1.35;
}

body.p21p-settings-page code {
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: .12rem .28rem;
  white-space: normal;
}

/* Admin settings section grouping */
body.p21p-settings-page .admin-settings-page .col-12 h2 {
  margin-top: .2rem;
  padding-top: .2rem;
}

body.p21p-settings-page .admin-settings-page hr {
  border-color: #dbe3ef;
  opacity: 1;
}

/* Switches */
body.p21p-settings-page .form-switch {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: .65rem .75rem .65rem 2.8rem;
}

body.p21p-settings-page .form-check-input {
  cursor: pointer;
}

/* Desktop */
@media (min-width: 768px) {
  body.p21p-settings-page .card-body {
    padding: 1.15rem !important;
  }

  body.p21p-settings-page .pricing-settings-page {
    max-width: 920px;
  }

  body.p21p-settings-page .admin-settings-page {
    max-width: 1180px;
    margin: 0 auto;
  }

  body.p21p-settings-page .booking-settings-page {
    max-width: 1180px;
  }

  body.p21p-settings-page .booking-settings-page textarea[name="away_ranges"],
  body.p21p-settings-page .booking-settings-page textarea[name="pickup_windows"] {
    min-height: 280px;
  }
}

/* Mobile */
@media (max-width: 767.98px) {
  body.p21p-settings-page .settings-polish-page,
  body.p21p-settings-page .container,
  body.p21p-settings-page .container-fluid {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-bottom: 92px !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.p21p-settings-page .container.py-3,
  body.p21p-settings-page .container-fluid.py-4 {
    padding-top: .65rem !important;
  }

  body.p21p-settings-page .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    row-gap: .62rem !important;
  }

  body.p21p-settings-page [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.p21p-settings-page .card {
    border-radius: 15px !important;
    margin-bottom: .62rem !important;
  }

  body.p21p-settings-page .card-body {
    padding: .72rem !important;
  }

  body.p21p-settings-page h1 {
    font-size: 1.18rem !important;
    margin-bottom: .12rem !important;
  }

  body.p21p-settings-page h2,
  body.p21p-settings-page .h5 {
    font-size: .98rem !important;
    margin-bottom: .45rem !important;
  }

  body.p21p-settings-page .text-muted,
  body.p21p-settings-page .form-text,
  body.p21p-settings-page p.small {
    font-size: .72rem !important;
    line-height: 1.2 !important;
  }

  body.p21p-settings-page .form-label {
    font-size: .68rem !important;
    font-weight: 950 !important;
    color: #334155 !important;
    margin-bottom: .18rem !important;
  }

  body.p21p-settings-page .form-control,
  body.p21p-settings-page .form-select {
    min-height: 40px !important;
    font-size: 16px !important;
    border-radius: 11px !important;
    padding: .38rem .5rem !important;
  }

  body.p21p-settings-page textarea.form-control {
    min-height: 120px !important;
    font-size: 14px !important;
  }

  body.p21p-settings-page textarea.font-monospace {
    min-height: 220px !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
  }

  body.p21p-settings-page .btn {
    width: 100%;
    min-height: 40px !important;
    font-size: .78rem !important;
    padding: .36rem .48rem !important;
  }

  body.p21p-settings-page .d-flex.gap-2,
  body.p21p-settings-page .col-12.d-flex.gap-2 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .42rem !important;
  }

  body.p21p-settings-page .d-flex.justify-content-between,
  body.p21p-settings-page .d-flex.flex-column.flex-md-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .55rem !important;
    align-items: stretch !important;
  }

  body.p21p-settings-page .form-switch {
    padding: .58rem .65rem .58rem 2.65rem !important;
    border-radius: 13px !important;
  }

  body.p21p-settings-page .form-check-label {
    font-size: .82rem !important;
    font-weight: 850 !important;
  }

  /* Pricing page special */
  body.p21p-settings-page .pricing-settings-page .card-body {
    padding: .78rem !important;
  }

  /* Admin settings: make long payment config easier */
  body.p21p-settings-page .admin-settings-page form.row {
    row-gap: .5rem !important;
  }

  body.p21p-settings-page .admin-settings-page .col-12 h2 {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: .55rem .65rem;
    margin-bottom: .15rem !important;
  }

  body.p21p-settings-page .admin-settings-page .col-12 p.text-muted {
    padding: 0 .1rem;
  }

  body.p21p-settings-page .admin-settings-page hr {
    margin: .3rem 0 !important;
  }
}
