/* Eldritch Clockwork — Breadcrumb
   build: 2025-11-21c
   Unified styling for all pages

   Expected markup:

   <div class="ec-breadcrumb-box">
     <ol class="ec-breadcrumb">
       <li><a href="./">Home</a></li>
       <li class="current">Section</li>
     </ol>

     <!-- optional -->
     <div class="ec-breadcrumb-tools">
       <input class="form-control input-sm" type="search">
       <span class="ec-gamecount">1 / 1</span>
     </div>
   </div>
--------------------------------------------------------------------- */

/* Outer pill: breadcrumb + optional tools (search, count, etc.) */
.ec-breadcrumb-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel-head);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 10px;
  margin: 8px 0 10px;
}

/* Breadcrumb text (no own pill/background) */
.ec-breadcrumb {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: var(--muted);
}

.ec-breadcrumb li {
  display: flex;
  align-items: center;
}

/* Separator between crumbs */
.ec-breadcrumb li::after {
  content: "\203A";   /* Unicode for ›; avoids encoding issues */
  margin: 0 4px;
  color: var(--muted);
  opacity: .7;
}

.ec-breadcrumb li:last-child::after {
  content: "";
}

/* Links + current crumb */
.ec-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.ec-breadcrumb a:hover {
  color: var(--textaccent2);
  text-decoration: none;
}

.ec-breadcrumb .current {
  color: var(--text);
  font-weight: 600;
}

/* Right-side tools (Games, Forum, Files, etc.) */
.ec-breadcrumb-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stop Bootstrap form-control from going full-width here */
.ec-breadcrumb-tools .form-control,
.ec-breadcrumb-tools input[type="search"] {
  width: auto !important;
  min-width: 220px;
  max-width: 46vw;
  background: #1f2429;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  height: 26px;
  padding: 2px 8px;
  font-size: 13px;
  line-height: 1.2;
}

/* Counts (used by games/forum/files) */
.ec-gamecount,
.ec-filecount,
.ec-forumcount {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}

/* Responsive: stack tools under breadcrumb inside the same pill */
@media (max-width: 640px) {
  .ec-breadcrumb-box {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .ec-breadcrumb-tools {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
    justify-content: space-between;
  }

  .ec-breadcrumb-tools .form-control,
  .ec-breadcrumb-tools input[type="search"] {
    flex: 1 1 160px;
    min-width: 140px;
  }
}

.ec-breadcrumb-box {
  display: flex;
  align-items: center;
  gap: 12px;

  background: var(--panel-head);
  border: 1px solid var(--line);
  border-radius: 12px;

  /* THE CRITICAL VALUES: (Matches Games EXACTLY) */
  padding: 4px 10px;
  min-height: 38px;        /* <- forces consistent pill height */
  line-height: 1.2;

  margin: 8px 0 12px;      /* uniform spacing above/below */
}
