/* ================================================================
   Dr. Ahmed El-Deeb – Booking Styles
   ================================================================ */

/* ── ROOT ──────────────────────────────────────────────────────── */
#eldeeb-booking-app {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  direction: rtl;
  max-width: 680px;
  margin: 0 auto;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

.eb-root {
  background: #f7f8fc;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.10);
  padding-bottom: 24px;
}

/* ── HEADER ────────────────────────────────────────────────────── */
.eb-header {
  background: linear-gradient(135deg, #0f4c3a 0%, #1a6b5e 50%, #2a5a9c 100%);
  padding: 28px 24px 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.eb-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.eb-dr-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
  position: relative;
  letter-spacing: -.5px;
}
.eb-dr-sub {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  margin: 0;
  position: relative;
}

/* ── STEPS INDICATOR ───────────────────────────────────────────── */
.eb-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px 0;
}
.eb-step-item {
  display: flex;
  align-items: center;
  flex: 1;
}
.eb-step-item:last-child { flex: none; }

.eb-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: #e2e5ec;
  color: #aaa;
  flex-shrink: 0;
  transition: background .3s, color .3s;
  position: relative;
  z-index: 1;
}
.eb-step-dot.active {
  background: #fff;
  color: #1a6b5e;
  border: 2.5px solid #1a6b5e;
  box-shadow: 0 0 0 4px rgba(26,107,94,.12);
}
.eb-step-dot.done {
  background: #1a6b5e;
  color: #fff;
}

.eb-step-line {
  flex: 1;
  height: 2px;
  background: #e2e5ec;
  margin: 0 -2px;
  transition: background .3s;
}
.eb-step-line.done { background: #1a6b5e; }

.eb-step-lbl {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin: 6px 0 0;
  font-weight: 600;
}

/* ── BODY CARD ─────────────────────────────────────────────────── */
.eb-body {
  background: #fff;
  border-radius: 16px;
  margin: 14px 16px 0;
  padding: 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

/* ── SECTION TITLE ─────────────────────────────────────────────── */
.eb-sec-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── STEP HEADER (title + back btn) ───────────────────────────── */
.eb-step-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

/* ── INFO BAR ──────────────────────────────────────────────────── */
.eb-info-bar {
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ── CLINIC CARDS ──────────────────────────────────────────────── */
.eb-clinic-card {
  border: 2px solid #e8ecf2;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  background: #fafbfd;
  transition: all .2s;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  user-select: none;
}
.eb-clinic-card:hover { border-color: #cbd5e1; background: #f1f5f9; }
.eb-clinic-card.selected { background: color-mix(in srgb, var(--cc) 6%, white); }

.eb-clinic-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.eb-clinic-info { flex: 1; min-width: 0; }
.eb-clinic-name { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 4px; }
.eb-clinic-meta { font-size: 12px; color: #64748b; margin: 2px 0 0; line-height: 1.6; }

.eb-fee {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 6px;
}
.eb-check { font-size: 22px; font-weight: 800; align-self: center; }

/* ── DATE GRID ─────────────────────────────────────────────────── */
.eb-date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.eb-date-card {
  border: 2px solid #e8ecf2;
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  background: #fafbfd;
  text-align: center;
  transition: all .2s;
  user-select: none;
}
.eb-date-card:hover { border-color: #1a6b5e; background: #f0fdf4; }
.eb-date-card.selected { border-color: #1a6b5e; background: #e6f4f1; }
.eb-date-day { font-size: 13px; font-weight: 700; color: #1a6b5e; margin: 0 0 2px; }
.eb-date-num { font-size: 12px; color: #64748b; margin: 0; }

/* ── SLOT GRID ─────────────────────────────────────────────────── */
.eb-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}
.eb-slot {
  border: 2px solid #e8ecf2;
  border-radius: 10px;
  padding: 9px 4px;
  text-align: center;
  cursor: pointer;
  background: #fafbfd;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  transition: all .2s;
  user-select: none;
}
.eb-slot:hover:not(.booked) { border-color: #1a6b5e; background: #f0fdf4; color: #1a6b5e; }
.eb-slot.selected { border-color: #1a6b5e; background: #e6f4f1; color: #1a6b5e; }
.eb-slot.booked { border-color: #f1f1f4; background: #f8f8fb; color: #c0c4cf; cursor: not-allowed; }
.eb-booked-lbl { display: block; font-size: 9px; color: #e74c3c; font-weight: 700; margin-top: 2px; }

/* ── LOADING ───────────────────────────────────────────────────── */
.eb-loading {
  text-align: center;
  padding: 24px;
  color: #64748b;
  font-size: 14px;
  grid-column: 1 / -1;
}

/* ── FORM ELEMENTS ─────────────────────────────────────────────── */
.eb-fg { margin-bottom: 14px; }
.eb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.eb-lbl { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 6px; }

.eb-input,
.eb-select {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: #1e293b;
  background: #fafbfd;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  direction: rtl;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}
.eb-input:focus,
.eb-select:focus {
  border-color: #1a6b5e;
  box-shadow: 0 0 0 3px rgba(26,107,94,.12);
  background: #fff;
}

/* ── BUTTONS ───────────────────────────────────────────────────── */
.eb-btn-primary {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #1a6b5e, #2a5a9c);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  font-family: inherit;
  transition: opacity .2s, transform .1s;
  letter-spacing: .2px;
}
.eb-btn-primary:hover:not(:disabled) { opacity: .92; transform: translateY(-1px); }
.eb-btn-primary:active:not(:disabled) { transform: translateY(0); }
.eb-btn-primary:disabled {
  background: #e2e5ec;
  color: #a0a8b8;
  cursor: not-allowed;
}

.eb-btn-back {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s;
  white-space: nowrap;
}
.eb-btn-back:hover { background: #f1f5f9; }

/* ── SUMMARY ───────────────────────────────────────────────────── */
.eb-summary-clinic {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.eb-summary-tbl { margin-bottom: 4px; }
.eb-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  gap: 12px;
}
.eb-sum-row:last-child { border-bottom: none; }
.eb-sum-lbl { color: #64748b; flex-shrink: 0; }
.eb-sum-val { font-weight: 700; color: #1e293b; text-align: left; }

/* ── MAP LINK ──────────────────────────────────────────────────── */
.eb-map-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #2a5a9c;
  text-decoration: none;
  margin-top: 8px;
}
.eb-map-link:hover { text-decoration: underline; }

/* ── WARNING BOX ───────────────────────────────────────────────── */
.eb-warn-box {
  background: #fff8e1;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: #92400e;
  margin-top: 14px;
  line-height: 1.6;
}

/* ── ERROR ─────────────────────────────────────────────────────── */
.eb-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-top: 12px;
  font-weight: 600;
}

/* ── SUCCESS SCREEN ────────────────────────────────────────────── */
.eb-success-wrap { text-align: center; padding: 12px 0 20px; }
.eb-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a6b5e, #2a5a9c);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 8px 24px rgba(26,107,94,.3);
}
.eb-success-title { font-size: 22px; font-weight: 800; color: #1e293b; margin: 0 0 6px; }
.eb-success-sub   { font-size: 14px; color: #64748b; margin: 0; }

.eb-ref-box {
  background: #f0fdf4;
  border: 2px dashed #22c55e;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin: 16px 0;
}
.eb-ref-lbl { font-size: 12px; color: #64748b; margin: 0 0 4px; }
.eb-ref-num { font-size: 26px; font-weight: 800; color: #1a6b5e; margin: 0; letter-spacing: 3px; }

/* ── FOOTER NOTE ───────────────────────────────────────────────── */
.eb-footnote {
  text-align: center;
  font-size: 11px;
  color: #cbd5e1;
  margin: 16px 0 0;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .eb-body { padding: 16px 14px; margin: 12px 10px 0; }
  .eb-dr-name { font-size: 21px; }
  .eb-form-row { grid-template-columns: 1fr; }
  .eb-date-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .eb-slot-grid { grid-template-columns: repeat(3, 1fr); }
  .eb-steps { padding: 16px 14px 0; }
  .eb-step-dot { width: 28px; height: 28px; font-size: 11px; }
}
