/* LeadProbe Scheduling — mobile-first */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f4f6f8;
  color: #222;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App shell */
.app {
  max-width: 540px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
}

header {
  background: #1a5276;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
header .phone {
  color: #d4e6f1;
  font-size: 14px;
}
header .phone a { color: inherit; text-decoration: none; }

main {
  padding: 20px;
  flex: 1;
}

/* Step indicator */
.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
.step-indicator .dot {
  flex: 1;
  height: 4px;
  background: #d6dde2;
  border-radius: 2px;
}
.step-indicator .dot.active { background: #1a5276; }
.step-indicator .dot.done   { background: #5dade2; }

/* Forms */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #444;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px; /* 16px prevents iOS zoom */
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #1a5276;
}
.form-group .hint {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group { flex: 1; }

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: #1a5276;
  color: #fff;
}
.btn-primary:hover { opacity: 0.92; }
.btn-primary:disabled { background: #95a5a6; cursor: not-allowed; }
/* Action button — warm accent that stands out against the navy header.
   Used for the primary call-to-action on the tenant booking page. */
.btn-action {
  background: #ed7d2b;
  color: #fff;
  box-shadow: 0 2px 6px rgba(237, 125, 43, 0.35);
}
.btn-action:hover { background: #d96d1f; }
.btn-action:disabled { background: #95a5a6; cursor: not-allowed; box-shadow: none; }
.btn-secondary {
  background: #f0f3f5;
  color: #1a5276;
  border: 1.5px solid #d0d7de;
}
.btn-link {
  background: none;
  color: #1a5276;
  text-decoration: underline;
  padding: 8px;
}
.btn-subtle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #1a5276;
  border: 1px solid #d0d7de;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.btn-subtle:hover {
  background: #f0f6fa;
  border-color: #1a5276;
  box-shadow: 0 1px 2px rgba(26, 82, 118, 0.08);
}
.btn-subtle:active { transform: scale(0.97); }
.btn-subtle:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* Slot picker */
.day-block {
  margin-bottom: 20px;
}
.day-header {
  font-weight: 600;
  font-size: 16px;
  color: #1a5276;
  padding: 8px 0;
  border-bottom: 1px solid #e1e7eb;
  margin-bottom: 10px;
}
.slots-list {
  display: grid;
  /* 168px min keeps "10:30 AM – 12:30 PM" on a single line at 14px. */
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
}
.slot-btn {
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid #d0d7de;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  /* Never wrap the time range across two lines. */
  white-space: nowrap;
}
.slot-btn:hover {
  border-color: #1a5276;
  background: #f0f6fa;
}
.slot-btn.selected {
  background: #1a5276;
  color: #fff;
  border-color: #1a5276;
}

/* Renewal access-method buttons */
.renew-access-btn, .renew-tsub-btn {
  width: 100%;
  padding: 15px 16px;
  font-size: 15px;
  font-weight: 500;
  border: 1.5px solid #d0d7de;
  border-radius: 10px;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.renew-tsub-btn { font-size: 14px; padding: 13px 14px; }
.renew-access-btn:hover, .renew-tsub-btn:hover {
  border-color: #1a5276;
  background: #f0f6fa;
}
.renew-access-btn.selected, .renew-tsub-btn.selected {
  background: #1a5276;
  color: #fff;
  border-color: #1a5276;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}
.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #e1e7eb;
  border-top-color: #1a5276;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Confirmation */
.confirmation {
  text-align: center;
  padding: 30px 20px;
}
.confirmation .check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #28a745;
  color: #fff;
  font-size: 40px;
  line-height: 72px;
  margin: 0 auto 20px;
}
.confirmation h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.confirmation .summary {
  background: #f0f6fa;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}
.confirmation .summary div {
  margin: 6px 0;
}
.confirmation .summary strong { color: #1a5276; }

/* Error / alert */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error { background: #fdecea; color: #b53d3d; border: 1px solid #f5c6c6; }
.alert-info  { background: #e8f4fd; color: #1a5276; border: 1px solid #b3d4ed; }

/* Address autocomplete dropdown */
.autocomplete {
  position: relative;
}
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #d0d7de;
  border-top: none;
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}
.autocomplete-list .item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f3f5;
}
.autocomplete-list .item:last-child { border-bottom: none; }
.autocomplete-list .item:hover { background: #f0f6fa; }

/* Hidden by default */
.hidden { display: none !important; }

/* Admin extras */
.admin-toggles {
  background: #f0f6fa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
}
.toggle-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

@media (min-width: 600px) {
  .app {
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    min-height: auto;
  }
}
