/* --- Unified Root Variables --- */
:root {
  --primary: #29ad10;
  --primary-hover: #228b0d;
  --accent: #0f172a;
  --accent-light: #1e293b;
  --bg-light: #ffffff;
  --bg-alt: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --info-bg: #eff6ff;
  --info-text: #1e3a8a;
  --info-border: #bfdbfe;
  --warning-bg: #fffbeb;
  --warning-text: #b45309;
  --warning-border: #fde68a;
}

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

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: var(--text-main);
  background-color: var(--bg-alt);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Reusable Global Components --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  gap: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  width: 100%;
}
.btn-primary {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(41, 173, 16, 0.25);
}
.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(41, 173, 16, 0.35);
}
.btn-outline {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--accent);
}
.btn-outline:hover {
  border-color: var(--accent);
  background-color: var(--accent);
  color: white;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* --- Utility Top Bar & Navbar --- */
.top-bar {
  background-color: var(--accent);
  color: #f8fafc;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 0;
  text-align: center;
}
.top-bar-highlight {
  color: var(--primary);
  font-weight: 800;
  text-decoration: none; /* Keep the link clean */
}
.top-bar-highlight:hover {
  text-decoration: underline;
}
.navbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 16px 24px;
  display: flex;
  justify-content: center;
}
.brand-logo {
  height: 70px;
  width: auto;
  display: block;
}

/* --- Main Scheduling Container --- */
.schedule-wrapper {
  flex-grow: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px;
}
.schedule-card {
  background: var(--card-bg);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
  max-width: 850px;
  width: 100%;
  overflow: hidden;
}

/* --- Header with Service Info --- */
.card-header {
  background: var(--bg-alt);
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}
.ticket-info {
  display: inline-flex;
  align-items: center;
  background: rgba(41, 173, 16, 0.1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.service-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.service-badge svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.tech-info {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.tech-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.tech-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tech-avatar svg {
  width: 20px;
  height: 20px;
  color: white;
}
.tech-info strong {
  color: var(--text-main);
  font-weight: 700;
}

.card-body {
  padding: 40px;
}

/* --- Step Animations & Logic --- */
.step {
  display: none;
  animation: fadeIn 0.4s ease-in-out forwards;
}
.step.active {
  display: block;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Custom Alert Modal --- */
.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.custom-alert-overlay.show {
  opacity: 1;
  visibility: visible;
}
.custom-alert-box {
  background: white;
  padding: 32px;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.9);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.custom-alert-overlay.show .custom-alert-box {
  transform: scale(1);
}
.custom-alert-icon {
  color: #eab308;
  margin-bottom: 16px;
}
.custom-alert-msg {
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* --- Step 1 Grid (Desktop Side-by-Side) --- */
.step-1-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 800px) {
  .step-1-grid {
    grid-template-columns: 1fr 1fr;
  }
  .calendar-section {
    border-right: 1px solid var(--border-color);
    padding-right: 40px;
  }
}

.section-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label svg {
  color: var(--primary);
}

/* --- Custom Inline Calendar --- */
.custom-calendar {
  width: 100%;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.calendar-month-year {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.cal-nav-btn {
  background: var(--bg-alt);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--accent);
  transition: all 0.2s;
}
.cal-nav-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.cal-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
}
.cal-day-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cal-date-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  color: var(--text-main);
}
.cal-date-cell:hover:not(.disabled):not(.fully-booked) {
  background-color: var(--bg-alt);
  border-color: var(--primary);
}
.cal-date-cell.selected {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}
.cal-date-cell.disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  background-color: #f1f5f9;
}
.cal-date-cell.fully-booked {
  color: #a3a3a3;
  text-decoration: line-through;
  background-color: #f1f5f9;
  cursor: not-allowed;
}
.cal-date-cell.empty {
  cursor: default;
  background-color: transparent;
}

/* --- Interactive Time Slots Grid --- */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
}
.slot-btn {
  padding: 14px 8px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  background: white;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.slot-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: #f4faf4;
}
.slot-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.system-msg {
  grid-column: 1 / -1;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 24px 16px;
  background: var(--bg-alt);
  border-radius: 12px;
  text-align: center;
  border: 1px dashed var(--border-color);
}

/* --- Arrival Notice --- */
.arrival-notice {
  display: none;
  align-items: flex-start;
  gap: 16px;
  background-color: var(--info-bg);
  border: 1px solid var(--info-border);
  padding: 20px;
  border-radius: 12px;
  margin-top: 24px;
  animation: fadeIn 0.4s ease forwards;
}
.arrival-notice.visible {
  display: flex;
}
.arrival-notice svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--info-text);
  margin-top: 2px;
}
.arrival-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--info-text);
  font-weight: 500;
}
.arrival-text strong {
  font-weight: 800;
}

/* --- Forms (Step 2) --- */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 600px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
  .form-row-3 {
    grid-template-columns: 2fr 1fr 1.5fr;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}
.form-group label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  margin-left: 4px;
}
.form-group input {
  width: 100%;
  border: 2px solid var(--border-color);
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-main);
  transition: all 0.2s ease;
}
.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
}

.info-header-block {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-header-block svg {
  color: var(--info-text);
  flex-shrink: 0;
}
.info-header-text {
  font-size: 15px;
  color: var(--info-text);
  font-weight: 500;
  line-height: 1.5;
}

/* --- Pricing & Membership Display --- */
.pricing-summary {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-top: 32px;
}
.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  color: var(--text-main);
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.pricing-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
  font-size: 20px;
  font-weight: 800;
}
.pricing-row .label {
  font-weight: 600;
  color: var(--text-muted);
}
.pricing-row .value {
  font-weight: 800;
}
.coverage-badge {
  background: rgba(41, 173, 16, 0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Secure Payment Step (New Clients) --- */
.stripe-mock-container {
  border: 1px solid var(--border-color);
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.stripe-mock-container svg {
  color: var(--text-muted);
}
.stripe-mock-input {
  color: var(--text-muted);
  font-size: 16px;
  font-family: monospace;
  letter-spacing: 1px;
  flex-grow: 1;
}
.policy-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}
.policy-box h4 {
  color: var(--warning-text);
  font-size: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.policy-list {
  list-style: none;
}
.policy-list li {
  font-size: 14px;
  color: #92400e;
  line-height: 1.6;
  margin-bottom: 8px;
  padding-left: 20px;
  position: relative;
}
.policy-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  font-weight: bold;
}

/* --- Custom Checkbox List --- */
.responsibilities-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}
.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-alt);
  padding: 20px;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}
.checkbox-wrapper:hover {
  border-color: var(--primary);
  background: white;
}
.checkbox-wrapper input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background-color: white;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.checkbox-wrapper input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}
.checkbox-wrapper input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 7px;
  height: 13px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.checkbox-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  cursor: pointer;
}

/* --- Button Row --- */
.button-row {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}
.button-row .btn-outline {
  width: 30%;
}
.button-row .btn-primary {
  width: 70%;
}

/* --- Success Step --- */
.success-content {
  text-align: center;
  padding: 24px 0;
}
.success-icon {
  width: 88px;
  height: 88px;
  background: rgba(41, 173, 16, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--primary);
}
.success-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}
.success-desc {
  font-size: 18px;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.success-arrival-notice {
  background: var(--bg-alt);
  border: 1px dashed var(--border-color);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 40px;
  font-size: 16px;
  color: var(--text-muted);
  display: inline-block;
  max-width: 450px;
}

/* --- Confetti Canvas --- */
#confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall {
  to {
    transform: translateY(110vh) rotate(720deg);
  }
}

/* --- Footer --- */
.site-footer {
  margin-top: auto;
  padding: 40px 24px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.copyright {
  font-weight: 500;
}

/* --- Mobile Optimization --- */
@media (max-width: 768px) {
  .card-body {
    padding: 24px;
  }
  .card-header {
    padding: 24px 20px;
  }
  .schedule-wrapper {
    padding: 16px;
    align-items: flex-start;
  }
  .button-row {
    flex-direction: column;
    gap: 12px;
  }
  .button-row .btn-outline,
  .button-row .btn-primary {
    width: 100%;
  }
  .button-row .btn-outline {
    order: 2;
  }
  .button-row .btn-primary {
    order: 1;
  }
  .service-title {
    font-size: 24px;
  }
}
