/* Quran recitation pages. Only what style.css does not already provide for the design's blocks. */

/* ---------- Student area navigation ---------- */
.rec-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}

.rec-nav a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .95rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.rec-nav a:hover {
  border-color: #1f8a4c;
  color: #1f8a4c;
}

.rec-nav a.active {
  background: #1f8a4c;
  border-color: #1f8a4c;
  color: #fff;
}

.rec-nav .rec-nav-teaching {
  border-color: #1f8a4c;
  color: #1f8a4c;
}

/* ---------- "You also teach with us" banner ---------- */
.rec-teaching-banner {
  background: linear-gradient(135deg, #1f8a4c, #56c596);
  color: #fff;
}

.rec-teaching-banner .btn-light {
  color: #1f8a4c;
}

/* ---------- KPI tiles ---------- */
.rec-kpi i {
  line-height: 1;
}

/* Text a person typed, kept on the lines they typed it on. */
.rec-pre {
  white-space: pre-wrap;
}

/* ---------- Monthly activity chart (plain CSS bars) ---------- */
.rec-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  height: 200px;
}

.rec-chart-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.rec-chart-value {
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: .25rem;
}

.rec-chart-bar {
  width: 100%;
  max-width: 28px;
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  background: #1f8a4c;
  transition: height .3s ease;
}

.rec-chart-bar.is-empty {
  background: var(--bs-border-color, #dee2e6);
}

.rec-chart-label {
  margin-top: .4rem;
  font-size: .75rem;
}

/* ---------- Overall score ring ---------- */
.rec-score-ring {
  --rec-score: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, var(--bs-body-bg, #fff) 82%, transparent 83% 100%),
    conic-gradient(#1f8a4c calc(var(--rec-score) * 1%), rgba(31, 138, 76, .15) 0);
}

.rec-score-ring--sm {
  width: 44px;
  height: 44px;
  background:
    radial-gradient(closest-side, var(--bs-body-bg, #fff) 72%, transparent 73% 100%),
    conic-gradient(#1f8a4c calc(var(--rec-score) * 1%), rgba(31, 138, 76, .15) 0);
}

/* ---------- Progress analytics (session summary) ---------- */
.rec-mini-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem;
  height: 130px;
}

.rec-mini-chart-col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
}

.rec-mini-chart-bar {
  width: 100%;
  max-width: 14px;
  min-height: 3px;
  border-radius: 6px 6px 0 0;
  background: #1f8a4c;
}

.rec-mini-chart-bar.is-empty {
  background: var(--bs-border-color, #dee2e6);
}

.rec-mini-chart-col small {
  margin-top: .35rem;
  font-size: .75rem;
}

/* ---------- Booking: the steps above the panel, and the confirmation summary ---------- */
.qr-book-steps {
  margin: 0;
}

.qr-book-step {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--bs-secondary-color, #6c757d);
}

.qr-book-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: .75rem;
}

.qr-book-step.is-current {
  color: #1f8a4c;
  font-weight: 600;
}

.qr-book-step.is-current span {
  background: #1f8a4c;
  border-color: #1f8a4c;
  color: #fff;
}

.qr-book-step-divider {
  flex: 1 1 auto;
  height: 1px;
  background: var(--bs-border-color, #dee2e6);
}

/* ---------- Booking: the month calendar ----------
   The rows carry the grid's row semantics for a screen reader while display:contents lets the day
   cells stay children of the seven-column grid, so the layout is unaffected by the extra elements. */
.qr-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-bottom: .5rem;
}

.qr-cal-month {
  font-weight: 600;
  font-size: .9rem;
}

.qr-cal-nav {
  background: transparent;
  border: 1px solid var(--bs-border-color, #e5e7eb);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  cursor: pointer;
}

.qr-cal-nav:hover:not(:disabled) {
  border-color: #1f8a4c;
  color: #1f8a4c;
}

.qr-cal-nav:disabled {
  opacity: .4;
  cursor: default;
}

.qr-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.qr-cal-row {
  display: contents;
}

.qr-cal-dow {
  text-align: center;
  font-size: .7rem;
  font-weight: 600;
  color: var(--bs-secondary-color, #9ca3af);
  padding: .25rem 0;
}

.qr-cal-day {
  min-height: 38px;
  padding: .4rem .25rem;
  text-align: center;
  font-size: .8rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--bs-secondary-color, #9ca3af);
  cursor: default;
}

.qr-cal-day.available {
  background: #f0faf5;
  color: #1f7a63;
  font-weight: 600;
  cursor: pointer;
}

.qr-cal-day.available::after {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #22c55e;
  margin: 2px auto 0;
}

.qr-cal-day.available:hover {
  border-color: #1f7a63;
}

.qr-cal-day.today {
  border-color: #1f7a63;
  font-weight: 700;
}

.qr-cal-day.selected {
  background: linear-gradient(135deg, #1f8a4c, #2eb872);
  color: #fff;
  font-weight: 700;
  border-color: transparent;
}

.qr-cal-day.selected::after {
  background: rgba(255, 255, 255, .7);
}

.qr-cal-day:focus-visible {
  outline: 2px solid #1f8a4c;
  outline-offset: 2px;
}

.qr-cal-key {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: .35rem;
}

body.dark .qr-cal-day {
  color: #6b7280;
}

body.dark .qr-cal-day.available {
  background: rgba(31, 138, 76, .12);
  color: #2eb872;
}

body.dark .qr-cal-day.selected {
  color: #fff;
}

body.dark .qr-cal-nav {
  border-color: #2c3136;
  color: #9ca3af;
}

body.dark .qr-cal-dow {
  color: #6b7280;
}

@media (max-width: 400px) {
  .qr-cal-day {
    min-height: 34px;
    font-size: .75rem;
    padding: .3rem .1rem;
  }
}

/* ---------- Score bars ---------- */
.rec-score-row + .rec-score-row {
  margin-top: 1rem;
}

.rec-score-row .progress {
  height: 8px;
}

/* ---------- Star picker ---------- */
.rec-star-picker {
  display: inline-flex;
  gap: .15rem;
}

.rec-star-picker button {
  border: 0;
  background: transparent;
  padding: 0 .1rem;
  font-size: 2rem;
  line-height: 1;
  color: #d0d5dd;
  cursor: pointer;
  transition: color .1s ease, transform .1s ease;
}

.rec-star-picker button.is-on {
  color: #f5a623;
}

.rec-star-picker button:hover {
  transform: scale(1.12);
}

.rec-star-picker button:focus-visible {
  outline: 2px solid #1f8a4c;
  outline-offset: 2px;
  border-radius: 4px;
}

.rec-star-caption {
  display: block;
  min-height: 1.25rem;
  margin-top: .15rem;
}

/* ---------- Reschedule panel ---------- */
.rec-reschedule .qr-chip {
  cursor: pointer;
}

.rec-slot-list {
  max-height: 220px;
  overflow-y: auto;
}

/* ---------- Today's schedule ---------- */
.rec-today-item {
  border-left: 3px solid #1f8a4c;
  padding-left: .75rem;
}

.rec-today-item + .rec-today-item {
  margin-top: .9rem;
}

/* ---------- Quick actions ---------- */
.rec-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  height: 100%;
  padding: .9rem .5rem;
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: .9rem;
  font-size: .8125rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.rec-quick-action i {
  font-size: 1.35rem;
  color: #1f8a4c;
}

.rec-quick-action:hover {
  border-color: #1f8a4c;
  color: #1f8a4c;
  transform: translateY(-2px);
}

/* ---------- Teacher profile ---------- */
.rec-rating-bars .qr-rating-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: .35rem;
}

.rec-rating-bars .rec-rating-count {
  width: 2rem;
  text-align: right;
}

/* ---------- Print: "Download feedback" ---------- */
.rec-print-only {
  display: none;
}

@media print {
  @page {
    margin: 12mm;
  }

  header,
  footer,
  nav,
  .ip-navbar,
  .navbar,
  .offcanvas,
  .islamicBread,
  .rec-nav,
  .rec-teaching-banner,
  .rec-no-print,
  .rec-star-picker,
  .search-overlay,
  .back-to-top,
  .btn {
    display: none !important;
  }

  .rec-print-only {
    display: block;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  /* The sheet is one page of feedback, so the page's own spacing is pulled in tight. */
  .rec-print-area {
    padding: 0 !important;
  }

  .rec-print-area .p-4,
  .rec-print-area .p-md-5,
  .rec-print-area .p-5 {
    padding: .6rem !important;
  }

  .rec-print-area .mb-4,
  .rec-print-area .py-5 {
    margin-bottom: .6rem !important;
  }

  .rec-print-area h1 {
    font-size: 16pt;
  }

  .rec-print-area h2,
  .rec-print-area .fs-5 {
    font-size: 12pt;
  }

  .rec-print-area .col-lg-8,
  .rec-print-area .col-lg-4,
  .rec-print-area .col-lg-7,
  .rec-print-area .col-lg-5 {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .rec-print-area .shadow-sm {
    box-shadow: none !important;
  }

  .rec-print-area .bg-white-ip {
    background: #fff !important;
    color: #000 !important;
    break-inside: avoid;
  }

  .rec-print-area .text-body-theme,
  .rec-print-area .theme-text-base {
    color: #222 !important;
  }

  .progress,
  .progress-bar {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
