/* ============================================================
   Blue Violet Farm — Guest Check-in & Admin shared styles
   Extends style.css. Uses same font + palette as main site.
   ============================================================ */

/* ── Page layout ──────────────────────────────────────────── */

.checkin-main {
  min-height: 100vh;
  background: #faf8f2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
}

/* ── Card ──────────────────────────────────────────────────── */

.checkin-card {
  background: #fff;
  border: 1px solid #e6e0d4;
  border-radius: 4px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 520px;
}

.checkin-card.wide {
  max-width: 760px;
}

.checkin-card--done {
  text-align: center;
  max-width: 480px;
}

.checkin-loading {
  text-align: center;
  color: #8a7f74;
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
}

/* ── Header ────────────────────────────────────────────────── */

.checkin-header {
  margin-bottom: 2.5rem;
}

.checkin-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9b7f4a;
  margin: 0 0 0.75rem;
}

.checkin-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: #2e2852;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.checkin-intro {
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #5a5047;
  margin: 0;
}

/* ── Done icon ─────────────────────────────────────────────── */

.done-icon {
  width: 56px;
  height: 56px;
  background: #2e2852;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 1.5rem;
}

/* ── Form elements ─────────────────────────────────────────── */

.checkin-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.field-group--sm { max-width: 120px; }
.field-group--xs { max-width: 80px; }

label {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #3a3228;
}

.req { color: #9b7f4a; }
.optional { font-weight: 300; color: #8a7f74; font-size: 0.75rem; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  font-family: 'Jost', sans-serif;
  font-size: 0.95rem;
  color: #3a3228;
  background: #faf8f2;
  border: 1px solid #d4ccbf;
  border-radius: 3px;
  padding: 0.625rem 0.875rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

input:focus, select:focus {
  outline: none;
  border-color: #2e2852;
  background: #fff;
}

input.field-readonly {
  background: #f0ede6;
  color: #8a7f74;
  cursor: default;
}

.field-hint {
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  color: #8a7f74;
  margin: 0;
  line-height: 1.5;
}

.field-error {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  color: #c0392b;
  min-height: 1em;
  display: block;
}

.form-error {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  color: #c0392b;
  padding: 0.75rem 1rem;
  background: #fdf2f2;
  border-radius: 3px;
  border-left: 3px solid #c0392b;
}

.form-error:empty { display: none; }

/* ── Buttons ───────────────────────────────────────────────── */

.checkin-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: #2e2852;
  border: none;
  border-radius: 3px;
  padding: 0.875rem 2rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s;
  display: block;
  width: 100%;
}

.checkin-btn:hover:not(:disabled) { background: #3d3673; }
.checkin-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.add-row-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #2e2852;
  background: none;
  border: 1px dashed #c4bdb2;
  border-radius: 3px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: border-color 0.15s, color 0.15s;
}

.add-row-btn:hover { border-color: #2e2852; }

.remove-row-btn {
  font-family: 'Jost', sans-serif;
  font-size: 1.1rem;
  color: #c4bdb2;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0.25rem;
  align-self: end;
  margin-bottom: 0.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.remove-row-btn:hover { color: #c0392b; }

/* ── Repeatable rows ───────────────────────────────────────── */

.repeatable-row {
  border: 1px solid #e6e0d4;
  border-radius: 3px;
  padding: 0.875rem 1rem 0.5rem;
  background: #faf8f2;
  margin-bottom: 0.75rem;
}

.repeatable-row .field-row {
  grid-template-columns: 1fr auto auto auto;
  align-items: end;
}

/* ── Guest counter ─────────────────────────────────────────── */

.guest-counter {
  font-size: 0.78rem;
  font-weight: 400;
  color: #8a7f74;
  margin-left: 0.75rem;
}

/* ── Section headings inside forms ────────────────────────── */

.section-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: #2e2852;
  margin: 1.5rem 0 0.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e6e0d4;
}

.checkin-form .section-heading:first-child,
.section-heading:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.form-desc-sm {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  color: #8a7f74;
  margin: 0 0 0.75rem;
  line-height: 1.6;
}

/* ── Steps navigation ──────────────────────────────────────── */

.steps-nav {
  display: flex;
  align-items: center;
  margin-bottom: 2.5rem;
  gap: 0;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 3px;
  flex: 1;
  min-width: 0;
  transition: background 0.15s;
}

.step-btn:hover:not(.active) { background: #f5f0e8; }

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e6e0d4;
  color: #8a7f74;
  font-family: 'Jost', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.step-btn.active .step-number {
  background: #2e2852;
  color: #fff;
}

.step-btn.done .step-number {
  background: #4a7c59;
  color: #fff;
}

.step-label {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: #8a7f74;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-btn.active .step-label { color: #2e2852; }
.step-btn.done .step-label { color: #4a7c59; }

.step-status {
  font-size: 0.85rem;
  color: #4a7c59;
  font-weight: 500;
  margin-left: auto;
}

.step-divider {
  height: 1px;
  width: 24px;
  background: #d4ccbf;
  flex-shrink: 0;
}

/* ── Form titles ───────────────────────────────────────────── */

.form-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: #2e2852;
  margin: 0 0 0.5rem;
}

.form-desc {
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  color: #5a5047;
  line-height: 1.7;
  margin: 0 0 1.5rem;
}

/* ── Acknowledgment items ──────────────────────────────────── */

.acknowledgment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ack-item {
  border: 1px solid #e6e0d4;
  border-radius: 3px;
  background: #faf8f2;
  padding: 0.875rem 1rem;
}

.ack-label {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 0.75rem;
  align-items: start;
  cursor: pointer;
}

.ack-checkbox {
  margin-top: 0.15rem;
  width: 16px;
  height: 16px;
  accent-color: #2e2852;
  flex-shrink: 0;
}

.ack-text {
  font-family: 'Jost', sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #3a3228;
}

.ack-item:has(.ack-checkbox:checked) {
  background: #f5f0e8;
  border-color: #c4bdb2;
}

/* ── Damage / Waiver boxes ─────────────────────────────────── */

.damage-box,
.waiver-box {
  background: #f5f0e8;
  border: 1px solid #d4ccbf;
  border-radius: 3px;
  padding: 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
}

.damage-box h4,
.waiver-box h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2e2852;
  margin: 0 0 0.5rem;
}

.damage-box p,
.waiver-box p {
  font-family: 'Jost', sans-serif;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #5a5047;
  margin: 0;
}

/* ── Form actions ──────────────────────────────────────────── */

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.submit-hint {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  color: #8a7f74;
  text-align: center;
  margin: 0;
}

/* ── Resend / back links ───────────────────────────────────── */

.resend-row {
  text-align: center;
  margin-top: 0.5rem;
}

.resend-timer,
.resend-sent {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  color: #8a7f74;
}

.resend-sent { color: #4a7c59; }

.resend-link {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  color: #8a7f74;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.resend-link-text {
  color: #2e2852;
  text-decoration: underline;
}

.back-row {
  text-align: center;
  margin-top: 0.75rem;
}

.back-link {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  color: #8a7f74;
  text-decoration: none;
}

.back-link:hover { text-decoration: underline; }

/* ── Admin shared styles ───────────────────────────────────── */

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e6e0d4;
}

.admin-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: #2e2852;
  margin: 0;
}

.admin-signout {
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  color: #8a7f74;
  text-decoration: none;
}

.admin-signout:hover { color: #c0392b; }

.admin-intro {
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  color: #8a7f74;
  margin: -1rem 0 2rem;
  line-height: 1.6;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
}

.admin-table th {
  text-align: left;
  padding: 0.625rem 0.75rem;
  background: #f5f0e8;
  color: #3a3228;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e6e0d4;
}

.admin-table td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid #f0ede6;
  color: #3a3228;
  vertical-align: middle;
}

.admin-table tr:hover td { background: #faf8f2; cursor: pointer; }

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.625rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.status-pill--pending    { background: #fff3cd; color: #856404; }
.status-pill--completed  { background: #d1f0db; color: #145a2d; }
.status-pill--cancelled  { background: #f8d7da; color: #721c24; }

.form-badge {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  line-height: 20px;
  margin-right: 2px;
}

.form-badge--done { background: #d1f0db; color: #145a2d; }
.form-badge--todo { background: #e6e0d4; color: #8a7f74; }

.admin-cta-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.admin-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: #2e2852;
  border: none;
  border-radius: 3px;
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.admin-btn:hover { background: #3d3673; }

.admin-btn--outline {
  background: none;
  color: #2e2852;
  border: 1px solid #2e2852;
}

.admin-btn--outline:hover { background: #f5f0e8; }

.admin-btn--danger {
  background: none;
  color: #c0392b;
  border: 1px solid #c0392b;
}

.admin-btn--danger:hover { background: #fdf2f2; }

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #2e2852;
  color: #fff;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  z-index: 1000;
  animation: toast-in 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.back-link-admin {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  color: #8a7f74;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.back-link-admin:hover { color: #2e2852; }

.booking-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  background: #f5f0e8;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
}

.booking-detail-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #8a7f74;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.booking-detail-value {
  color: #3a3228;
  font-weight: 400;
}

.form-status-section {
  margin-bottom: 1.5rem;
  border: 1px solid #e6e0d4;
  border-radius: 4px;
  overflow: hidden;
}

.form-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #faf8f2;
  border-bottom: 1px solid #e6e0d4;
}

.form-status-name {
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #3a3228;
}

.form-status-signed {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  color: #4a7c59;
}

.form-status-unsigned {
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  color: #8a7f74;
}

.form-status-body {
  padding: 0.875rem 1.25rem;
}

.confirm-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.confirm-dialog {
  background: #fff;
  border-radius: 4px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
  font-family: 'Jost', sans-serif;
}

.confirm-dialog h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: #2e2852;
  margin: 0 0 0.75rem;
}

.confirm-dialog p {
  font-size: 0.9rem;
  color: #5a5047;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.confirm-dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.banner {
  font-family: 'Jost', sans-serif;
  font-size: 0.875rem;
  padding: 0.875rem 1rem;
  border-radius: 3px;
  margin-bottom: 1.5rem;
  border-left: 3px solid;
}

.banner--success { background: #d1f0db; color: #145a2d; border-color: #4a7c59; }
.banner--error   { background: #fdf2f2; color: #721c24; border-color: #c0392b; }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 600px) {
  .checkin-main { padding: 5rem 1rem 3rem; }
  .checkin-card { padding: 2rem 1.25rem; }
  .field-row { grid-template-columns: 1fr; }
  .repeatable-row .field-row { grid-template-columns: 1fr auto; }
  .steps-nav { gap: 0; }
  .step-label { display: none; }
  .booking-detail-grid { grid-template-columns: 1fr; }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}
