/* ==========================================================================
   Doctor profile — layout modelled on the nobat.ir profile page:
   identity hero, big green booking CTA, day strip, day cards, then the
   long-form sections. The teal chrome (header/footer/tokens) comes from
   teal.css; this file only adds the profile-specific pieces.
   ========================================================================== */

.page-doctor {
  --dc-green: #88b200;
  --dc-green-dark: #769a00;
  --dc-green-soft: #f9ffea;
  --dc-green-line: #a9c44f;
  --dc-olive: #8fa93c;
  --dc-olive-text: #7d942f;
  --dc-band: #eef9fc;
  --dc-radius: 8px;
  --dc-shadow: 0 1px 2px rgba(24, 44, 52, 0.06);
}

.dc-page {
  padding-bottom: 2.5rem;
}

/* -------------------------------------------------------------- breadcrumb */
.dc-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.9rem 0 0.4rem;
  font-size: 0.76rem;
  color: var(--nh-ink-faint);
}
.dc-crumb a { color: var(--nh-ink-faint); }
.dc-crumb a:hover { color: var(--nh-teal-dark); }

/* ------------------------------------------------------------------- hero */
.dc-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 0.6rem 0 1.1rem;
}
.dc-hero__photo {
  order: 1;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--nh-sky);
  display: grid;
  place-items: center;
  color: var(--nh-teal-dark);
  font-size: 2rem;
  font-weight: 800;
}
.dc-hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dc-hero__info {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
}
.dc-hero__name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--nh-ink);
  line-height: 1.4;
}
.dc-verified {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2196f3;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  flex: 0 0 auto;
}

/* The tinted bands behind specialty / sub-specialty, as in the reference.
   fit-content keeps the tint hugging the text instead of stretching the row. */
.dc-hero__line {
  display: block;
  width: fit-content;
  margin-bottom: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
  background: var(--nh-sky);
  color: #0f7f96;
  font-size: 0.88rem;
  font-weight: 700;
}

.dc-hero__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.7rem;
  font-size: 0.76rem;
  color: var(--nh-ink-soft);
}
.dc-hero__code { direction: rtl; }

.dc-hero__rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.76rem;
  color: var(--nh-ink-faint);
}
.dc-hero__rating .stars .star.is-full,
.dc-hero__rating .stars .star.is-half { background: var(--nh-star); }

/* Nearest free slot, parked on the far side of the hero so the row is not
   half empty on wide screens. */
.dc-hero__next {
  order: 3;
  flex: 0 0 auto;
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 1rem;
  border-inline-start: 1px solid var(--nh-line);
  text-align: center;
}
.dc-hero__next-label {
  font-size: 0.7rem;
  color: var(--nh-ink-faint);
}
.dc-hero__next-day {
  font-size: 0.88rem;
  color: var(--nh-ink);
}
.dc-hero__next-time {
  font-size: 0.78rem;
  color: var(--dc-olive-text);
  font-weight: 700;
}

/* -------------------------------------------------------------------- CTA */
.dc-cta {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--dc-radius);
  background: var(--dc-green);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
  transition: background 0.15s;
}
.dc-cta:hover {
  background: var(--dc-green-dark);
  color: #fff;
}

/* Booking fee note: the platform's flat charge, not the doctor's own fee. */
.dc-cta-note {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--nh-ink-soft);
  text-align: center;
}
.dc-cta-note strong { color: var(--nh-ink); }

/* -------------------------------------------------------------- day strip */
.dc-days { margin-top: 1.6rem; }

.dc-section-title {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--nh-ink);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.dc-section-title__aside {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--nh-ink-faint);
}

/* A grid rather than a scroller: auto-fit collapses the empty tracks so the
   days stretch to fill the row, and many days wrap instead of hiding
   off-screen. */
.dc-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.6rem;
}

.dc-daypill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.55rem 0.35rem 0.45rem;
  border: 1px solid var(--dc-green-line);
  border-radius: 7px;
  background: var(--dc-green-soft);
  color: var(--dc-olive-text);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.dc-daypill:hover {
  border-color: var(--dc-green);
  box-shadow: 0 4px 12px rgba(136, 178, 0, 0.18);
  color: var(--dc-olive-text);
}
.dc-daypill__dow { font-size: 0.72rem; }
.dc-daypill__date { font-size: 0.9rem; font-weight: 800; }
.dc-daypill__free { font-size: 0.66rem; color: #8c9a63; }
.dc-daypill__rel {
  font-size: 0.66rem;
  color: var(--nh-ink-faint);
  border-top: 1px solid rgba(169, 196, 79, 0.35);
  width: 100%;
  text-align: center;
  padding-top: 0.2rem;
  margin-top: 0.15rem;
}
.dc-daypill.is-full {
  background: #f6f7f3;
  border-color: #e2e6da;
  color: #a9b1a0;
}
/* A day with no free slot is not a link: no hover lift, no pointer cursor. */
.dc-daypill.is-full:hover {
  border-color: #e2e6da;
  box-shadow: none;
}
.dc-daypill.is-full .dc-daypill__free { color: #b3bbaa; }

/* -------------------------------------------------------------- day cards */
.dc-daylist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.dc-daycard {
  display: block;
  border: 1px solid #eef1e6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(30, 50, 40, 0.06);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}
.dc-daycard:hover {
  box-shadow: 0 6px 18px rgba(30, 50, 40, 0.1);
  transform: translateY(-1px);
}
/* Same for a full day card: it must not react to the pointer at all. */
.dc-daycard.is-full:hover {
  box-shadow: 0 2px 10px rgba(30, 50, 40, 0.06);
  transform: none;
}
.dc-daycard__top {
  display: block;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(169, 196, 79, 0.4);
  background: #d9f77e;
  color: #4f6a00;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}
.dc-daycard__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: #d9f77e;
}
.dc-daycard__main { display: grid; gap: 0.2rem; }
.dc-daycard__main strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: #3d5200;
}
.dc-daycard__main small {
  font-size: 0.8rem;
  color: #4f6a00;
}
.dc-daycard__go {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #c5ec5a;
  color: #3d5200;
  font-size: 1.4rem;
  line-height: 1;
}
.dc-daycard.is-full .dc-daycard__top,
.dc-daycard.is-full .dc-daycard__body { background: #f1f4e6; }
.dc-daycard.is-full .dc-daycard__top { color: #93a07a; }
.dc-daycard.is-full .dc-daycard__main strong,
.dc-daycard.is-full .dc-daycard__main small { color: #a4ae8e; }
.dc-daycard.is-full .dc-daycard__go { background: #e4e9d6; color: #a4ae8e; }

/* ------------------------------------------------------------------ bands */
.dc-band {
  margin-top: 2rem;
  padding: 1.5rem 0 1.7rem;
  background: #f6f7f8;
}
.dc-band__title {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: var(--nh-ink);
}
.dc-band__body {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  color: var(--nh-ink-soft);
  font-size: 0.88rem;
  line-height: 2;
}
.dc-band__body p { margin: 0 0 0.4rem; }

.dc-section { margin-top: 1.9rem; }
.dc-prose {
  margin: 0;
  color: var(--nh-ink-soft);
  font-size: 0.88rem;
  line-height: 2;
}

/* ---------------------------------------------------------------- address */
.dc-address {
  margin-top: 1.9rem;
  padding: 1.4rem 0;
  background: var(--dc-band);
}
.dc-address__title {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f7f96;
}
/* Address on one side, hours + route action on the other, so the tinted band
   is not left half empty on wide screens. */
.dc-address__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem 2.5rem;
}
.dc-address__side {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
  min-width: 200px;
}
.dc-address__route {
  width: auto;
  padding-inline: 1.6rem;
}
.dc-address__item { margin-bottom: 0.6rem; }
.dc-chip {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.9rem;
  border-radius: 4px;
  background: #dfe3e6;
  color: #3f4a52;
  font-size: 0.86rem;
  font-weight: 700;
}
.dc-address__line {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--nh-ink);
}
.dc-address__map {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  color: var(--nh-blue);
  border-bottom: 1px dotted currentColor;
}
.dc-address__phone {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--nh-ink);
}
.dc-address__hours {
  margin: 0.8rem 0 0;
  font-size: 0.86rem;
  color: var(--nh-ink);
}
.dc-address__hours strong { color: #0f7f96; }

/* ------------------------------------------------------------------ hours */
.dc-hours {
  border: 1px solid var(--nh-line);
  border-radius: 8px;
  overflow: hidden;
}
.dc-hours__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 1rem;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--nh-line);
}
.dc-hours__row:last-child { border-bottom: 0; }
.dc-hours__row:nth-child(even) { background: #fafbfc; }
.dc-hours__day { font-weight: 700; color: var(--nh-ink); min-width: 7rem; }
.dc-hours__time { color: var(--nh-ink-soft); }
.dc-hours__free { color: var(--dc-olive-text); font-size: 0.8rem; }
.dc-hours__row.is-full .dc-hours__free { color: #b3bbaa; }

/* ---------------------------------------------------------------- reviews */
.dc-review {
  padding: 0.9rem 0;
  border-top: 1px solid var(--nh-line);
}
.dc-review:first-of-type { border-top: 0; }
.dc-review__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}
.dc-review__stars .stars .star.is-full,
.dc-review__stars .stars .star.is-half { background: var(--nh-star); }
.dc-review__name { color: var(--nh-ink); }
.dc-review__date {
  margin-inline-start: auto;
  color: var(--nh-ink-faint);
  font-size: 0.74rem;
}
.dc-review__text {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--nh-ink-soft);
}
.dc-review__reply {
  margin-top: 0.5rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: var(--nh-sky);
  font-size: 0.82rem;
  color: #0f7f96;
}

/* ---------------------------------------------------------------- buttons */
.dc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--dc-radius);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dc-btn--ghost {
  border-color: var(--nh-line);
  background: #fff;
  color: var(--nh-ink-soft);
}
.dc-btn--ghost:hover { border-color: var(--nh-teal); color: var(--nh-teal-dark); }
.dc-btn--green {
  width: 100%;
  background: var(--dc-green);
  color: #fff;
}
.dc-btn--green:hover:not(:disabled) { background: var(--dc-green-dark); }
.dc-btn--green:disabled {
  background: #dfe4d2;
  color: #9aa588;
  cursor: not-allowed;
}

.dc-empty {
  padding: 1.4rem 1rem;
  border: 1px dashed var(--nh-line);
  border-radius: 10px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--nh-ink-soft);
}
.dc-empty strong { display: block; margin-bottom: 0.6rem; color: var(--nh-ink); }

/* ------------------------------------------------------------------ modal */
.dc-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.dc-modal[hidden] { display: none; }
.dc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 40, 45, 0.55);
}
.dc-modal__dialog {
  position: relative;
  width: min(680px, 100%);
  max-height: min(88vh, 760px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(20, 30, 40, 0.28);
  overflow: hidden;
}
.dc-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 0.9rem;
  border-bottom: 1px solid var(--nh-line);
}
.dc-modal__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--nh-ink);
}
.dc-modal__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--nh-ink-faint);
}
.dc-modal__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--nh-ink-soft);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.dc-modal__close:hover { background: #f1f4f6; color: var(--nh-ink); }

.dc-modal__body {
  padding: 1rem 1.2rem 1.2rem;
  overflow-y: auto;
}
.dc-modal__select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--nh-line);
  border-radius: 6px;
  background: #fff;
  color: var(--nh-ink);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}
.dc-modal__select:focus {
  outline: none;
  border-color: var(--nh-teal);
  box-shadow: 0 0 0 3px rgba(0, 191, 214, 0.15);
}
.dc-modal__hours {
  margin: 0.9rem 0 0.8rem;
  font-size: 0.82rem;
  color: var(--nh-ink-soft);
  text-align: end;
}
.dc-modal__empty {
  margin: 0.6rem 0 0;
  padding: 1.4rem 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--nh-ink-faint);
}

.dc-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.dc-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--nh-line);
  border-radius: 6px;
  background: #fff;
  color: var(--nh-ink);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.dc-slot:hover:not(:disabled) { border-color: var(--dc-green); }
.dc-slot__box {
  width: 14px;
  height: 14px;
  border: 1px solid #c3ccd2;
  border-radius: 3px;
  flex: 0 0 auto;
}
.dc-slot.is-selected {
  border-color: var(--dc-green);
  background: var(--dc-green-soft);
  color: #3d5200;
  font-weight: 700;
}
.dc-slot.is-selected .dc-slot__box {
  border-color: var(--dc-green);
  background: var(--dc-green);
  box-shadow: inset 0 0 0 2px #fff;
}
.dc-slot:disabled {
  background: #f7f8f9;
  color: #b3bcc2;
  cursor: not-allowed;
  text-decoration: line-through;
}

.dc-modal__foot {
  padding: 0.9rem 1.2rem 1.1rem;
  border-top: 1px solid var(--nh-line);
  background: #fff;
}

/* ------------------------------------------------- in-dialog booking steps */
.dc-step {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--nh-line);
}
.dc-step__hint {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  color: var(--nh-ink-soft);
  text-align: center;
  line-height: 1.8;
}
.dc-input {
  display: block;
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f4f6f7;
  color: var(--nh-ink);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: center;
}
.dc-input::placeholder { color: #a9b3b9; }
.dc-input:focus {
  outline: none;
  border-color: var(--nh-teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 191, 214, 0.15);
}
select.dc-input { cursor: pointer; }

.dc-btn--teal {
  width: 100%;
  background: var(--nh-teal);
  color: #fff;
}
.dc-btn--teal:hover:not(:disabled) { background: var(--nh-teal-dark); }
.dc-btn--teal:disabled { opacity: 0.7; cursor: progress; }

.dc-step__error {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  color: #d64545;
  text-align: center;
}
.dc-step__links {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.7rem;
}
.dc-linkbtn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--nh-blue);
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.dc-linkbtn:hover { color: var(--nh-blue-deep); text-decoration: underline; }
.dc-linkbtn:disabled { color: var(--nh-ink-faint); cursor: default; text-decoration: none; }

.dc-step__note {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.76rem;
  color: var(--nh-ink-faint);
  text-align: center;
  line-height: 1.9;
}
.dc-consent {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
  color: var(--nh-ink-soft);
  cursor: pointer;
}
.dc-consent input { width: 15px; height: 15px; accent-color: var(--dc-green); }

body.dc-locked { overflow: hidden; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 720px) {
  .dc-hero { gap: 0.85rem; }
  .dc-hero__photo { width: 82px; height: 82px; font-size: 1.5rem; }
  .dc-hero__name { font-size: 1.1rem; }
  .dc-hero__line { font-size: 0.8rem; text-align: start; }
  .dc-hero__meta { flex-direction: column; align-items: flex-start; gap: 0.25rem; }

  /* The nearest-slot card drops under the identity block and spans the row. */
  .dc-hero__next {
    flex: 1 1 100%;
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
    border-inline-start: 0;
    border-top: 1px solid var(--nh-line);
    padding: 0.6rem 0 0;
    text-align: start;
  }

  .dc-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dc-modal { padding: 0.6rem; }
  .dc-modal__dialog { max-height: 92vh; }

  .dc-hours__row { flex-wrap: wrap; gap: 0.2rem 0.6rem; }
  .dc-hours__day { min-width: 0; }
  .dc-hours__free { margin-inline-start: auto; }
}

@media (max-width: 420px) {
  .dc-slots { grid-template-columns: 1fr; }
}
