/* Базовые стили */
#bookingApp {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1f2937;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Переключатель */
.booking-switcher {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.booking-switcher .container {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.variant-btn {
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.variant-btn:hover {
  background: #e5e7eb;
}

.variant-btn.active {
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  color: white;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

/* === DESKTOP LAYOUT === */
.layout-desktop {
  display: flex;
  height: calc(100vh - 60px);
  background: #f9fafb;
}

.booking-column {
  background: white;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.booking-column.services-column {
  width: 380px;
}

.booking-column.doctors-column {
  width: 340px;
}

.booking-column.timeslots-column {
  flex: 1;
}

.column-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  color: white;
}

.column-header h2 {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
}

.search-box input {
  width: 100%;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.6);
}

.column-content {
  flex: 1;
  overflow-y: auto;
}

/* Элементы списков */
.service-item,
.doctor-item {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.2s;
}

.service-item:hover,
.doctor-item:hover {
  background: #f9fafb;
}

.service-item.selected,
.doctor-item.selected {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.service-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.5rem;
}

.service-header h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-top {
  padding: 0.125rem 0.5rem;
  background: #d1fae5;
  color: #065f46;
  font-size: 0.75rem;
  border-radius: 9999px;
  font-weight: 500;
}

.service-desc {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0 0 0.5rem;
}

.service-footer {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.service-duration {
  color: #6b7280;
}

.service-price {
  font-weight: 600;
  color: #059669;
}

/* Врачи */
.doctor-item {
  display: flex;
  gap: 0.75rem;
}

.doctor-avatar {
  width: 3rem;
  height: 3rem;
  background: linear-gradient(135deg, #3b82f6, #14b8a6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.doctor-info {
  flex: 1;
}

.doctor-info h3 {
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
}

.doctor-role {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.doctor-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.rating {
  color: #f59e0b;
}

.doctor-price {
  text-align: right;
}

.price-label {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
}

.price-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

/* Временные слоты */
.timeslot-day {
  margin-bottom: 1rem;
}

.day-title {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
}

.timeslot-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.timeslot-btn {
  padding: 0.625rem;
  border-radius: 0.5rem;
  border: none;
  background: #f3f4f6;
  color: #374151;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.timeslot-btn:hover {
  background: #e5e7eb;
}

.timeslot-btn.selected {
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  color: white;
}

/* Футер с итогом */
.booking-footer {
  padding: 1rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.total-price {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

#totalPrice {
  font-size: 1.5rem;
  font-weight: 700;
  color: #059669;
}

.btn-book {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: none;
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  color: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-book:hover:not(:disabled) {
  box-shadow: 0 10px 15px rgba(59, 130, 246, 0.3);
}

.btn-book:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Empty state */
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

.empty-icon {
  font-size: 3rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* === ACCORDION (MOBILE) === */
.layout-accordion {
  background: #f9fafb;
  padding-bottom: 6rem;
}

.sticky-summary {
  position: sticky;
  top: 60px;
  z-index: 15;
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.summary-content {
  padding: 0.75rem 1rem;
}

.summary-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

.summary-item {
  font-size: 0.875rem;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-weight: 600;
}

.accordion-section {
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.accordion-header {
  width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.header-left {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.section-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.accordion-section:has(.service-item.selected) .section-number,
.accordion-section:has(.doctor-item.selected) .section-number {
  background: #10b981;
  color: white;
}

.header-info h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.selected-text {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}

.chevron {
  color: #9ca3af;
  transition: transform 0.2s;
}

.accordion-content {
  padding: 0 1rem 1rem;
}

.accordion-items {
  max-height: 400px;
  overflow-y: auto;
}

.accordion-items .service-item,
.accordion-items .doctor-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
}

.accordion-items .service-item.selected,
.accordion-items .doctor-item.selected {
  border-color: #3b82f6;
  background: #eff6ff;
}

/* Floating button */
.floating-button {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
  z-index: 30;
}

.btn-book-float {
  width: 100%;
  padding: 1rem;
  border-radius: 0.75rem;
  border: none;
  background: linear-gradient(to right, #3b82f6, #14b8a6);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .layout-desktop {
    display: none !important;
  }
  
  .variant-btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
}
