/* InviteAndSeat Bootstrap 5.3 form layer
   Loaded after the editorial theme so Bootstrap controls feel modern
   without changing the letterpress/editorial brand. */

:root {
  --ias-accent: #e1261c;
  --ias-ink: #171310;
  --ias-paper: #f8f6f1;
  --ias-field: #fffefb;
  --ias-border: #d8d1c7;
  --ias-border-hover: #aaa097;
  --ias-muted: #6a6159;
  --bs-primary: #e1261c;
  --bs-primary-rgb: 225, 38, 28;
  --bs-body-color: #171310;
  --bs-body-bg: #f8f6f1;
  --bs-border-color: #d8d1c7;
  --bs-border-radius: .65rem;
}

/* Labels */
.field > label,
.editorial-field > label,
.form-label {
  margin-bottom: .5rem;
  color: #5d544d;
  font-size: .69rem;
  font-weight: 650;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* Bootstrap controls + legacy inputs upgraded by app.js */
.form-control,
.form-select,
input.form-control,
textarea.form-control,
select.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input:not([type]),
textarea,
select {
  min-height: 50px;
  padding: .78rem .95rem;
  border: 1px solid var(--ias-border);
  border-radius: .65rem !important;
  background-color: var(--ias-field);
  color: var(--ias-ink);
  font-size: 1rem;
  line-height: 1.35;
  box-shadow: 0 1px 2px rgba(23, 19, 16, .025);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.form-control:hover,
.form-select:hover,
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
input[type="date"]:hover, input[type="time"]:hover, input[type="number"]:hover,
input[type="tel"]:hover, input[type="url"]:hover, input[type="search"]:hover, input:not([type]):hover,
textarea:hover, select:hover {
  border-color: var(--ias-border-hover);
  background-color: #fff;
}

.form-control:focus,
.form-select:focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="date"]:focus, input[type="time"]:focus, input[type="number"]:focus,
input[type="tel"]:focus, input[type="url"]:focus, input[type="search"]:focus, input:not([type]):focus,
textarea:focus, select:focus {
  border-color: var(--ias-accent);
  background-color: #fff;
  color: var(--ias-ink);
  box-shadow: 0 0 0 .24rem rgba(225, 38, 28, .11);
}

.form-control::placeholder { color: #9a9188; opacity: 1; }
.form-control[readonly] { background: #f1ede6; color: #6c635b; }
textarea.form-control { min-height: 118px; resize: vertical; }
.form-select { padding-right: 2.75rem; }

/* File upload */
input[type="file"].form-control { padding: .54rem .7rem; }
input[type="file"].form-control::file-selector-button {
  margin: -.54rem .85rem -.54rem -.7rem;
  padding: .8rem 1rem;
  border: 0;
  border-right: 1px solid var(--ias-border);
  background: #f0ece5;
  color: var(--ias-ink);
  font-weight: 650;
}

/* Checkbox / radio */
.form-check { min-height: 1.5rem; padding-left: 1.8rem; }
.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: .2rem;
  border: 1px solid #aaa097;
  background-color: #fff;
}
.form-check-input:checked {
  background-color: var(--ias-accent);
  border-color: var(--ias-accent);
}
.form-check-input:focus { border-color: var(--ias-accent); box-shadow: 0 0 0 .2rem rgba(225,38,28,.11); }
.form-check-label { color: #4f4741; font-size: .9rem; }

/* Color controls keep a compact Material/Bootstrap-like surface. */
input[type="color"].form-control-color {
  width: 100%;
  height: 50px;
  padding: .35rem;
  border: 1px solid var(--ias-border);
  border-radius: .65rem;
  background: var(--ias-field);
}

/* Input groups */
.input-group-text {
  border-color: var(--ias-border);
  background: #f0ece5;
  color: #625951;
  border-radius: .65rem;
}
.input-group > .form-control,
.input-group > .form-select { min-width: 0; }

/* Validation */
.was-validated .form-control:valid,
.form-control.is-valid,
.was-validated .form-select:valid,
.form-select.is-valid { border-color: #5f8068; box-shadow: none; }
.was-validated .form-control:invalid,
.form-control.is-invalid,
.was-validated .form-select:invalid,
.form-select.is-invalid { border-color: var(--ias-accent); }

/* Buttons use Bootstrap interactions but retain the InviteAndSeat visual language. */
.btn {
  border-radius: .55rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.btn-primary,
.btn-rust {
  --bs-btn-bg: var(--ias-accent);
  --bs-btn-border-color: var(--ias-accent);
  --bs-btn-hover-bg: #bd1f18;
  --bs-btn-hover-border-color: #bd1f18;
  --bs-btn-active-bg: #a91c16;
  --bs-btn-active-border-color: #a91c16;
  color: #fff !important;
}
.btn-dark {
  --bs-btn-bg: var(--ias-ink);
  --bs-btn-border-color: var(--ias-ink);
  --bs-btn-hover-bg: #302a26;
  --bs-btn-hover-border-color: #302a26;
  color: #fff !important;
}
.btn-danger { border-radius: .55rem; }

/* Cards/forms get a subtle modern surface while the marketing page stays editorial. */
.auth-card,
.card:not(.journey-card):not(.compare-card),
.order-teaser {
  border-color: #ddd5cb;
}

/* Invitation editor */
.editorial-form-grid { gap: 1rem 1.1rem; }
.editorial-field { margin-bottom: .25rem; }
.editorial-field .form-control,
.editorial-field .form-select { width: 100%; }
.editorial-field textarea.form-control { min-height: 126px; }
.editorial-field .form-check { margin-top: .3rem; }
.editorial-colors { gap: .9rem; }

/* Search/filter bars */
.toolbar-group .form-control,
.toolbar-group .form-select,
.seating-controls .form-control,
.seating-controls .form-select { min-height: 44px; }

/* Keep Bootstrap from changing the bespoke shell widths. */
.shell { margin-left: auto; margin-right: auto; }

/* Alerts inherit Bootstrap polish while retaining square-ish editorial density. */
.alert { border-radius: .55rem; border-width: 1px; }

@media (max-width: 767.98px) {
  .form-control,
  .form-select { min-height: 48px; font-size: 16px; }
  .btn { min-height: 46px; }
  .editorial-form-grid { gap: .8rem; }
}
