/* ==========================================================================
   Book Consultation Widget — drop-in stylesheet
   Copy this file into your site and link it, e.g.
   <link rel="stylesheet" href="booking-widget.css">
   ========================================================================== */

:root{
  --bw-primary:      #0EA5A0;   /* teal, matches "JYOTHI" text */
  --bw-primary-dark: #0B7E7A;
  --bw-primary-tint: #E0F5F4;
  --bw-accent:       #F5820A;   /* orange, matches the flame icon */
  --bw-accent-dark:  #D66E00;
  --bw-bg:           #F6F8F7;
  --bw-surface:      #FFFFFF;
  --bw-text:         #142420;
  --bw-text-muted:   #5C6E68;
  --bw-border:       #E1E8E5;
  --bw-success:      #2E8B57;
  --bw-danger:       #C0483C;
  --bw-radius:       14px;
  --bw-radius-sm:    9px;
  --bw-shadow:       0 12px 32px -12px rgba(7,63,56,0.28);
  --bw-font-display: 'Fraunces', Georgia, serif;
  --bw-font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.bw-root, .bw-root *{ box-sizing:border-box; }
.bw-root{
  font-family: var(--bw-font-body);
  color: var(--bw-text);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Booking bar (embed anywhere on the page) ---------- */
#bw-widget{
  display: flex;
  justify-content: center;
  padding: 0 24px;
  margin: 0 auto;
}

.bw-bar{
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 32px -12px rgba(7,63,56,0.28);
  padding: 18px 28px;
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 1320px;
  width: 100%;
}

.bw-field{
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  border: none;
  padding: 0;
  text-align: center;
}

.bw-field-icon{
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--bw-primary);   /* change from var(--bw-text-muted) to this */
}
.bw-field-text{
  flex: 1;
  min-width: 0;
}

.bw-field label{
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--bw-text-muted);
  margin-bottom: 2px;
}

.bw-field select{
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: var(--bw-font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--bw-text);
  
}

.bw-cta{
  flex: 0 0 auto;
  background: var(--bw-accent);
  color: #241605;
  border: none;
  border-radius: 8px;
  font-family: var(--bw-font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 40px;
  cursor: pointer;
}

.bw-cta:hover{ background: var(--bw-accent-dark); }
/* ---------- Doctor list ---------- */
.bw-doctor-card{
  display:flex; align-items:center; gap:14px;
  padding:14px; border:1px solid var(--bw-border); border-radius: var(--bw-radius-sm);
  margin-bottom:10px; cursor:pointer; transition: border-color .15s ease, background .15s ease;
}
.bw-doctor-card:hover{ border-color: var(--bw-primary); background: var(--bw-primary-tint); }
.bw-avatar{
  width:52px; height:52px; border-radius:50%;
  background: var(--bw-primary); color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--bw-font-display); font-size:18px; font-weight:600;
  flex-shrink:0;
}
.bw-doctor-info{ flex:1; min-width:0; }
.bw-doctor-name{ font-weight:700; font-size:15px; margin:0 0 2px; }
.bw-doctor-meta{ font-size:12.5px; color: var(--bw-text-muted); margin:0; }
.bw-doctor-spec{ font-size:12.5px; color: var(--bw-primary); font-weight:600; margin:2px 0 0; }
.bw-chev{ color: var(--bw-text-muted); font-size:18px; flex-shrink:0; }

/* ---------- Date & time picker ---------- */
.bw-back{
  border:none; background:none; color: var(--bw-primary); font-weight:600;
  font-size:13.5px; cursor:pointer; padding:0 0 14px; display:flex; align-items:center; gap:4px;
}
.bw-selected-doc{
  display:flex; align-items:center; gap:12px; margin-bottom:18px;
}
.bw-selected-doc .bw-avatar{ width:44px; height:44px; font-size:15px; }
.bw-section-label{
  font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color: var(--bw-text-muted); margin: 18px 0 8px;
}
.bw-dates{
  display:flex; gap:8px; overflow-x:auto; padding-bottom:4px;
}
.bw-date-chip{
  flex: 0 0 auto;
  border:1px solid var(--bw-border); background: var(--bw-surface);
  border-radius: var(--bw-radius-sm); padding:10px 14px;
  text-align:center; cursor:pointer; min-width:66px;
}
.bw-date-chip .d{ font-size:11px; color: var(--bw-text-muted); font-weight:600; text-transform:uppercase; }
.bw-date-chip .n{ font-size:16px; font-weight:700; margin-top:2px; }
.bw-date-chip.on{ background: var(--bw-primary); border-color: var(--bw-primary); }
.bw-date-chip.on .d, .bw-date-chip.on .n{ color:#fff; }

.bw-slots{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(84px,1fr));
  gap:8px;
}
.bw-slot{
  border:1px solid var(--bw-border); background: var(--bw-surface);
  border-radius: var(--bw-radius-sm); padding:9px 6px;
  font-size:13px; font-weight:600; cursor:pointer; text-align:center;
}
.bw-slot:hover{ border-color: var(--bw-primary); }
.bw-slot.on{ background: var(--bw-primary); border-color: var(--bw-primary); color:#fff; }
.bw-slot.taken{ opacity:.35; text-decoration: line-through; cursor:not-allowed; }

.bw-continue{
  margin-top:22px; width:100%; background: var(--bw-primary); color:#fff;
  border:none; border-radius: var(--bw-radius-sm); padding:13px; font-size:15px;
  font-weight:700; cursor:pointer; font-family: var(--bw-font-body);
}
.bw-continue:disabled{ background: var(--bw-border); color: var(--bw-text-muted); cursor:not-allowed; }
.bw-continue:not(:disabled):hover{ background: var(--bw-primary-dark); }

/* ---------- Confirm step ---------- */
.bw-summary{
  background: var(--bw-bg); border-radius: var(--bw-radius-sm);
  padding:16px; margin-bottom:18px;
}
.bw-summary-row{ display:flex; justify-content:space-between; padding:6px 0; font-size:14px; }
.bw-summary-row + .bw-summary-row{ border-top:1px solid var(--bw-border); }
.bw-summary-row .k{ color: var(--bw-text-muted); }
.bw-summary-row .v{ font-weight:700; }

.bw-phone-row{ display:flex; gap:8px; }
.bw-phone-row .bw-field{ flex:0 0 92px; }
.bw-phone-row .bw-field:last-child{ flex:1; }
.bw-phone-row input{
  border:none; outline:none; width:100%; font-family:var(--bw-font-body);
  font-size:14.5px; font-weight:600; color: var(--bw-text); background:transparent;
}

/* ---------- Success step ---------- */
.bw-success{ text-align:center; padding: 8px 0 4px; }
.bw-success-icon{
  width:56px; height:56px; border-radius:50%; background: var(--bw-success);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-size:26px; margin: 4px auto 16px;
}
.bw-success h3{ font-family: var(--bw-font-display); font-size:21px; margin:0 0 6px; color: var(--bw-primary-dark); }
.bw-success p{ color: var(--bw-text-muted); font-size:14px; margin:0 0 18px; }

@media (max-width: 520px){
  .bw-bar{ flex-direction:column; }
  .bw-cta{ width:100%; padding:14px; }
}
#bw-widget {
  display: flex;
  justify-content: center;
  padding: 0 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.bw-bar {
  max-width: 900px;
  width: 100%;

}
.bw-bar{
  border-top: 3px solid var(--bw-primary);
}

.bw-field select:focus{
  outline: none;
}

.bw-field:hover .bw-field-icon{
  color: var(--bw-accent);
}

.bw-field label{
  color: var(--bw-primary);
}

.bw-cta:hover{
  background: var(--bw-accent-dark);
}

/* ==========================================================================
   Phase 1a additions — patient details form, inline validation, error banner
   (new classes only; nothing above this line was changed)
   ========================================================================== */

.bw-form-grid{
  display:flex; flex-direction:column; gap:14px; margin-bottom:6px;
}
.bw-field-row{
  display:flex; gap:14px;
}
.bw-field-row .bw-field{ flex:1; }

/* Scoped stacked layout (label above input) for the new form fields only —
   does not change .bw-field's existing row layout used in the top bar. */
.bw-form-grid .bw-field{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:4px;
}

.bw-form-grid .bw-field input[type="text"],
.bw-form-grid .bw-field input[type="email"],
.bw-form-grid .bw-field input[type="number"],
.bw-form-grid .bw-field input[type="tel"],
.bw-form-grid .bw-field textarea,
.bw-form-grid .bw-field select{
  border:1px solid var(--bw-border);
  border-radius: var(--bw-radius-sm);
  padding:9px 11px;
  width:100%;
  font-family: var(--bw-font-body);
  font-size:14.5px;
  font-weight:600;
  color: var(--bw-text);
  background:#fff;
  appearance:auto;
  -webkit-appearance:auto;
}
.bw-form-grid .bw-field textarea{
  resize:vertical;
  font-weight:400;
  min-height:56px;
}
.bw-form-grid .bw-field input:focus,
.bw-form-grid .bw-field textarea:focus,
.bw-form-grid .bw-field select:focus{
  outline:none;
  border-color: var(--bw-primary);
}

.bw-field-error{
  color: var(--bw-danger);
  font-size:12px;
  margin:2px 0 0;
  min-height:14px;
}

.bw-alert-error{
  background:#FBEAE8;
  color: var(--bw-danger);
  border:1px solid #F0C6C1;
  border-radius: var(--bw-radius-sm);
  padding:10px 12px;
  font-size:13.5px;
  margin:0 0 16px;
}

.bw-loading{
  color: var(--bw-text-muted);
  font-size:14px;
  padding:12px 0;
}

@media (max-width: 480px){
  .bw-field-row{ flex-direction:column; }
}

/* ==========================================================================
   Modal shell — .bw-overlay / .bw-modal had no styling anywhere in the
   original file, which is why clicking "Book Consultation" appeared to do
   nothing (the popup was being created but was invisible/unpositioned).
   ========================================================================== */

.bw-overlay{
  position: fixed;
  inset: 0;
  background: rgba(20, 36, 32, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.bw-modal{
  background: var(--bw-surface);
  border-radius: var(--bw-radius);
  box-shadow: var(--bw-shadow);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  font-family: var(--bw-font-body);
}

.bw-modal-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 26px 0;
}
.bw-modal-title{
  font-family: var(--bw-font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--bw-text);
}
.bw-modal-sub{
  font-size: 13px;
  color: var(--bw-text-muted);
  margin: 0;
}
.bw-close{
  border: none;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--bw-text-muted);
  cursor: pointer;
  padding: 2px 4px;
}
.bw-close:hover{ color: var(--bw-text); }

.bw-modal-body{
  padding: 18px 26px 26px;
}

/* Step indicator dots (list -> slots -> confirm) */
.bw-pulse{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}
.bw-pulse-dot{
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bw-border);
}
.bw-pulse-dot.done{ background: var(--bw-primary); }
.bw-pulse-dot.on{ background: var(--bw-accent); width: 10px; height: 10px; }
.bw-pulse-seg{
  flex: 1;
  height: 2px;
  background: var(--bw-border);
}
.bw-pulse-seg.on{ background: var(--bw-primary); }