/* ==============================================================================
   MedRegia Public Portal — Scoped View Styles (views.css)
   Scoped styling for Clinics, Doctors, Waiting Hall, Health Records, & Profile
   ============================================================================== */

/* ================= 1. CLINICS VIEW ================= */
#view-clinic,
#view-clinics {
  display: none;
}

#view-clinic.active,
#view-clinics.active {
  display: block;
}

.clinic-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.clinic-card:hover {
  border-color: var(--primary-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.clinic-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.clinic-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.clinic-address {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 10px;
}

.clinic-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  border-top: 0.5px solid var(--border);
  padding-top: 10px;
}

/* ================= 2. DOCTORS DIRECTORY & SCHEDULE ================= */
#view-doctor,
#view-doctors,
#view-doctor-detail {
  display: none;
}

#view-doctor.active,
#view-doctors.active,
#view-doctor-detail.active {
  display: block;
}

.sub-back-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-bright);
  transition: background 0.15s ease;
}

.sub-back-bar:hover {
  background: var(--surface-2);
}

.doctor-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  transition: all 0.18s ease;
}

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

.doctor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0F6E56, #0284C7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.doctor-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.doctor-spec {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.slots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.slot-time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.slot-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 2px 4px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ECEEEC;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.slot-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

.slot-pill.active {
  background: #5DCAA5 !important;
  color: #04241E !important;
  border-color: #5DCAA5 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(93, 202, 165, 0.35);
}

.slot-pill:disabled,
.slot-pill.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.book-btn.is-disabled {
  background: rgba(15, 110, 86, 0.35) !important;
  color: #6E948A !important;
  border: 1px solid rgba(93, 202, 165, 0.15) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
}

#doctors-container,
#all-doctors-container,
#clinics-container {
  padding-right: 0;
  padding-bottom: 130px;
}

/* ================= 3. WAITING HALL (LIVE QUEUE & NOTIFS) ================= */
#view-notice {
  display: none;
}

#view-notice.active {
  display: block;
}

.queue-counter-card {
  background: linear-gradient(135deg, rgba(15, 110, 86, 0.4) 0%, rgba(2, 132, 199, 0.25) 100%);
  border: 1.5px solid rgba(93, 202, 165, 0.35);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  margin-bottom: 16px;
}

.queue-token-display {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  font-weight: 700;
  color: #5DCAA5;
  margin: 8px 0;
  letter-spacing: -0.02em;
}

.queue-ahead-count {
  font-size: 13.5px;
  font-weight: 600;
  color: #ECEEEC;
}

.btn-subtab {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= 4. FAMILY DEPENDENTS & PROFILE ================= */
#view-profile,
#view-profile-details,
#view-family,
#view-account {
  display: none;
}

#view-profile.active,
#view-profile-details.active,
#view-family.active,
#view-account.active {
  display: block;
}

.family-member-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s ease;
}

.family-member-card:hover {
  border-color: var(--primary-bright);
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.field-row:hover {
  background: var(--surface-2);
}

/* ================= 5. HEALTH RECORDS ================= */
#view-record,
#view-favourite {
  display: none;
}

#view-record.active,
#view-favourite.active {
  display: block;
}

/* ==========================================================================
   PATIENT FILTER CHIPS, VITALS ACCORDION & FAVOURITES STYLES
   ========================================================================== */

.patient-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.patient-filter-chip:hover {
  border-color: rgba(93, 202, 165, 0.4);
  color: var(--text);
}

.patient-filter-chip.active {
  background: rgba(15, 110, 86, 0.45);
  border-color: #5DCAA5;
  color: #F0FDF4;
  box-shadow: 0 0 8px rgba(93, 202, 165, 0.2);
}

.vitals-accordion-btn {
  background: none;
  border: none;
  padding: 4px 0;
  color: var(--primary-bright);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.vitals-accordion-btn:hover {
  opacity: 0.9;
}

.card-vitals-accordion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  opacity: 0;
}

.card-vitals-accordion.open {
  max-height: 800px;
  opacity: 1;
}

.vitals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.vital-param-card {
  background: rgba(255, 255, 255, 0.03);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
}

.vital-param-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.vital-param-val {
  font-size: 12px;
  font-weight: 700;
  color: #F0FDF4;
}

.fav-heart-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.fav-heart-btn:active {
  transform: scale(0.85);
}

.fav-heart-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
