/* Tono 4.9.0 | Single-course path + modest diagonal FREE ribbons.
   Scoped to our own components so Elementor custom widget styles survive. */

/* Sequence runs right -> left in RTL: each chevron points towards the next level. */
.tono-course-single .tono-course-learning-path {
  padding: 13px 16px 14px;
  margin: 10px 0 18px;
  border: 1px solid #f0e5db;
  border-radius: 16px;
  background: #fffdfb;
  box-shadow: 0 4px 15px rgb(54 36 23 / 3%);
}
.tono-course-single .tono-course-learning-path-head { gap: 8px; margin-bottom: 9px; }
.tono-course-single .tono-course-path-eyebrow { font-size: 10px; line-height: 1.4; font-weight: 700; margin-bottom: 1px; }
.tono-course-single .tono-course-learning-path-head h2 {
  font-size: clamp(14px, 1.4vw, 17px); line-height: 1.65; font-weight: 800;
}
.tono-course-single .tono-course-path-current-badge {
  font-size: 11px; padding: 4px 10px; line-height: 1.6; font-weight: 800;
}
.tono-course-single .tono-course-path-prerequisite,
.tono-course-single .tono-course-path-intro {
  margin: 0 0 9px; padding: 7px 9px; font-size: 11px; line-height: 1.8;
}
.tono-course-single .tono-course-path-prerequisite { border-radius: 9px; }
.tono-course-single .tono-course-path-scroll {
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  padding: 4px 2px 8px; scrollbar-width: thin; scrollbar-color: #e5b18c transparent;
  -webkit-overflow-scrolling: touch; direction: rtl;
}
.tono-course-single .tono-course-path-scroll:focus-visible { outline: 2px solid #dc640e; outline-offset: 2px; border-radius: 5px; }
.tono-course-single .tono-course-path-list {
  display: flex; flex-wrap: nowrap; align-items: stretch; gap: 4px;
  width: max-content; min-width: 100%; list-style: none; padding: 0; margin: 0;
  direction: rtl;
}
.tono-course-single .tono-course-path-step {
  position: relative; display: block; width: auto; max-width: none; flex: 0 0 auto;
  min-width: 118px; margin: 0;
}
.tono-course-single .tono-course-path-step > a {
  position: relative; display: flex; align-items: center; gap: 7px;
  width: 100%; min-width: 0; min-height: 45px;
  box-sizing: border-box; padding: 7px 15px 7px 23px;
  clip-path: polygon(100% 0, 13px 0, 0 50%, 13px 100%, 100% 100%, calc(100% - 13px) 50%);
  border: 0; border-radius: 0;
  background: #f0f2f5; color: #334257;
  text-decoration: none; transition: background-color .18s ease, color .18s ease;
}
.tono-course-single .tono-course-path-step > a:hover { background: #ffe4cf; color: #873900; }
.tono-course-single .tono-course-path-step > a:focus-visible { outline: 0; background: #fbd4b4; text-decoration: underline; }
.tono-course-single .tono-course-path-step.is-current > a {
  background: var(--azp-primary, #e76004); color: #fff;
}
.tono-course-single .tono-course-path-step.is-current > a:hover { background: #c95305; color: #fff; }
.tono-course-single .tono-course-path-number {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 25px; height: 25px; border-radius: 7px;
  background: #fff; color: #ae510e;
  font-family: 'Vazirmatn', 'Azp Shabnam', Tahoma, sans-serif;
  font-size: 11px; font-weight: 850; line-height: 1;
}
.tono-course-single .tono-course-path-step.is-current .tono-course-path-number { background: rgb(255 255 255 / 20%); color: #fff; }
.tono-course-single .tono-course-path-name {
  font-size: 11px; font-weight: 750; line-height: 1.6;
  max-width: 154px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tono-course-single .tono-course-path-more { margin: 8px 0 0; font-size: 11px; }

/* Dark courses must remain dark; path links have their own contrast. */
.tono-course-single.tono-course-theme--dark .tono-course-learning-path {
  background: #172335; border-color: #344359; box-shadow: none;
}
.tono-course-single.tono-course-theme--dark .tono-course-path-step > a { background: #304158; color: #f1f5fb; }
.tono-course-single.tono-course-theme--dark .tono-course-path-step > a:hover { background: #59432f; color: #fff; }
.tono-course-single.tono-course-theme--dark .tono-course-path-step.is-current > a { background: #d76513; color: #fff; }
.tono-course-single.tono-course-theme--dark .tono-course-path-number { background: #f4e9df; color: #7b3508; }
.tono-course-single.tono-course-theme--dark .tono-course-path-step.is-current .tono-course-path-number { background: rgb(255 255 255 / 21%); color: #fff; }

/* Short, thin corner ribbon. It belongs to the image link, not whole card,
   so the rounded thumbnail clips the far ends of the strip. */
.tono-course-card-media,
.tono-free-cover { position: relative; overflow: hidden; }
.tono-course-free-ribbon {
  position: absolute; z-index: 3;
  top: 13px; left: -25px; right: auto;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box; width: 100px; height: 23px;
  padding: 0 8px; transform: rotate(-45deg); transform-origin: center;
  background: var(--azp-primary, #e76004); color: #fff !important;
  font-family: 'Vazirmatn', 'Azp Shabnam', Tahoma, sans-serif;
  font-size: 11px; font-weight: 850; line-height: 1;
  letter-spacing: 0; text-align: center;
  box-shadow: 0 2px 7px rgb(65 35 18 / 18%); pointer-events: none;
  user-select: none; white-space: nowrap;
}
.tono-free-course-card { position: relative; }
.tono-free-cover .tono-course-free-ribbon { background: var(--tono-free-accent, #e76004); }
/* The level label stays in the opposite corner, unobstructed by the ribbon. */
.tono-free-course-card > .tono-free-course-stage { z-index: 3; }
@media (max-width: 680px) {
  .tono-course-single .tono-course-learning-path { padding: 11px; border-radius: 14px; margin: 8px 0 14px; }
  .tono-course-single .tono-course-path-list { flex-direction: row; width: max-content; min-width: 100%; gap: 4px; }
  .tono-course-single .tono-course-path-step { width: auto; min-width: 115px; }
  .tono-course-single .tono-course-path-step > a { width: 100%; min-height: 44px; }
  .tono-course-single .tono-course-path-name { max-width: 138px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tono-course-single .tono-course-learning-path-head { align-items: center; }
  .tono-course-free-ribbon { width: 95px; height: 22px; top: 12px; left: -25px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .tono-course-single .tono-course-path-step > a { transition: none; }
}
