/* ============================================================
   Doctor Website — public styles. Original design, mobile-first.
   Primary: teal #0D7C6C
   ============================================================ */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --teal: #0D7C6C;
  --teal-dark: #0A5F53;
  --teal-light: #E6F4F1;
  --ink: #1E2A28;
  --muted: #6B7B78;
  --bg: #F7FAF9;
  --card: #FFFFFF;
  --danger: #C0392B;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(13, 124, 108, 0.08);
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}
/* Headings: extra bold, tight — drhafizharoon.com jaisa */
h1, h2, h3, h4, .section-title, .brand-text {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2.section-title { font-size: 1.9rem; color: #0B3B34; }
/* Labels, badges, buttons: 500-700 */
.btn, label, .chip, .pill, .tab, .wizard-steps li { font-weight: 600; }
th, .eyebrow { font-weight: 700; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
a { color: var(--teal); }

/* ---------- header ---------- */
.site-header {
  background: var(--card);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.brand-text { font-weight: 700; line-height: 1.2; display: flex; flex-direction: column; }
.brand-text small { font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.nav-toggle { display: none; background: none; border: 1px solid #ddd; border-radius: 8px; font-size: 20px; padding: 4px 10px; }
.site-nav { display: flex; align-items: center; gap: 18px; }
.site-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.site-nav a.active { color: var(--teal); }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 600; text-decoration: none;
  cursor: pointer; font-size: 1rem; text-align: center;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-outline { background: #fff; color: var(--teal); border-color: var(--teal); }
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }

label { display: block; margin: 12px 0 4px; font-weight: 500; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="date"], input[type="time"], input[type="search"],
select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #D5DDDB; border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; margin-top: 4px;
}
textarea { resize: vertical; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--teal); }
input[type="file"] { margin-top: 6px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > label { flex: 1; min-width: 140px; }

/* ---------- shared SVG icon sizing (icons.php) ---------- */
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; }
.icon-md { width: 1.6rem; height: 1.6rem; }
.icon-lg { width: 2rem; height: 2rem; }
.icon-xl { width: 2.9rem; height: 2.9rem; }
.star-fill { color: #F5A623; }
.btn .icon, .chip .icon, .eyebrow .icon { margin-right: 2px; }

/* ---------- cards / sections ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin: 16px 0;
}
.section { padding: 36px 0; }
.section-alt { background: #fff; }
.section-title { text-align: center; color: var(--teal-dark); margin-top: 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto 20px; text-align: center; }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, var(--teal-light), #fff); padding: 48px 0; text-align: center; }
.hero-photo {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--teal); color: #fff; font-size: 56px;
  display: flex; align-items: center; justify-content: center;
  border: 4px solid #fff; box-shadow: var(--shadow);
}
.eyebrow { text-transform: uppercase; letter-spacing: 2px; color: var(--teal); font-size: 0.8rem; font-weight: 700; }
.hero h1 { margin: 4px 0; font-size: 2rem; }
.qualifications { color: var(--muted); margin: 0; }
.rating { margin: 8px 0; color: #E8A100; }
.rating strong, .rating .muted { color: var(--ink); }
.hero-tagline { max-width: 560px; margin: 12px auto 20px; font-size: 1.1rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- stats / steps ---------- */
.stats-strip { background: var(--teal); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px 16px; text-align: center; }
.stat strong { display: block; font-size: 1.4rem; }
.stat span { font-size: 0.85rem; opacity: 0.85; }
.steps { display: grid; gap: 16px; grid-template-columns: 1fr; }
.step { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 700; margin: 0 auto 10px;
}

/* ---------- timeline ---------- */
.timeline { max-width: 560px; margin: 0 auto; }
.timeline-item { display: flex; gap: 14px; padding: 12px 0; border-left: 3px solid var(--teal-light); padding-left: 18px; position: relative; }
.timeline-dot {
  width: 14px; height: 14px; border-radius: 50%; background: var(--teal);
  position: absolute; left: -8.5px; top: 18px;
}
.timeline-body strong { display: block; }
.timeline-body span { color: var(--muted); display: block; font-size: 0.9rem; }
.timeline-body em { font-style: normal; color: var(--teal); font-weight: 600; font-size: 0.9rem; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.chip { background: var(--teal-light); color: var(--teal-dark); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; text-decoration: none; font-weight: 600; }
.chip-active { background: var(--teal); color: #fff; }
a.chip:hover { background: var(--teal); color: #fff; }

/* ---------- services ---------- */
.service-card { text-align: center; }
.service-icon { font-size: 2.5rem; }
.service-card h3 { margin: 8px 0; }
.fee { font-size: 1.6rem; font-weight: 800; color: var(--teal-dark); margin: 10px 0; }
.service-detail h3 { margin-top: 6px; }
.tick-list { list-style: none; padding: 0; }
.tick-list li { padding: 6px 0 6px 28px; position: relative; }
.tick-list li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.fee-row { display: flex; align-items: baseline; gap: 8px; margin: 12px 0; }

/* ---------- blog ---------- */
.blog-card { text-decoration: none; color: var(--ink); display: block; }
.blog-card h3 { margin: 8px 0; }
.blog-cat { background: var(--teal-light); color: var(--teal-dark); font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.blog-cover { width: 100%; border-radius: 10px; margin-bottom: 10px; }
.article h1 { margin: 10px 0; }
.article-cover { width: 100%; border-radius: 10px; margin: 12px 0; }
.article-body { font-size: 1.05rem; }
.share-row { display: flex; gap: 8px; align-items: center; margin-top: 20px; }

/* ---------- contact / footer ---------- */
.contact-card p { margin: 8px 0; }
.site-footer { background: var(--ink); color: #D8E2E0; margin-top: 40px; }
.footer-grid { display: grid; gap: 20px; grid-template-columns: 1fr; padding: 32px 16px; }
.site-footer h4 { color: #fff; margin: 0 0 8px; }
.site-footer a { color: #A9CFC8; text-decoration: none; }
.footer-bottom { text-align: center; padding: 14px; border-top: 1px solid #2E3B39; font-size: 0.85rem; }

/* ---------- booking wizard ---------- */
.wizard-steps { list-style: none; display: flex; padding: 0; margin: 0 0 20px; }
.wizard-steps li { flex: 1; text-align: center; font-size: 0.8rem; color: var(--muted); padding-top: 8px; border-top: 3px solid #D5DDDB; }
.wizard-steps li.done { color: var(--teal-dark); font-weight: 700; border-color: var(--teal); }
.type-cards { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 16px; }
.type-card { border: 2px solid #D5DDDB; border-radius: var(--radius); padding: 18px; cursor: pointer; text-align: center; margin: 0; }
.type-card.selected, .type-card:has(input:checked) { border-color: var(--teal); background: var(--teal-light); }
.type-card input { display: none; }
.type-icon { font-size: 2rem; display: block; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px; margin-bottom: 16px; }
.date-chip {
  min-width: 62px; text-align: center; border: 1px solid #D5DDDB; border-radius: 10px;
  padding: 8px 4px; text-decoration: none; color: var(--ink); background: #fff;
  display: flex; flex-direction: column; font-size: 0.8rem;
}
.date-chip.selected { border-color: var(--teal); background: var(--teal); color: #fff; }
.date-chip.empty { opacity: 0.4; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 20px; }
.slot { margin: 0; }
.slot input { display: none; }
.slot span {
  display: block; text-align: center; padding: 10px 4px; border: 1px solid #D5DDDB;
  border-radius: 10px; cursor: pointer; font-size: 0.9rem; background: #fff;
}
.slot input:checked + span { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 700; }
.slot-off span { opacity: 0.4; text-decoration: line-through; }
.slot-booked span { opacity: 0.4; background: #f0f0f0; }
table.kv { width: 100%; border-collapse: collapse; margin: 12px 0; }
table.kv th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 8px 6px 0; width: 110px; vertical-align: top; }
table.kv td { padding: 6px 0; }
.success-card .big-check {
  width: 64px; height: 64px; border-radius: 50%; background: var(--teal); color: #fff;
  font-size: 2rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
}
.booking-ref { font-size: 1.5rem; font-weight: 800; color: var(--teal-dark); letter-spacing: 1px; margin: 8px 0 16px; }

/* ---------- auth ---------- */
.auth-card { max-width: 440px; margin: 24px auto; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.auth-tabs a { flex: 1; text-align: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--muted); background: #F0F4F3; font-weight: 600; }
.auth-tabs a.active { background: var(--teal); color: #fff; }

/* ---------- dashboard ---------- */
.appt-card { border-left: 4px solid var(--teal); }
.appt-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pill { font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 20px; text-transform: capitalize; white-space: nowrap; }
.pill-pending { background: #FFF4D6; color: #8A6D00; }
.pill-confirmed { background: var(--teal-light); color: var(--teal-dark); }
.pill-completed { background: #E8E8E8; color: #555; }
.pill-cancelled { background: #FADBD8; color: var(--danger); }
.pill-published { background: var(--teal-light); color: var(--teal-dark); }
.pill-draft { background: #FFF4D6; color: #8A6D00; }
.prescription { background: #F4FAF8; border: 1px dashed var(--teal); border-radius: 10px; padding: 12px; margin: 12px 0; }
.prescription p { margin: 6px 0 0; }

/* ---------- alerts ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; }
.alert-danger { background: #FADBD8; color: #7B241C; }
.alert-success { background: #D5F5E3; color: #145A32; }

/* ---------- video call ---------- */
.call-wrap { max-width: 900px; margin: 0 auto; padding: 12px; }
.call-status { text-align: center; padding: 8px; font-weight: 600; color: var(--teal-dark); }
.video-stage { position: relative; background: #111; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.video-stage video#remoteVideo { width: 100%; height: 100%; object-fit: cover; }
.video-stage video#localVideo {
  position: absolute; right: 12px; bottom: 12px; width: 28%; max-width: 180px;
  border-radius: 10px; border: 2px solid #fff; background: #222;
}
.video-label {
  position: absolute; left: 12px; top: 12px; background: rgba(0,0,0,0.55); color: #fff;
  padding: 4px 12px; border-radius: 16px; font-size: 0.85rem;
}
.call-controls { display: flex; gap: 14px; justify-content: center; padding: 16px 0; }
.ctl {
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25); position: relative;
}
.ctl svg { width: 26px; height: 26px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ctl .ic-off { display: none; }
.ctl.off .ic-on { display: none; }
.ctl.off .ic-off { display: block; }
.ctl-mic { background: #2563EB; }
.ctl-mic.off { background: #E11D48; }
.ctl-cam { background: #0D7C6C; }
.ctl-cam.off { background: #E11D48; }
.ctl-chat { background: #1D4ED8; }
.ctl-end { background: #E11D48; }
.ctl-end svg { transform: rotate(135deg); }
.chat-dot {
  position: absolute; top: 1px; right: 1px; width: 15px; height: 15px;
  border-radius: 50%; background: #F59E0B; border: 2px solid #fff;
}
.chat-drawer.collapsed { top: auto; height: auto; }
.chat-drawer.collapsed .chat-msgs, .chat-drawer.collapsed .chat-input { display: none; }
.chat-drawer.collapsed .chat-head { cursor: pointer; border-bottom: none; }
.chat-head .chat-tools { display: flex; gap: 6px; }
.chat-head .chat-tools button {
  border: none; background: #f0f0f0; width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; font-size: 14px; line-height: 1; color: #333;
}
.chat-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: min(320px, 90vw);
  background: #fff; box-shadow: -2px 0 16px rgba(0,0,0,0.15); z-index: 100;
  display: flex; flex-direction: column;
}
.chat-drawer[hidden] { display: none !important; }
.chat-head { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-msg { background: var(--teal-light); padding: 8px 12px; border-radius: 12px; max-width: 85%; font-size: 0.9rem; }
.chat-msg.me { align-self: flex-end; background: var(--teal); color: #fff; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eee; }
.chat-input input { flex: 1; margin: 0; }

/* ---------- desktop ---------- */
@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .type-cards { grid-template-columns: 1fr 1fr; }
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
  .hero h1 { font-size: 2.6rem; }
}
@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 8px 16px 16px; box-shadow: var(--shadow); gap: 4px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid #f0f0f0; min-height: 44px; display: flex; align-items: center; }
  .header-inner { position: relative; }
}

/* ---------- Google sign-in ---------- */
.btn-google {
  background: #fff; border: 1px solid #dadce0; color: #3c4043;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600;
}
.btn-google:hover { background: #f8f9fa; }
.g-logo {
  font-weight: 800; font-size: 1.25rem; line-height: 1; color: #4285F4;
  font-family: Arial, sans-serif;
}
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 16px 0; font-size: 0.85rem; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid #eee; }

/* ---------- password eye toggle ---------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; font-size: 1.15rem; line-height: 1;
  cursor: pointer; padding: 2px;
}

/* ---------- video stage window controls ---------- */
.video-stage .stage-controls {
  position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; z-index: 6;
}
.stage-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 15px; line-height: 1;
  cursor: pointer;
}
.stage-btn:hover { background: rgba(0,0,0,0.8); }
.video-stage.minimized {
  position: fixed; right: 12px; bottom: 12px; width: 220px; aspect-ratio: 4/3;
  z-index: 300; box-shadow: 0 10px 30px rgba(0,0,0,0.4); cursor: pointer;
}
.video-stage.minimized .video-label { display: none; }

/* ---------- doctor -> patient messages ---------- */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg { background: var(--teal-light); border-radius: 12px; padding: 10px 14px; }
.msg p { margin: 0; }
.msg .msg-meta { font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
.msg.unread { background: #fff; border: 2px solid var(--teal); }
.msg-thread .msg.me { align-self: flex-end; background: var(--teal); color: #fff; max-width: 85%; }
.msg-thread .msg.me .msg-meta { color: rgba(255,255,255,0.85); }

/* ---------- two-way chat (messages.php) ---------- */
.nav-badge {
  display: inline-block; min-width: 20px; height: 20px; line-height: 20px;
  padding: 0 6px; border-radius: 999px; background: #E4572E; color: #fff;
  font-size: 0.72rem; font-weight: 800; text-align: center; vertical-align: 1px;
}
.chat-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.chat-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: var(--teal); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-avatar.sm { width: 34px; height: 34px; font-size: 0.8rem; }
.msg-thread { max-height: 55vh; overflow-y: auto; padding-right: 4px; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.msg-row .msg { flex: 1; }
.msg-who { font-size: 0.78rem; font-weight: 700; color: var(--teal-dark); margin-bottom: 4px; }

/* ---------- logged-in patient email in nav ---------- */
.nav-user {
  font-size: 0.82rem; color: var(--muted); padding: 8px 4px;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- reviews ---------- */
.star-empty { color: #D8DEE3; }
.stars { display: flex; gap: 2px; margin-bottom: 10px; }
.stars .icon { width: 1.1rem; height: 1.1rem; }
.reviews-grid { grid-template-columns: 1fr; }
.review-card { display: flex; flex-direction: column; }
.review-text { flex: 1; font-style: italic; }
.review-who { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
@media (min-width: 720px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- star rating input (review.php) ---------- */
.star-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin: 6px 0 14px; }
.star-input input { display: none; }
.star-input label { cursor: pointer; color: #D8DEE3; }
.star-input label .icon { width: 2rem; height: 2rem; }
.star-input input:checked ~ label,
.star-input label:hover,
.star-input label:hover ~ label { color: #F5A623; }

/* ---------- profile card (dashboard.php) ---------- */
.profile-card { display: flex; gap: 14px; align-items: flex-start; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
.check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--teal); }
