/* Hidden by default */

.topic-status {
  background: #d07faea8;
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tile-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.topic-icon {
  width: 18px;
  height: 18px;
  cursor: pointer;
  opacity: 0.85;
}

.topic-icon:hover {
  opacity: 1;
  transform: scale(1.1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* per-icon background-images */
.icon-share {
  background: url("/static/assets/share-icon.svg") center center no-repeat;
}
.icon-edit {
  background: url("/static/assets/edit-icon.svg") center center no-repeat;
}
.icon-delete {
  background: url("/static/assets/delete-icon.svg") center center no-repeat;
}

#topicGrid .tile-content {
  flex-grow: 1;
  flex-shrink: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 6px;
  overflow: hidden;
}

.teacher-footer-bar {
  position: relative;
  display: flex;
  margin-top: 20px;
  margin-left: 5px;
  margin-right: 5px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 7px;
  z-index: 1;
  pointer-events: auto;
}

.level-badge {
  background: #d07faea8;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 14px;
  text-transform: uppercase;
  white-space: nowrap; /* ✅ Prevent breaking to new line */
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-right: 5px;
  margin-top: 1px;
}

.level-badges {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap; /* ✅ Prevent wrapping */
}

#teacherModalFooter .topic-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s ease;
}

#teacherModalFooter .topic-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ensure your modal backdrop/content styles handle this new modal */
#shareModal .modal-content {
  max-width: 320px;
  text-align: center;
  min-width: 320px;
}

#shareLinkInput {
  width: 100%;
  padding: 0.5em;
  margin: 0.5em 0;
  font-size: 0.9em;
}

#closeShareModal {
  /* Example styles: */
  position: absolute;
  top: 10px;
  right: 10px;
}

/* ─── EMPTY‐STATE (“no topics”) PANEL ───────────────────────────────────────── */

.no-topics-message {
  text-align: center;
  padding: 1rem 1rem;
  background: var(--bg-panel, #fff);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin: 1rem auto;
  max-width: 600px;
}

.no-topics-message h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-headline, #a44a76);
}

.no-topics-message p {
  color: var(--text-muted, #a44a76);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.no-topics-image {
  width: 240px;
  margin-bottom: 1.5rem;
}

#batchHint {
  margin-top: 15px;
}

#shareLinkInput {
  margin-bottom: 0px;
}

/* 1) The container of all toggles: flex & wrap */
.phrase-toggles {
  display: flex;
  flex-wrap: wrap; /* allow wrapping */
  gap: 24px 32px; /* row-gap 24px, column-gap 32px */
  margin: 10px 0;
  justify-content: flex-start; /* align left; change to center if you like */
}

/* 2) Each switch+label pair is one flex-item */
.switch {
  display: flex;
  align-items: center;
  gap: 8px; /* space between slider and label */
  flex-shrink: 0; /* never shrink below its content */
}

/* 3) Hide the native checkbox */
.switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

/* 4) The track */
.switch .slider {
  position: relative;
  width: 40px;
  height: 22px;
  background-color: #ccc;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

/* 5) The knob */
.switch .slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px; /* (22 - 16) / 2 = 3px centering */
  left: 3px; /* inset on left */
  background-color: white;
  border-radius: 50%;
  transition: left 0.3s;
}

/* 6) Checked state */
.switch input:checked + .slider {
  background-color: #d07fae;
}
.switch input:checked + .slider::before {
  left: calc(100% - 3px - 16px); /* track-width - inset - knob-size */
}

/* 7) The label */
.toggle-label {
  font-size: 13px;
  line-height: 1.2;
  user-select: none;
  white-space: normal;
  max-width: 150px; /* wrap text at a sensible width */
  word-wrap: break-word;
  margin: 0;
  color: #444;
}

/* — Nav bar under the title — */
#main-nav {
  text-align: center;
  margin-bottom: 10px;
}
#main-nav ul {
  display: inline-flex;
  list-style: none;
  padding: 0;
  margin: 0px;
}

#main-nav li {
  position: relative;
  padding: 8px 12px;
  border-radius: 12px;
  background-color: rgba(212, 127, 174, 0); /* same pink, 0% opaque */
  color: #888;
  cursor: pointer;
  user-select: none;

  /* animate only the channels you care about */
  transition: background-color 0.3s ease, color 0.3s ease;
}

#main-nav li:hover {
  background: rgba(212, 127, 174, 0.12);
  color: #a44a76;
}

#main-nav li:hover::after {
  content: "";
  position: absolute;
  bottom: -6px; /* sit just under the pill */
  left: 5px;
  right: 5px;
  height: 4px;
  background: #bfbfbf; /* light gray highlight */
  border-radius: 3px 3px 0 0;
}

#main-nav li.active {
  position: relative;
  /* keep your full rounding */
  border-radius: 12px;
  color: #a44a76;
}

/* 1) Base: no delay ever */
#main-nav li::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 5px;
  right: 5px;
  height: 4px;
  border-radius: 3px 3px 0 0;
  background: #bfbfbf; /* hover color */
  opacity: 0; /* hidden by default */
  transition: opacity 0.3s ease,
    /* fade in/out over 200ms */ background 0.3s ease; /* bg‐color changes in 200ms too */
}

/* 2) Hover: show it immediately (or with just a tiny 50ms delay) */
#main-nav li:hover::after {
  opacity: 1;
}

/* 3) Active: always visible, no delay, and its own color */
#main-nav li.active::after {
  opacity: 1;
  background: #a44a76; /* active color */
  transition-delay: 0s; /* override any lingering delays */
}

.tooltip-hist {
  opacity: 0.5;
}
