/* ===== Form grid (matches original .reserve__form) ===== */
.reserve__form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 40px;
}
/* When rendered inside CF7, the grid wrapper carries its own top margin */
.wpcf7-form .reserve__form { margin-top: 0; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.9rem; letter-spacing: 0.04em; color: var(--text-dim); }

/* CF7 wraps every control in a span — make it block so inputs fill the cell */
.field .wpcf7-form-control-wrap { display: block; width: 100%; }

/* ===== Field inputs (excludes the submit button) ===== */
.field input:not([type="submit"]):not([type="checkbox"]),
.field select,
.field textarea {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.25s var(--ease);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23efc9a4' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:not([type="submit"]):focus,
.field select:focus,
.field textarea:focus { outline: none; border-color: var(--gold); }

/* ===== Submit — reuses .btn .btn-gold, fills its full-width cell ===== */
.field.full .wpcf7-submit {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

/* ===== Acceptance / checkbox — custom, matches design system ===== */
.wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-list-item label {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
/* Replace the native box with a themed control */
.wpcf7-list-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.wpcf7-list-item input[type="checkbox"]:hover { border-color: var(--gold); }
.wpcf7-list-item input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.wpcf7-list-item input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
/* Checkmark drawn with a rotated box-shadow-free border */
.wpcf7-list-item input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #1a1208;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.wpcf7-list-item-label { font-size: 0.9rem; color: var(--text-dim); line-height: 1.6; }
.wpcf7-list-item-label a { color: var(--gold); text-underline-offset: 3px; }

/* ===== Validation & response ===== */
.wpcf7-form-control.wpcf7-not-valid { border-color: #e55 !important; }
.wpcf7-not-valid-tip { font-size: 0.82rem; color: #e77; margin-top: 4px; display: block; }
.wpcf7-response-output {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
}
.wpcf7-form.sent .wpcf7-response-output { background: rgba(255,255,255,0.04); border-color: var(--gold); color: var(--text); }
.wpcf7-form.failed .wpcf7-response-output,
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.spam .wpcf7-response-output { border-color: #c44; color: #e77; }
/* Hide the empty response box until CF7 toggles a state class */
.wpcf7-form.init .wpcf7-response-output { display: none; }

/* CF7 hidden fields must never affect the layout */
.wpcf7-form .hidden-fields-container,
.wpcf7-form .akismet-fields-container { display: none; }

/* Error-summary list lives outside .wpcf7-form, before it. Per-field tips
   already show the errors, so keep this summary visually hidden but available
   to screen readers (CF7's own sr-only styles are disabled in this theme). */
.wpcf7 .screen-reader-response {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

/* ===== Form success states ===== */
.form-success {
  max-width: 600px;
  margin: 80px auto;
  text-align: center;
  padding: 56px 40px;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}
.form-success__icon { font-size: 3rem; color: var(--gold); margin-bottom: 20px; }
.form-success h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 12px;
}
.form-success p { color: var(--text-dim); line-height: 1.7; font-size: 1rem; }
.form-success strong { color: var(--text); }
.form-success a { color: var(--gold); text-underline-offset: 3px; }

.form-success--reserve { text-align: left; max-width: 680px; margin: 60px auto; }
.form-success--reserve .form-success__icon,
.form-success--reserve h3 { text-align: center; }
.form-success__sub {
  text-align: center;
  margin-bottom: 36px !important;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-soft);
}
.form-success__summary { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.form-success__row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.form-success__row:last-child { border-bottom: none; }
.form-success__label {
  font-family: var(--font-label);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  min-width: 140px;
  flex-shrink: 0;
}
.form-success__label i { color: var(--gold); width: 16px; margin-right: 6px; }
.form-success__val { color: var(--text); font-size: 0.97rem; line-height: 1.5; }
.form-success__note {
  font-size: 0.9rem !important;
  color: var(--text-muted) !important;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 768px) {
  .reserve__form { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .form-success { padding: 40px 24px; margin: 40px auto; }
  .form-success__row { flex-direction: column; gap: 4px; }
  .form-success__label { min-width: unset; }
}
