/* Nassau County AI Residential Cleaning Booking System
 * Hand-crafted, modern, mobile-first CSS (Zero frameworks, sub-10ms render)
 */

:root {
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --primary-dark: #075985;
  --accent: #10b981;
  --accent-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navigation */
.header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.header-phone {
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
}

.header-badge {
  background: var(--accent-light);
  color: #065f46;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Main Layout */
.main-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.hero-banner {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-banner h2 {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-banner p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.25rem;
}

.trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.trust-badge-item span.icon {
  color: var(--accent);
  font-size: 1rem;
}

/* Booking Grid */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .booking-grid {
    grid-template-columns: 7fr 5fr;
    align-items: start;
  }
}

/* Form Cards */
.card-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.step-num {
  background: var(--primary);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Service Options */
.service-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .service-selector {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  background: #fff;
}

.service-card:hover {
  border-color: var(--border-focus);
}

.service-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.service-card input[type="radio"] {
  position: absolute;
  opacity: 0;
}

.service-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.service-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.service-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* Room Counters */
.counter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.counter-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.counter-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  overflow: hidden;
}

.counter-btn {
  background: #f1f5f9;
  border: none;
  width: 44px;
  height: 42px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s;
}

.counter-btn:hover {
  background: #e2e8f0;
}

.counter-value {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Sqft Slider */
.slider-group {
  margin: 1.25rem 0;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.slider-val-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.range-slider {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Condition Levels */
.condition-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.condition-card {
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
}

.condition-card.active {
  border-color: var(--primary);
  border-left: 4px solid var(--primary);
  background: #f0f9ff;
}

.condition-card[data-slug="heavy_grime"].active {
  border-color: var(--warning);
  border-left: 4px solid var(--warning);
  background: #fffbeb;
}

.condition-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.condition-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.condition-alert {
  background: var(--warning-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  color: #92400e;
  margin-top: 0.75rem;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

/* Add-ons Grid */
.addons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .addons-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.addon-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  background: #fff;
}

.addon-card:hover {
  border-color: var(--border-focus);
}

.addon-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.addon-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.addon-icon {
  font-size: 1.35rem;
}

.addon-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.addon-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.addon-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

/* Frequency Pills */
.frequency-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (min-width: 600px) {
  .frequency-group {
    grid-template-columns: repeat(4, 1fr);
  }
}

.freq-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  position: relative;
}

.freq-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.freq-name {
  font-size: 0.85rem;
  font-weight: 700;
}

.freq-discount {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  margin-top: 0.35rem;
}

/* Schedule Inputs */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 600px) {
  .form-row.two-col {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: #fff;
  color: var(--text-main);
  transition: border 0.15s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.zone-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  font-weight: 600;
}

.zone-status-badge.in-area {
  color: #059669;
}

.zone-status-badge.out-area {
  color: var(--danger);
}

/* Arrival Windows */
.arrival-windows-container {
  margin-top: 1rem;
}

.windows-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 600px) {
  .windows-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.window-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.5rem;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: all 0.15s;
}

.window-card.available:hover {
  border-color: var(--primary);
}

.window-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

.window-card.disabled {
  opacity: 0.45;
  background: #f1f5f9;
  cursor: not-allowed;
  border-color: #cbd5e1;
}

.window-time {
  font-size: 0.9rem;
  font-weight: 700;
}

.window-status {
  font-size: 0.7rem;
  margin-top: 0.2rem;
  color: var(--text-muted);
}

/* Sticky Summary Card */
.summary-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 5rem;
}

.summary-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.summary-price-big {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.summary-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.duration-pill {
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--text-main);
}

.summary-line-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.35rem 0;
  color: var(--text-muted);
}

.summary-line-item.highlight {
  color: var(--accent);
  font-weight: 600;
}

.summary-total-row {
  border-top: 2px dashed var(--border);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.15rem;
}

.terms-checkbox-box {
  margin: 1.25rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.terms-checkbox-box label {
  display: flex;
  gap: 0.5rem;
  cursor: pointer;
}

.btn-book-now {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-book-now:hover {
  background: var(--primary-hover);
}

.btn-book-now:active {
  transform: scale(0.99);
}

.guarantee-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Floating AI Chat Widget Trigger */
.ai-chat-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--text-main);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 50;
  transition: transform 0.2s;
}

.ai-chat-btn:hover {
  transform: translateY(-2px);
}

.ai-badge {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
}
