/* ==========================================================================
   Assista Soins Pro - Smart Care Booking Wizard Styles
   Sleek Ergonomics & Instant Constantine Dispatch Workflow
   ========================================================================== */

.booking-section {
  background: radial-gradient(120% 100% at 50% 10%, #f0f9ff 0%, #ffffff 50%, #f8fafc 100%);
  position: relative;
  overflow: hidden;
}

.booking-card-wrapper {
  background: #ffffff;
  border-radius: var(--as-radius-lg);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.12);
  border: 1.5px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
  max-width: 980px;
  margin-inline: auto;
  width: 100%;
}

@media (max-width: 640px) {
  .booking-card-wrapper {
    border-radius: var(--as-radius-md);
  }
}

/* Wizard Header / Steps Indicator */
.wizard-header {
  background: linear-gradient(135deg, #090e17 0%, #1e293b 100%);
  color: #ffffff;
  padding: 2.25rem 2.5rem;
  position: relative;
}

@media (max-width: 768px) {
  .wizard-header { padding: 1.5rem; }
}

@media (max-width: 480px) {
  .wizard-header { padding: 1.25rem 1rem; }
}

.wizard-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.wizard-title-row h3 {
  color: #ffffff;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
}

.wizard-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fecdd3;
  padding: 0.3rem 0.85rem;
  border-radius: var(--as-radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Linear Progress Bar above nodes */
.wizard-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: #334155;
  border-radius: var(--as-radius-full);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background: var(--as-brand-gradient);
  width: 25%;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--as-radius-full);
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.wizard-step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.step-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #475569;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  transition: var(--as-transition);
}

@media (max-width: 480px) {
  .step-circle {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
}

.wizard-step-node.active .step-circle {
  background: var(--as-primary);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.7);
  transform: scale(1.08);
}

.wizard-step-node.completed .step-circle {
  background: var(--as-secondary);
  border-color: #2dd4bf;
  color: #ffffff;
}

.step-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

.wizard-step-node.active .step-label {
  color: #38bdf8;
}

@media (max-width: 640px) {
  .step-label { display: none; }
}

/* Wizard Body & Panels */
.wizard-body {
  padding: 2.75rem 2.5rem;
}

@media (max-width: 768px) {
  .wizard-body { padding: 1.75rem 1.25rem; }
}

.wizard-panel {
  display: none;
  animation: slidePanel 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wizard-panel.active {
  display: block;
}

@keyframes slidePanel {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-heading {
  margin-bottom: 2rem;
}

.panel-heading h4 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  margin-bottom: 0.35rem;
  color: var(--as-dark);
}

.panel-heading p {
  color: var(--as-gray-600);
  font-size: 0.95rem;
}

/* Step 1: Services Selector Grid */
.wizard-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 580px) {
  .wizard-services-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
}

.service-select-card {
  border: 2px solid var(--as-gray-200);
  border-radius: var(--as-radius-md);
  padding: 1.35rem 1.25rem;
  cursor: pointer;
  transition: var(--as-transition);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  background: #ffffff;
  user-select: none;
}

.service-select-card:hover {
  border-color: var(--as-primary);
  background: var(--as-primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px -2px rgba(2, 132, 199, 0.12);
}

.service-select-card.selected {
  border-color: var(--as-primary);
  background: #f0f9ff;
  box-shadow: 0 8px 24px -2px rgba(2, 132, 199, 0.2);
}

.service-select-card input[type="radio"] {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  accent-color: var(--as-primary);
  width: 20px;
  height: 20px;
  cursor: pointer;
}

body[dir="rtl"] .service-select-card input[type="radio"] {
  right: auto;
  left: 1.25rem;
}

.service-select-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.service-select-icon {
  font-size: 2.25rem;
}

.service-duration-badge {
  background: #f1f5f9;
  color: var(--as-gray-600);
  padding: 0.2rem 0.6rem;
  border-radius: var(--as-radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.service-select-info h5 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
  color: var(--as-dark);
}

.service-select-info p {
  font-size: 0.88rem;
  color: var(--as-gray-600);
  line-height: 1.5;
}

/* Step 2: Patient Form & Constantine Municipality Quick-Pills */
.quick-commune-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.commune-pill {
  background: #f1f5f9;
  border: 1px solid var(--as-gray-200);
  border-radius: var(--as-radius-full);
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--as-dark-800);
  cursor: pointer;
  transition: var(--as-transition);
}

.commune-pill:hover, .commune-pill.active {
  background: var(--as-primary);
  color: #ffffff;
  border-color: var(--as-primary);
}

.wizard-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .wizard-form-grid { grid-template-columns: 1fr; gap: 1rem; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group.full-width {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .form-group.full-width { grid-column: span 1; }
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--as-dark-800);
}

.form-control {
  border: 1.5px solid var(--as-gray-200);
  border-radius: var(--as-radius-sm);
  padding: 0.9rem 1.15rem;
  font-size: 16px;
  transition: var(--as-transition);
  background: #ffffff;
  color: var(--as-dark);
  width: 100%;
}

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

/* Step 3: Date & Urgency */
.urgency-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 600px) {
  .urgency-options { grid-template-columns: 1fr; gap: 0.75rem; }
}

.urgency-card {
  border: 2px solid var(--as-gray-200);
  border-radius: var(--as-radius-md);
  padding: 1.35rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--as-transition);
  user-select: none;
}

.urgency-card:hover, .urgency-card.selected {
  border-color: var(--as-primary);
  background: #f0f9ff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.15);
}

.urgency-card.urgent:hover, .urgency-card.urgent.selected {
  border-color: var(--as-accent);
  background: #fff1f2;
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.15);
}

.urgency-card h5 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.urgency-card span {
  font-size: 0.82rem;
  color: var(--as-gray-600);
}

/* Step 4: Summary & Dispatch */
.wizard-summary-box {
  background: #f8fafc;
  border: 1.5px solid var(--as-gray-200);
  border-radius: var(--as-radius-md);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding-block: 0.7rem;
  border-bottom: 1px dashed var(--as-gray-200);
  font-size: 0.95rem;
  gap: 1rem;
}

@media (max-width: 480px) {
  .summary-row {
    flex-direction: column;
    padding-block: 0.5rem;
    gap: 0.25rem;
  }
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: var(--as-gray-600);
  font-weight: 600;
}

.summary-val {
  font-weight: 800;
  color: var(--as-dark);
}

.dispatch-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-dispatch-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  padding: 1.15rem 1.5rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 800;
  border-radius: var(--as-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  border: none;
  cursor: pointer;
  transition: var(--as-transition);
}

.btn-dispatch-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.5);
  color: #ffffff;
}

.btn-dispatch-phone {
  background: var(--as-primary-gradient);
  color: #ffffff;
  padding: 1.15rem 1.5rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  font-weight: 800;
  border-radius: var(--as-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: none;
  cursor: pointer;
  transition: var(--as-transition);
}

.btn-dispatch-phone:hover {
  transform: translateY(-2px);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.4);
}

/* Wizard Navigation Controls */
.wizard-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--as-gray-200);
  gap: 1rem;
}

@media (max-width: 480px) {
  .wizard-nav-controls {
    flex-direction: column-reverse;
  }
  .wizard-nav-controls .btn { width: 100%; }
}
