/* ============================================================
   APPOINTMENT BOOKING PAGE
   Wizard-style booking experience
   ============================================================ */

.appointment-booking-section {
  max-width: 1600px;
  margin: 0 auto;
  padding: 48px 24px;
  min-height: 100vh;
}

/* Top Action Bar */
.top-action-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
}

.my-appointments-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(14, 165, 233, 0.10));
  color: var(--brand);
  font-weight: 800;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}

.my-appointments-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow2);
  border-color: rgba(124, 58, 237, 0.55);
}

.my-appointments-btn svg {
  flex-shrink: 0;
}

/* Category Filter Section */
.category-filter-section {
  flex: 1;
}

.category-filter-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  padding: 24px;
  box-shadow: var(--shadow1);
  backdrop-filter: blur(10px);
}

.category-filter-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.category-filter-header strong {
  font-size: var(--t-xl);
  font-weight: 900;
  color: var(--text);
}

.filter-hint {
  font-size: var(--t-sm);
  color: var(--muted);
  font-weight: 600;
}

.category-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-filter-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  color: var(--text);
  font-weight: 800;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

[data-theme="dark"] .category-filter-btn {
  background: rgba(255, 255, 255, 0.06);
}

.category-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow1);
  border-color: rgba(124, 58, 237, 0.35);
}

.category-filter-btn.active {
  border-color: rgba(124, 58, 237, 0.55);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(14, 165, 233, 0.10));
  color: var(--brand);
  font-weight: 900;
}

/* Main Content Layout: 33% (Doctors) + 66% (Services) */
.appointment-main-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

/* Services Column (66%) */
.services-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.services-header-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  padding: 20px;
  box-shadow: var(--shadow1);
}

.services-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.services-header strong {
  font-size: var(--t-xl);
  font-weight: 900;
  color: var(--text);
}

.services-subtitle {
  font-size: var(--t-sm);
  color: var(--muted);
  font-weight: 600;
}

.services-search-wrapper {
  position: relative;
}

.services-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  color: var(--text);
  font-weight: 750;
  font-size: var(--t-md);
  outline: none;
  transition: all 0.2s var(--ease);
}

[data-theme="dark"] .services-search-input {
  background: rgba(255, 255, 255, 0.06);
}

.services-search-input:focus {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.16);
}

.services-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  padding: 0;
  box-shadow: var(--shadow1);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow2);
  border-color: rgba(124, 58, 237, 0.35);
}

.service-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(14, 165, 233, 0.1));
}

.service-card-image-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(14, 165, 233, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 800;
  font-size: var(--t-sm);
}

.service-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.service-card-doctor-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.service-card-doctor-photo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.service-card-doctor-photo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--t-xs);
  color: var(--brand);
  border: 1px solid var(--border);
}

.service-card-doctor-name {
  font-size: var(--t-xs);
  font-weight: 800;
  color: var(--text);
  flex: 1;
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0;
}

.service-card-title {
  font-size: var(--t-lg);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}

.service-card-category {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.service-card-description {
  font-size: var(--t-sm);
  color: var(--muted2);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-card-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.service-price-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.service-price-label {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

.service-price-regular {
  font-size: var(--t-md);
  color: var(--muted2);
  text-decoration: line-through;
  font-weight: 700;
}

.service-price-shield {
  font-size: var(--t-xl);
  color: var(--brand);
  font-weight: 900;
}

.service-card-action {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(14, 165, 233, 0.10));
  color: var(--brand);
  font-weight: 800;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.service-card-action:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow1);
}

/* Doctors Column (33%) */
.doctors-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.doctors-header-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  padding: 20px;
  box-shadow: var(--shadow1);
}

.doctors-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doctors-header strong {
  font-size: var(--t-xl);
  font-weight: 900;
  color: var(--text);
}

.doctors-subtitle {
  font-size: var(--t-sm);
  color: var(--muted);
  font-weight: 600;
}

.doctors-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doctor-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 16px;
  box-shadow: var(--shadow1);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
}

.doctor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow2);
  border-color: rgba(124, 58, 237, 0.35);
}

.doctor-card.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.05));
}

.doctor-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doctor-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.doctor-card-main {
  flex: 1;
  min-width: 0;
}

.doctor-photo-wrapper {
  position: relative;
  flex-shrink: 0;
}

.doctor-photo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
}

.doctor-photo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--t-md);
  color: var(--brand);
  border: 2px solid var(--border);
}

.doctor-badges {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  gap: 4px;
}

.doctor-badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 900;
  border: 2px solid var(--panel);
}

.doctor-badge.rainbow-shield {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
}

.doctor-badge.associate {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
}

.doctor-badge.verified {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.98), rgba(14, 165, 233, 0.72));
  color: white;
}

.doctor-info {
  flex: 1;
  min-width: 0;
}

.doctor-name {
  font-size: var(--t-lg);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}

.doctor-name:hover {
  color: var(--brand);
  text-decoration: underline;
}

.doctor-specialization {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.doctor-specialization-item {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--brand);
  font-size: var(--t-xs);
  font-weight: 800;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.doctor-quick-info {
  font-size: var(--t-xs);
  color: var(--muted2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.doctor-service-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.doctor-service-count svg {
  width: 14px;
  height: 14px;
  color: var(--brand);
  flex-shrink: 0;
}

/* Wizard Modal */
.wizard-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

/* Cancel Modal should be on top */
#cancelAppointmentModal {
  z-index: 10001;
}

.wizard-modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r24);
  box-shadow: var(--shadow4);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.wizard-header {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 10;
}

.wizard-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.wizard-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
}

.wizard-step.active .wizard-step-line {
  background: var(--brand);
}

.wizard-step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--t-sm);
  transition: all 0.3s var(--ease);
}

.wizard-step.active .wizard-step-circle {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.wizard-step.completed .wizard-step-circle {
  background: var(--good);
  color: white;
}

.wizard-step-label {
  font-size: var(--t-xs);
  font-weight: 800;
  color: var(--muted);
  text-align: center;
}

.wizard-step.active .wizard-step-label {
  color: var(--text);
}

.wizard-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

[data-theme="dark"] .wizard-close-btn {
  background: rgba(255, 255, 255, 0.06);
}

.wizard-close-btn:hover {
  background: var(--bad);
  color: white;
  border-color: var(--bad);
}

.wizard-content {
  padding: 32px 28px;
}

.wizard-step-content {
  display: none;
}

.wizard-step-content.active {
  display: block;
  animation: fadeIn 0.3s var(--ease);
}

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

.wizard-step-header {
  margin-bottom: 24px;
}

.wizard-step-header h2 {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.wizard-step-header p {
  font-size: var(--t-md);
  color: var(--muted);
  font-weight: 600;
}

.selected-service-preview {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 20px;
  margin-bottom: 24px;
}

.time-slots-container {
  margin-bottom: 24px;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.time-slot-btn {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.70);
  color: var(--text);
  font-weight: 800;
  font-size: var(--t-sm);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-align: center;
}

[data-theme="dark"] .time-slot-btn {
  background: rgba(255, 255, 255, 0.06);
}

.time-slot-btn.available {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.35);
  color: var(--good);
}

.time-slot-btn.available:hover {
  background: rgba(22, 163, 74, 0.25);
  transform: translateY(-1px);
}

.time-slot-btn.selected {
  background: var(--good);
  border-color: var(--good);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.time-slot-btn.unavailable {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.5;
}

.appointment-type-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.appointment-type-option {
  background: var(--panel2);
  border: 2px solid var(--border);
  border-radius: var(--r16);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.appointment-type-option:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.appointment-type-option.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.05));
}

.appointment-type-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.appointment-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.appointment-type-title {
  font-size: var(--t-lg);
  font-weight: 900;
  color: var(--text);
}

.appointment-type-description {
  font-size: var(--t-sm);
  color: var(--muted);
  margin-left: 52px;
}

.appointment-summary-card {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 20px;
  margin-bottom: 24px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.summary-row.highlight {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.05));
  margin: 0 -20px;
  padding: 16px 20px;
  border-radius: var(--r12);
  border-bottom: none;
}

.summary-row span {
  font-size: var(--t-md);
  color: var(--muted);
  font-weight: 700;
}

.summary-row strong {
  font-size: var(--t-lg);
  color: var(--text);
  font-weight: 900;
}

.summary-row.highlight strong {
  color: var(--brand);
  font-size: var(--t-xl);
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.payment-method-option {
  background: var(--panel2);
  border: 2px solid var(--border);
  border-radius: var(--r16);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-method-option:hover {
  border-color: rgba(124, 58, 237, 0.35);
}

.payment-method-option.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.05));
}

.payment-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}

.payment-method-info {
  flex: 1;
}

.payment-method-name {
  font-size: var(--t-md);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 2px;
}

.payment-method-desc {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 600;
}

.payment-sub-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.payment-sub-opt {
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--panel2);
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.payment-sub-opt:hover {
  border-color: rgba(124, 58, 237, 0.35);
}
.payment-sub-opt.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(14, 165, 233, 0.08));
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.confirmation-content {
  text-align: center;
  padding: 20px 0;
}

.confirmation-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--good);
}

.confirmation-content h2 {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
}

.confirmation-content p {
  font-size: var(--t-md);
  color: var(--muted);
  margin-bottom: 24px;
}

.confirmation-details {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

/* History Modal */
.history-modal {
  max-width: 900px;
}

.history-content {
  padding: 24px 28px;
}

.history-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.history-tab {
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  font-size: var(--t-sm);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s var(--ease);
}

.history-tab:hover {
  color: var(--text);
}

.history-tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.appointments-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.appointment-history-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 24px;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow1);
}

.appointment-history-card:hover {
  box-shadow: var(--shadow2);
  border-color: rgba(124, 58, 237, 0.2);
}

.appointment-history-card.cancelled {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
  opacity: 0.9;
}

.appointment-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.appointment-history-service {
  font-size: var(--t-lg);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.appointment-history-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.appointment-history-status.upcoming {
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand2);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.appointment-history-status.completed {
  background: rgba(22, 163, 74, 0.1);
  color: var(--good);
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.appointment-history-status.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: var(--bad);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.appointment-history-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.appointment-history-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appointment-history-detail-label {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.appointment-history-detail-value {
  font-size: var(--t-sm);
  color: var(--text);
  font-weight: 700;
}

.appointment-countdown-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
}

.countdown-text-header {
  font-size: var(--t-sm);
  color: var(--brand2);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.countdown-text-header::before {
  content: '⏱';
  font-size: 14px;
  opacity: 0.8;
}

.appointment-countdown {
  margin-top: 6px;
}

.countdown-text {
  font-size: var(--t-xs);
  color: var(--brand);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.countdown-text::before {
  content: '⏱';
  font-size: 12px;
  margin-right: 2px;
}

@media (max-width: 768px) {
  .appointment-history-details {
    grid-template-columns: 1fr;
  }
}

/* Cancel Appointment Modal */
.cancel-modal {
  max-width: 600px;
}

.cancel-content {
  padding: 24px 28px;
}

.cancel-appointment-info {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 20px;
  margin-bottom: 24px;
}

.cancel-reason-section {
  margin-bottom: 24px;
}

.cancel-reason-section textarea {
  margin-top: 8px;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

/* Booked Services Widget */
.booked-services-widget {
  margin-top: 32px;
}

.booked-services-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  padding: 20px;
  box-shadow: var(--shadow1);
}

.booked-services-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.booked-services-header strong {
  font-size: var(--t-xl);
  font-weight: 900;
  color: var(--text);
}

.booked-services-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booked-service-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r16);
  padding: 24px;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow1);
}

.booked-service-item:hover {
  box-shadow: var(--shadow2);
  border-color: rgba(124, 58, 237, 0.2);
}

.booked-service-item.cancelled {
  background: rgba(239, 68, 68, 0.05);
  border-color: rgba(239, 68, 68, 0.2);
  opacity: 0.9;
}

/* Booked Service Card - Minimalistic Design */
.booked-service-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.booked-service-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.booked-service-title-section {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.booked-service-photos {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.booked-service-photo-item {
  position: relative;
}

.booked-service-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.booked-service-photo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--panel2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--t-sm);
  color: var(--muted);
  border: 2px solid var(--border);
}

.booked-service-title-info {
  flex: 1;
  min-width: 0;
}

.booked-service-name {
  font-size: var(--t-lg);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.booked-service-doctor-name {
  font-size: var(--t-sm);
  color: var(--muted);
  font-weight: 600;
}

/* Booked Service Card Body */
.booked-service-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.booked-service-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

@media (max-width: 768px) {
  .booked-service-details-grid {
    grid-template-columns: 1fr;
  }
}

.booked-service-actions-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.booked-service-join-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--brand2);
  font-weight: 700;
  font-size: var(--t-xs);
  text-decoration: none;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.booked-service-join-link:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--brand2);
}

.booked-service-join-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.booked-service-emergency {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--bad);
  font-weight: 700;
  font-size: var(--t-xs);
  text-decoration: none;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
}

.booked-service-emergency:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--bad);
}

.booked-service-emergency svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.booked-service-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.booked-service-detail-label {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.booked-service-detail-value {
  font-size: var(--t-md);
  color: var(--text);
  font-weight: 800;
}

.booked-service-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.booked-service-status {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.booked-service-status.upcoming {
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand2);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.booked-service-status.cancelled {
  background: rgba(239, 68, 68, 0.1);
  color: var(--bad);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Doctor Info Modal */
.doctor-info-modal {
  max-width: 600px;
}

.doctor-info-content {
  padding: 24px 28px;
}

.doctor-info-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.doctor-info-photo {
  width: 100px;
  height: 100px;
  border-radius: var(--r16);
  object-fit: cover;
  border: 2px solid var(--border);
}

.doctor-info-photo-placeholder {
  width: 100px;
  height: 100px;
  border-radius: var(--r16);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(14, 165, 233, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: var(--t-2xl);
  color: var(--brand);
  border: 2px solid var(--border);
}

.doctor-info-details h3 {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.doctor-info-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.doctor-info-badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: var(--t-xs);
  font-weight: 800;
  text-transform: uppercase;
}

.doctor-info-badge.rainbow-shield {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
}

.doctor-info-badge.associate {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
}

.doctor-info-badge.verified {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.98), rgba(14, 165, 233, 0.72));
  color: white;
}

.doctor-info-specializations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.doctor-info-specialization {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand2);
  font-size: var(--t-xs);
  font-weight: 700;
}

.doctor-info-bio {
  font-size: var(--t-md);
  color: var(--muted2);
  line-height: 1.6;
  margin-bottom: 20px;
}

.doctor-info-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.doctor-info-stat {
  text-align: center;
}

.doctor-info-stat-value {
  font-size: var(--t-2xl);
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 4px;
}

.doctor-info-stat-label {
  font-size: var(--t-xs);
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 1024px) {
  .appointment-main-content {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .appointment-booking-section {
    padding: 20px 16px;
  }

  .wizard-modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--r20) var(--r20) 0 0;
  }

  .wizard-progress {
    flex-wrap: wrap;
  }

  .wizard-step {
    min-width: 60px;
  }

  .wizard-step-label {
    font-size: 10px;
  }

  .time-slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* Doctor Description Section */
.doctor-description-section {
  margin-bottom: 24px;
}

.doctor-description-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r20);
  padding: 24px;
  box-shadow: var(--shadow1);
}

.doctor-description-header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.doctor-description-photo-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.doctor-description-photo,
.doctor-description-photo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: var(--r12);
  object-fit: cover;
}

.doctor-description-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: white;
  font-size: var(--t-xl);
  font-weight: 900;
}

.doctor-description-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  border: 2px solid var(--panel);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.doctor-description-badge.rainbow-shield {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
}

.doctor-description-badge.associate {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.98), rgba(124, 58, 237, 0.72));
  color: white;
}

.doctor-description-badge.verified {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.98), rgba(14, 165, 233, 0.72));
  color: white;
}

.doctor-description-info {
  flex: 1;
  min-width: 0;
}

.doctor-description-name {
  font-size: var(--t-xl);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 8px;
}

.doctor-description-specializations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.doctor-description-specialization-item {
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.15);
  color: var(--brand);
  font-size: var(--t-xs);
  font-weight: 800;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.doctor-description-bio {
  margin-top: 16px;
}

.doctor-description-bio-label {
  font-size: var(--t-sm);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doctor-description-bio-text {
  font-size: var(--t-md);
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Services Pagination */
.services-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  font-size: var(--t-sm);
  color: var(--muted);
  font-weight: 700;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--r8);
  font-size: var(--t-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.pagination-ellipsis {
  padding: 0 8px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 768px) {
  .services-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-controls {
    justify-content: center;
  }

  .doctor-description-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .doctor-description-photo-wrapper {
    margin: 0 auto;
  }
}