/* Public-facing / admin styles for STR Rental. Mobile-first. */
* { box-sizing: border-box; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0; padding: 0;
  color: #1f2937; background: #f9fafb;
  line-height: 1.55;
}
main { max-width: 900px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }

/* Always-visible contact bar at the very top */
.top-contact {
  background: #0f172a; color: #f1f5f9;
  padding: 0.45rem 1rem;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 500;
}
.top-contact a { color: #93c5fd; text-decoration: none; margin: 0 0.25rem; }
.top-contact a:hover { text-decoration: underline; }

/* Step 1 prelude card (name + dates up front on /rent) */
.prelude {
  background: white; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 1rem 1.25rem; margin: 1.5rem 0;
}
.prelude h2 { margin-top: 0; }
.summary-ready { color: #047857; font-weight: 500; }

/* Per-item live estimate */
.item-estimate {
  font-size: 0.95rem; color: #047857;
  padding: 0.4rem 0.6rem; background: #ecfdf5;
  border-radius: 6px; margin-top: 0.25rem;
}
.item-estimate.muted { color: #6b7280; background: #f3f4f6; font-style: italic; }
.item-estimate strong { color: #047857; font-size: 1.05rem; }

.cart-total { font-size: 0.95rem; color: #374151; margin-top: 0.25rem; }
.cart-total strong { color: #047857; font-size: 1.1rem; }
.cart-total .fineprint { color: #6b7280; font-size: 0.8rem; }

.hero {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: white;
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.hero h1 { margin: 0.5rem 0 0.25rem; font-size: 1.7rem; }
.hero .tagline { margin: 0; opacity: 0.9; font-size: 1rem; }
.hero .logo { max-width: 140px; height: auto; }

.intro { background: white; border-radius: 10px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; border: 1px solid #e5e7eb; }
.disclaimer {
  background: #fef3c7; border: 1px solid #fcd34d;
  padding: 0.75rem 1rem; border-radius: 8px;
  font-size: 0.95rem;
}
.disclaimer strong { color: #92400e; }

h2 { margin: 1.5rem 0 0.75rem; font-size: 1.25rem; color: #1e3a8a; }

/* Item catalog */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}
.item-card {
  background: white; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.item-card.selected { border-color: #2563eb; box-shadow: 0 0 0 2px #bfdbfe; }
.item-card h3 { margin: 0; font-size: 1.05rem; }
.item-card .category {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #6b7280;
}
.item-card .price { font-weight: 600; color: #1e40af; }
.item-card .qty-row { display: flex; align-items: center; gap: 0.5rem; }
.item-card .qty-row input { width: 4rem; padding: 0.4rem; }
.item-card button { font-size: 0.9rem; }

.loading { color: #6b7280; font-style: italic; }

/* Cart bar */
#cart-bar {
  position: sticky; bottom: 0; background: white; border-top: 1px solid #e5e7eb;
  padding: 0.75rem 1rem; margin: 1.5rem -1.25rem 0;
}
.cart-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* Form */
form { background: white; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1rem 1.25rem; }
fieldset { border: none; border-top: 1px solid #e5e7eb; padding: 1rem 0; margin: 0; }
fieldset:first-of-type { border-top: none; padding-top: 0; }
legend { font-weight: 600; color: #1e3a8a; padding: 0 0.4rem 0 0; }
label { display: block; margin-bottom: 0.75rem; font-size: 0.95rem; }
label input, label textarea, label select {
  display: block; width: 100%; margin-top: 0.25rem;
  padding: 0.55rem 0.7rem; font-size: 1rem;
  border: 1px solid #d1d5db; border-radius: 6px; background: white;
  font-family: inherit;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
.hint { color: #6b7280; font-size: 0.9rem; margin: 0.25rem 0 0.75rem; }

/* Line items inside request form */
.line-item {
  display: grid; grid-template-columns: 1fr 5rem auto;
  gap: 0.5rem; align-items: center;
  padding: 0.5rem; border: 1px solid #e5e7eb; border-radius: 6px;
  margin-bottom: 0.5rem; background: #f9fafb;
}
.line-item .ln-name { font-weight: 500; }
.line-item .ln-rate { font-size: 0.85rem; color: #6b7280; }
.line-item input[type="number"] { width: 100%; padding: 0.4rem; }
.line-item button { padding: 0.3rem 0.6rem; }

#add-item-row { margin-top: 0.5rem; }

.estimate {
  background: #ecfdf5; border: 1px solid #6ee7b7;
  border-radius: 8px; padding: 1rem; margin: 1rem 0;
  font-size: 1.05rem;
}
.estimate strong { color: #047857; }
#estimate-amount { font-size: 1.4rem; font-weight: 700; color: #047857; margin-left: 0.5rem; }
.estimate .fineprint { margin: 0.5rem 0 0; font-size: 0.85rem; color: #064e3b; }

.actions { display: flex; gap: 0.75rem; justify-content: space-between; flex-wrap: wrap; margin-top: 1rem; }
.btn {
  display: inline-block; padding: 0.6rem 1.1rem; border-radius: 6px;
  text-decoration: none; cursor: pointer; font-size: 1rem; font-weight: 500;
  border: none; font-family: inherit;
}
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e5e7eb; color: #1f2937; }
.btn-secondary:hover { background: #d1d5db; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; padding: 0.75rem 1rem; border-radius: 6px; margin: 0.75rem 0; }
.success { background: #ecfdf5; border: 1px solid #6ee7b7; color: #047857; padding: 0.75rem 1rem; border-radius: 6px; margin: 0.75rem 0; }

footer {
  background: #1f2937; color: #d1d5db; padding: 1.5rem 1.25rem;
  text-align: center; margin-top: 2rem;
}
footer h3 { color: white; margin: 0 0 0.5rem; font-size: 1.1rem; }
footer a { color: #93c5fd; }
footer .fineprint { font-size: 0.85rem; color: #9ca3af; margin-top: 1rem; }

/* Thanks page */
.thanks-card { background: white; border: 1px solid #e5e7eb; border-radius: 10px; padding: 1.5rem; }
.thanks-card ul { list-style: none; padding: 0; }
.thanks-card li { margin: 0.5rem 0; }

/* Admin login */
.login-card {
  max-width: 380px; margin: 4rem auto; padding: 2rem;
  background: white; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.login-card h1 { margin-top: 0; }

/* Admin pages */
.admin-header {
  background: #111827; color: white; padding: 0.75rem 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
}
.admin-header h1 { margin: 0; font-size: 1.2rem; }
.admin-header a { color: #93c5fd; margin-left: 1rem; text-decoration: none; }
.admin-controls { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.badge {
  background: #fbbf24; color: #78350f; font-weight: 600;
  padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.85rem;
}

.request-card {
  background: white; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 1rem 1.25rem; margin-bottom: 0.75rem;
}
.request-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.request-card .meta { color: #6b7280; font-size: 0.9rem; margin-bottom: 0.5rem; }
.request-card .items { font-size: 0.95rem; margin: 0.5rem 0; }
.request-card .items li { margin: 0.15rem 0; }
.request-card .status-pill {
  display: inline-block; padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
}
.status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.contacted { background: #dbeafe; color: #1e40af; }
.status-pill.converted { background: #d1fae5; color: #065f46; }
.status-pill.declined { background: #fee2e2; color: #991b1b; }
.request-card .actions { margin-top: 0.5rem; }
.request-card .actions button { font-size: 0.9rem; padding: 0.4rem 0.7rem; }

.estimate-line { color: #047857; font-weight: 600; }
