/*
 * Public Clinic Page Styles
 * Uses design tokens from design-system.css
 */

/* ============================================
   LAYOUT
   ============================================ */

.pc-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #f8fafb;
  color: #1e293b;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.pc-main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================
   HEADER
   ============================================ */

.pc-header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pc-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pc-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--medical-primary, #0d9488);
  text-decoration: none;
}

.pc-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.pc-nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.pc-nav-link:hover {
  color: var(--medical-primary, #0d9488);
}

/* ============================================
   BUTTONS
   ============================================ */

.pc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--medical-primary, #0d9488);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.pc-btn-primary:hover {
  background: var(--medical-primary-dark, #0f766e);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

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

.pc-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--medical-primary, #0d9488);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.pc-btn-secondary:hover {
  background: var(--medical-primary-dark, #0f766e);
}

.pc-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.pc-btn-outline:hover {
  border-color: var(--medical-primary, #0d9488);
  color: var(--medical-primary, #0d9488);
}

.pc-btn-confirm {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

/* ============================================
   HERO SECTION
   ============================================ */

.pc-hero {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.pc-hero-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.pc-hero-info {
  flex: 1;
}

.pc-clinic-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.pc-clinic-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #166534;
}

.pc-clinic-description {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #475569;
  margin: 0;
}

/* ============================================
   TEAM SECTION
   ============================================ */

.pc-section {
  margin-bottom: 2rem;
}

.pc-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.25rem 0;
}

.pc-team-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pc-team-list {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.5rem;
  max-height: 600px;
  overflow-y: auto;
}

.pc-specialty-group {
  padding: 0.5rem 0.75rem 0.25rem;
}

.pc-specialty-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0;
}

.pc-professional-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.pc-professional-item:hover {
  background: #f8fafc;
}

.pc-professional-item.selected {
  background: var(--medical-primary-bg, #ccfbf1);
  border-color: var(--medical-primary, #0d9488);
}

.pc-professional-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.pc-professional-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pc-professional-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-professional-item-specialty {
  font-size: 0.75rem;
  color: #64748b;
}

/* Professional Detail Panel */
.pc-professional-detail {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.pc-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pc-detail-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.pc-detail-info {
  flex: 1;
}

.pc-detail-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.25rem 0;
}

.pc-detail-specialty {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.pc-detail-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.pc-tag {
  padding: 0.25rem 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #0369a1;
}

.pc-detail-section {
  margin-bottom: 1.25rem;
}

.pc-detail-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin: 0 0 0.75rem 0;
}

.pc-detail-bio {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* Service Cards */
.pc-service-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s;
}

.pc-service-card:hover {
  border-color: var(--medical-primary, #0d9488);
}

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

.pc-service-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 0.25rem 0;
}

.pc-service-meta {
  display: flex;
  gap: 1rem;
}

.pc-service-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
}

.pc-service-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.pc-service-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

/* ============================================
   BOOKING WIZARD
   ============================================ */

.pc-booking-page {
  max-width: 680px;
  margin: 0 auto;
}

.pc-booking-progress {
  margin-bottom: 2rem;
}

.pc-progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.pc-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
}

.pc-progress-number {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #94a3b8;
  transition: all 0.3s;
}

.pc-progress-step.active .pc-progress-number {
  background: var(--medical-primary, #0d9488);
  color: white;
}

.pc-progress-step.completed .pc-progress-number {
  background: var(--medical-primary, #0d9488);
  color: white;
}

.pc-progress-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  white-space: nowrap;
}

.pc-progress-step.active .pc-progress-label {
  color: var(--medical-primary, #0d9488);
  font-weight: 600;
}

.pc-progress-line {
  flex: 1;
  max-width: 60px;
  height: 2px;
  background: #e2e8f0;
  margin: 0 0.5rem;
  margin-bottom: 1.25rem;
}

/* Steps */
.pc-booking-step {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 2rem;
}

.pc-step-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1.5rem 0;
}

.pc-step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

/* Field Groups */
.pc-field-group {
  margin-bottom: 1.5rem;
}

.pc-field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.625rem;
}

.pc-field-hint {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.375rem;
}

.pc-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  color: #1e293b;
  background: white;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.pc-input:focus {
  outline: none;
  border-color: var(--medical-primary, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Phone Group */
.pc-phone-group {
  display: flex;
  gap: 0.5rem;
}

.pc-phone-code {
  width: 130px;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1e293b;
  background: white;
  flex-shrink: 0;
}

.pc-phone-code:focus {
  outline: none;
  border-color: var(--medical-primary, #0d9488);
}

.pc-phone-input {
  flex: 1;
}

/* Selection Cards (Professionals) */
.pc-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.pc-selection-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.pc-selection-card:hover {
  border-color: var(--medical-primary-light, #14b8a6);
  background: #f0fdfa;
}

.pc-selection-card.selected {
  border-color: var(--medical-primary, #0d9488);
  background: var(--medical-primary-bg, #ccfbf1);
}

.pc-selection-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.pc-selection-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
}

.pc-selection-detail {
  font-size: 0.6875rem;
  color: #64748b;
}

/* Selection List (Services) */
.pc-selection-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pc-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
}

.pc-selection-row:hover {
  border-color: var(--medical-primary-light, #14b8a6);
}

.pc-selection-row.selected {
  border-color: var(--medical-primary, #0d9488);
  background: var(--medical-primary-bg, #ccfbf1);
}

.pc-selection-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.pc-selection-row-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.pc-selection-row-detail {
  font-size: 0.75rem;
  color: #64748b;
}

.pc-selection-row-price {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

/* Date Input */
.pc-date-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  color: #1e293b;
  background: white;
  cursor: pointer;
  box-sizing: border-box;
}

.pc-date-input:focus {
  outline: none;
  border-color: var(--medical-primary, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Time Slots */
.pc-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}

.pc-slot-btn {
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.pc-slot-btn:hover {
  border-color: var(--medical-primary-light, #14b8a6);
  background: #f0fdfa;
}

.pc-slot-btn.selected {
  border-color: var(--medical-primary, #0d9488);
  background: var(--medical-primary, #0d9488);
  color: white;
}

.pc-slots-hint,
.pc-slots-loading,
.pc-slots-empty,
.pc-slots-error {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  padding: 2rem 1rem;
}

.pc-slots-error {
  color: #dc2626;
}

/* Summary Card */
.pc-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.pc-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.625rem 0;
}

.pc-summary-row:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
}

.pc-summary-label {
  font-size: 0.875rem;
  color: #64748b;
}

.pc-summary-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
}

.pc-summary-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0.5rem 0;
}

/* Success State */
.pc-success-state {
  text-align: center;
  padding: 3rem 2rem;
}

.pc-success-icon {
  color: var(--medical-primary, #0d9488);
  margin-bottom: 1.5rem;
}

.pc-success-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.pc-success-message {
  font-size: 1rem;
  color: #64748b;
  margin: 0 0 1.5rem 0;
}

.pc-success-details {
  max-width: 400px;
  margin: 0 auto;
}

/* Error Message */
.pc-booking-error {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.5rem;
  background: #dc2626;
  color: white;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
  z-index: 1000;
}

/* Empty State */
.pc-empty-state {
  text-align: center;
  padding: 3rem;
  color: #94a3b8;
  font-size: 0.9375rem;
  grid-column: 1 / -1;
}

/* ============================================
   FOOTER
   ============================================ */

.pc-footer {
  background: white;
  border-top: 1px solid #e2e8f0;
  padding: 1.5rem;
  margin-top: auto;
}

.pc-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.pc-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
}

.pc-footer-powered {
  margin-top: 0.5rem !important;
  font-size: 0.75rem !important;
  color: #94a3b8 !important;
}

.pc-footer-powered a {
  color: var(--medical-primary, #0d9488);
  text-decoration: none;
}

/* Professional colors */
:root {
  --professional-teal: #0d9488;
  --professional-rose: #e11d48;
  --professional-blue: #3b82f6;
  --professional-green: #16a34a;
  --professional-orange: #ea580c;
  --professional-purple: #9333ea;
}

/* Avatar images (when using S3 photo instead of initials) */
.pc-avatar-img {
  object-fit: cover;
  border-radius: 50%;
}

img.pc-professional-avatar {
  width: 2.5rem;
  height: 2.5rem;
}

img.pc-detail-avatar {
  width: 4rem;
  height: 4rem;
}

img.pc-selection-avatar {
  width: 3rem;
  height: 3rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .pc-main {
    padding: 1rem;
  }

  .pc-hero {
    padding: 1.5rem;
  }

  .pc-clinic-name {
    font-size: 1.5rem;
  }

  .pc-team-layout {
    grid-template-columns: 1fr;
  }

  .pc-team-list {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.75rem;
    max-height: none;
  }

  .pc-specialty-group {
    display: none;
  }

  .pc-professional-item {
    flex-direction: column;
    text-align: center;
    min-width: 100px;
    padding: 0.625rem;
  }

  .pc-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pc-slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pc-booking-step {
    padding: 1.25rem;
  }

  .pc-service-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .pc-service-action {
    width: 100%;
    justify-content: space-between;
  }

  .pc-nav-link {
    display: none;
  }

  .pc-progress-label {
    display: none;
  }

  .pc-phone-group {
    flex-direction: column;
  }

  .pc-phone-code {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .pc-selection-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pc-slots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
