.sdf-form-shell {
  display: grid;
  gap: 16px;
}

.sdf-form {
  display: grid;
  gap: 16px;
}

.sdf-stage {
  display: grid;
  gap: 16px;
}

.sdf-stage[hidden] {
  display: none !important;
}

.sdf-stage__heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.sdf-form-grid {
  display: grid;
  grid-template-columns: repeat(var(--sdf-columns, 1), minmax(0, 1fr));
  gap: 16px;
}

.sdf-field {
  display: grid;
  gap: 8px;
}

.sdf-field--full,
.sdf-field--button,
.sdf-field--captcha,
.sdf-stage-actions {
  grid-column: 1 / -1;
}

.sdf-label {
  font-weight: 600;
}

.sdf-input,
.sdf-form textarea,
.sdf-form select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid #b8c0cc;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
}

.sdf-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.75rem;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.sdf-form textarea {
  min-height: 140px;
}

.sdf-checkbox {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  cursor: pointer;
}

.sdf-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  align-self: start;
}

.sdf-checkbox__content {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.sdf-checkbox__text {
  color: #334155;
  line-height: 1.6;
}

.sdf-checkbox__text a {
  color: #0f172a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sdf-checkbox__required {
  color: #b91c1c;
  font-weight: 700;
}

.sdf-phone-group {
  display: flex;
  align-items: stretch;
}

.sdf-phone-field {
  display: grid;
  gap: 8px;
}

.sdf-phone-composite {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 10px;
}

.sdf-phone-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.95rem;
  border: 1px solid #b8c0cc;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  background: #f5f7fa;
}

.sdf-phone-group .sdf-input {
  border-radius: 0 6px 6px 0;
}

.sdf-country-picker {
  position: relative;
}

.sdf-country-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.8rem 0.95rem;
  border: 1px solid #b8c0cc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.sdf-country-button__flag {
  font-size: 1.15rem;
}

.sdf-country-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(340px, 100%);
  padding: 10px;
  border: 1px solid #b8c0cc;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
  z-index: 20;
}

.sdf-country-search {
  width: 100%;
  margin-bottom: 8px;
  padding: 0.75rem 0.85rem;
  border: 1px solid #b8c0cc;
  border-radius: 6px;
  font-size: 16px;
}

.sdf-country-list {
  max-height: 240px;
  overflow: auto;
  display: grid;
}

.sdf-country-option {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0.7rem 0.4rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sdf-country-option:hover,
.sdf-country-option:focus {
  background: #f8fafc;
}

.sdf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: auto;
  max-width: 100%;
  padding: 0.85rem 1.2rem;
  border: 0;
  border-radius: 6px;
  background: #0f172a;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.2;
}

.sdf-button--secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.sdf-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.sdf-field--button {
  justify-self: start;
}

.sdf-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.sdf-field--button .sdf-button {
  width: auto;
}

.sdf-field--button .sdf-button-group .sdf-button {
  width: auto;
}

.sdf-button--full {
  width: 100%;
}

.sdf-button__symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1em;
  line-height: 1;
}

.sdf-warning,
.sdf-setup-notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.sdf-warning--critical,
.sdf-setup-notice {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.sdf-status {
  display: grid;
  gap: 4px;
  min-height: 1.25rem;
  padding: 0;
  font-weight: 600;
}

.sdf-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sdf-status[data-state="success"] {
  padding: 14px 16px;
  border: 1px solid #86efac;
  border-radius: 10px;
  background: #f0fdf4;
  color: #166534;
  box-shadow: 0 8px 24px rgba(22, 101, 52, 0.08);
}

.sdf-status[data-state="error"] {
  padding: 14px 16px;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.08);
}

.sdf-status[hidden] {
  display: none !important;
}

.sdf-required {
  color: #b91c1c;
}

.sdf-help {
  color: #475569;
  font-size: 0.95em;
}

.sdf-field--content-text {
  gap: 10px;
  padding: 0.25rem 0;
}

.sdf-booking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.sdf-booking-field {
  gap: 10px;
  grid-column: 1 / -1;
  width: 100%;
}

.sdf-booking-field--meeting {
  align-content: start;
}

.sdf-booking-meeting-static {
  display: grid;
  gap: 4px;
  padding: 0.85rem 0.95rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
}

.sdf-booking-meeting-static span {
  color: #475569;
  font-size: 0.92rem;
}

.sdf-booking-select-fallback {
  display: none;
}

.sdf-booking-picker {
  display: grid;
  gap: 14px;
  width: 100%;
}

.sdf-booking-months {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sdf-booking-month {
  padding: 0.7rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.sdf-booking-month.is-active {
  border-color: #0f172a;
  background: #e2e8f0;
  font-weight: 600;
}

.sdf-booking-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
}

.sdf-booking-loading[hidden] {
  display: none !important;
}

.sdf-booking-loading__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-top-color: #0f172a;
  border-radius: 999px;
  animation: sdfSpin 0.7s linear infinite;
}

.sdf-booking-loading__text {
  font-size: 0.95rem;
}

@keyframes sdfSpin {
  to {
    transform: rotate(360deg);
  }
}

.sdf-booking-weeks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sdf-booking-week {
  padding: 0.7rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}

.sdf-booking-week.is-active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.sdf-booking-day-picker {
  display: none;
  gap: 10px;
}

.sdf-booking-day-option {
  display: grid;
  gap: 2px;
  justify-items: start;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
}

.sdf-booking-day-option strong {
  font-size: 0.95rem;
}

.sdf-booking-day-option span,
.sdf-booking-day-option small {
  color: #475569;
}

.sdf-booking-day-option small {
  font-size: 0.8rem;
}

.sdf-booking-day-option.is-active {
  border-color: #0f172a;
  background: #e2e8f0;
}

.sdf-booking-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sdf-booking-days::-webkit-scrollbar {
  height: 8px;
}

.sdf-booking-days::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.sdf-booking-days::-webkit-scrollbar-track {
  background: #e2e8f0;
}

.sdf-booking-day {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.sdf-booking-day__heading {
  display: grid;
  gap: 2px;
  color: #334155;
}

.sdf-booking-day__heading strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.sdf-booking-day__heading span {
  font-size: 0.85rem;
}

.sdf-booking-day__slots {
  display: grid;
  align-content: start;
  gap: 8px;
}

.sdf-booking-day__empty {
  padding: 0.7rem 0.8rem;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  text-align: center;
  font-size: 0.92rem;
}

.sdf-booking-slot {
  width: auto;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  text-align: center;
  cursor: pointer;
}

.sdf-booking-slot.is-active {
  border-color: #0f172a;
  background: #e2e8f0;
  font-weight: 600;
}

.sdf-booking-summary {
  margin-top: 2px;
}

.sdf-booking-message {
  min-height: 1.1rem;
  color: #b91c1c;
  font-size: 0.95em;
}

.sdf-form-loader {
  display: grid;
  gap: 12px;
}

.sdf-form-loader__status {
  padding: 14px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
}

.sdf-captcha-refresh {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  text-decoration: underline;
  cursor: pointer;
}

.sdf-content-text__heading {
  font-weight: 700;
  color: #182230;
}

.sdf-content-text__body {
  color: #475569;
  line-height: 1.6;
}

.sdf-captcha[data-sdf-captcha="turnstile"] {
  min-height: 73px;
}

.sdf-captcha[data-sdf-captcha="turnstile"][data-size="compact"] {
  min-height: 65px;
}

.sdf-captcha[data-sdf-captcha="turnstile"][data-size="normal"] {
  min-height: 65px;
}

@media (max-width: 640px) {
  .sdf-form-grid,
  .sdf-booking-grid {
    grid-template-columns: 1fr;
  }

  .sdf-phone-composite {
    grid-template-columns: 1fr;
  }

  .sdf-country-panel {
    width: 100%;
  }

  .sdf-booking-days {
    display: grid;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .sdf-booking-day-picker {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sdf-booking-day {
    flex-basis: auto;
  }
}
