/* ========================================
   AI INTAKE WIZARD
   Multi-step intake flow with glassmorphism
   Adapted for Marshall Law Group
   ======================================== */

/* CSS Variables for Marshall theme */
:root {
  --color-accent: #B45309;
  --color-text-dark: #0F172A;
  --font-display: 'EB Garamond', serif;
  --font-body: 'Lato', sans-serif;
}

/* Wizard Container */
.intake-wizard {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.wizard-container {
  background: rgba(30, 58, 95, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 2.5rem 2rem;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

/* Progress Dots */
.wizard-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: var(--color-accent);
  box-shadow: 0 0 10px rgba(201, 162, 39, 0.6);
}

.progress-dot.completed {
  background: var(--color-accent);
  opacity: 0.6;
}

/* Wizard Screens */
.wizard-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeSlideIn 0.4s ease-out;
  flex: 1;
}

.wizard-screen.active {
  display: flex;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* Question Text */
.wizard-question {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wizard-subtext {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

/* Option Buttons */
.wizard-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 350px;
}

.wizard-option {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.wizard-option:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.wizard-option:active {
  transform: translateY(0);
}

.wizard-option.selected {
  background: rgba(201, 162, 39, 0.2);
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(201, 162, 39, 0.3);
}

/* Severity Sub-options */
.severity-options {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  width: 100%;
}

.severity-options.visible {
  display: flex;
}

.severity-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 20px;
  padding: 0.5rem 1rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.severity-btn:hover,
.severity-btn.selected {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Contact Form Fields */
.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 350px;
}

.wizard-input {
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-text-dark);
  transition: all 0.2s ease;
}

.wizard-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.3);
  background: #fff;
}

.wizard-input::placeholder {
  color: #888;
}

/* Calendar Styles */
.calendar-container {
  width: 100%;
  max-width: 400px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-month {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}

.calendar-nav {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calendar-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.calendar-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 1.5rem;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  padding: 0.5rem 0;
  font-weight: 600;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.calendar-day:hover:not(.disabled):not(.empty) {
  background: rgba(201, 162, 39, 0.3);
}

.calendar-day.selected {
  background: var(--color-accent);
  color: var(--color-text-dark);
  font-weight: 600;
}

.calendar-day.disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: not-allowed;
  background: transparent;
}

.calendar-day.empty {
  background: transparent;
  cursor: default;
}

/* Time Slots */
.time-slots-container {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.time-slots-container.visible {
  display: flex;
}

.time-slots-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.time-slot {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.time-slot:hover:not(.taken) {
  background: rgba(201, 162, 39, 0.3);
  border-color: var(--color-accent);
}

.time-slot.selected {
  background: var(--color-accent);
  color: var(--color-text-dark);
  font-weight: 600;
}

.time-slot.taken {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Navigation Buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 2rem;
  gap: 1rem;
}

.wizard-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.25s ease;
}

.wizard-btn-back {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.wizard-btn-back:hover {
  background: rgba(255, 255, 255, 0.1);
}

.wizard-btn-next {
  background: var(--color-accent);
  border: none;
  color: var(--color-text-dark);
}

.wizard-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}

.wizard-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Thank You / Result Screens */
.wizard-result {
  text-align: center;
  padding: 1rem 0;
}

.wizard-result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.wizard-result-icon.success {
  color: #48bb78;
}

.wizard-result-icon.warning {
  color: var(--color-accent);
}

.wizard-result h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 1rem;
}

.wizard-result p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.confirmation-details {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}

.confirmation-details p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

.confirmation-details strong {
  color: var(--color-accent);
}

.wizard-link {
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
}

.wizard-link:hover {
  opacity: 0.8;
}

/* Still Interested Button */
.wizard-btn-contact {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.wizard-btn-contact:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Start Over Link */
.wizard-restart {
  display: inline-block;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.wizard-restart:hover {
  color: #fff;
}

/* Inline Disqualification Messages */
.wizard-inline-disqualify {
  width: 100%;
  animation: fadeSlideIn 0.4s ease-out;
}

.wizard-inline-disqualify .wizard-result {
  padding: 1rem 0;
}

.wizard-inline-disqualify .wizard-result-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.wizard-inline-disqualify h3 {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.wizard-inline-disqualify p {
  font-size: 0.95rem;
}

/* Auto-advance visual feedback */
.wizard-option.selected {
  background: rgba(201, 162, 39, 0.3);
  border-color: var(--color-accent);
  transform: scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 540px) {
  .wizard-container {
    padding: 2rem 1.5rem;
    border-radius: 20px;
    min-height: 380px;
  }
  
  .wizard-question {
    font-size: 1.3rem;
  }
  
  .wizard-options {
    max-width: 100%;
  }
  
  .calendar-grid {
    gap: 2px;
  }
  
  .calendar-day {
    font-size: 0.75rem;
  }
  
  .time-slots {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .wizard-nav {
    flex-direction: column-reverse;
  }
  
  .wizard-btn {
    width: 100%;
  }
}
