/* The Courses list's preview on a tutor profile (site/profileCourseView.js). */

.course-section-count {
  margin-inline-start: -6px;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .course-section-count {
    margin-inline-start: -2px;
  }
}

/* Preview: only what is kept, the chosen subjects first, a set height. */
#tutorCourses.course-preview,
#tutorCourses.course-preview .hierarchy-children {
  display: flex;
  flex-direction: column;
}

#tutorCourses.course-preview > *,
#tutorCourses.course-preview .hierarchy-children > * {
  min-width: 0;
}

#tutorCourses.course-preview .course-preview-first {
  order: -1;
}

#tutorCourses.course-preview .course-preview-top {
  order: -2;
}

#tutorCourses.course-preview.is-capped:not(.is-searching) {
  max-height: calc(var(--course-preview-lines, 10) * 2.6rem);
  overflow: hidden;
}

#tutorCourses.course-preview.is-capped.is-cut:not(.is-searching) {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 4.5rem), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 4.5rem), transparent);
}

/* "See more": a big round arrow sitting on the faded edge of the list. */
.course-see-more {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  margin-top: -30px;
  padding-bottom: 2px;
}

.course-see-more[hidden],
#tutorCourses[hidden] + .course-see-more {
  display: none;
}

.course-see-more__btn {
  appearance: none;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 4px 12px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.course-see-more__circle {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid rgba(var(--accent-rgb), 0.55);
  color: var(--accent);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), 0 0 0 6px rgba(var(--accent-rgb), 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.course-see-more__circle svg {
  transition: transform 0.18s ease;
}

.course-see-more__label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.course-see-more__btn:hover .course-see-more__circle,
.course-see-more__btn:focus-visible .course-see-more__circle {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(var(--accent-rgb), 0.35), 0 0 0 7px rgba(var(--accent-rgb), 0.14);
}

.course-see-more__btn:hover .course-see-more__circle svg,
.course-see-more__btn:focus-visible .course-see-more__circle svg {
  transform: translateY(2px);
}

.course-see-more__btn:focus-visible {
  outline: none;
}

.course-see-more__btn:focus-visible .course-see-more__label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .course-see-more__circle,
  .course-see-more__circle svg {
    transition: none;
  }
  .course-see-more__btn:hover .course-see-more__circle,
  .course-see-more__btn:hover .course-see-more__circle svg {
    transform: none;
  }
}

/* The viewer's own courses, and the one they searched. */
#tutorCourses .profile-form__chip-list .course-chip--yours {
  border-color: rgba(var(--accent-rgb), 0.75);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.18);
}

#tutorCourses .profile-form__chip-list .course-chip--searched {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.28);
}

/* Thesis support tab (tutors.js renderCommunicationSupport). */
.thesis-support-intro {
  margin: 0 0 0.75rem;
}

.thesis-support-group + .thesis-support-group {
  margin-top: 0.75rem;
}

.thesis-support-group__title {
  margin: 0 0 0.375rem;
  font-size: 1rem;
}

.thesis-support-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  min-width: 0;
}

.thesis-support-chips .dt-chip {
  display: inline-block;
  max-width: 100%;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2, var(--surface));
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/* The profile's category tabs: a longer name ("Soutien à la thèse") wraps
   to a second line instead of being cut at both ends. */
[data-page-tabs] .page-tab {
  white-space: normal;
  text-overflow: clip;
  line-height: 1.2;
  text-align: center;
}

.thesis-support-editor__area {
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.thesis-support-editor__area-label {
  font-weight: 600;
}

.thesis-support-editor__skills {
  margin-top: 0.375rem;
  padding-left: 1.5rem;
}

.thesis-support-editor__skills[hidden] {
  display: none;
}
