/* ===== Trainee Funnel Admin — supplementary styles ===== */

/* Admin mega menu: triggers flow in normal flex order (after navbar-menu, before navbar-guest)
   instead of the jobboard's absolute-centered pattern, to avoid overlap with public nav links.
   When admin is logged in, public .navbar-menu is hidden (only mega triggers shown). */
@media (min-width: 768px) {
    .nav-mega { position: relative; margin-left: auto; }
    .nav-mega-triggers {
        display: flex !important;
        position: static !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
    }
}

/* Badge color variants used by the admin dashboard status column.
   (Base .badge is defined in main.css; these only add background/color.) */
.badge-blue    { background:#dbeafe; color:#1e40af; }
.badge-green   { background:#d1fae5; color:#065f46; }
.badge-purple  { background:#ede9fe; color:#5b21b6; }
.badge-gray    { background:#f3f4f6; color:#374151; }
.badge-emerald { background:#d1fae5; color:#065f46; }

/* Stat-card icon accents for funnel-step colors. (.stat-icon base in main.css.) */
.stat-icon--purple  { background:#ede9fe; color:#5b21b6; }
.stat-icon--emerald { background:#d1fae5; color:#065f46; }
.stat-icon--blue    { background:#dbeafe; color:#1e40af; }

.leads-filter { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 16px; }

/* Tabs for settings page */
.tabs { margin: 24px 0; }
.tabs--spaced .tabs__content { margin-top: 16px; }
.tabs__nav { display: flex; gap: 4px; border-bottom: 1px solid var(--brand-powder); margin-bottom: 0; }
.tabs__tab { padding: 12px 20px; background: none; border: none; cursor: pointer; font-size: 15px; font-weight: 600; border-radius: 6px 6px 0 0; color: #6b7280; border-bottom: 3px solid transparent; }
.tabs__tab:hover { color: var(--brand-royal); }
.tabs__tab--active { color: var(--brand-royal); border-color: var(--brand-royal); }
.tabs__panel { display: none; }
.tabs__panel--active { display: block; }

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  border-radius: 24px;
  background: #cbd5e1;
  transition: background 0.2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--brand-royal);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

/* Form controls */
.form-control {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  color: #161616;
  background: #fff;
  border: 1px solid var(--brand-powder);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand-royal);
  box-shadow: 0 0 0 3px var(--brand-ice);
}
.form-control-sm {
  padding: 4px 8px;
  font-size: 13px;
}
.form-control-sm[type="checkbox"],
.form-control.form-check-input,
.toggle-switch input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}
.input-readonly {
  background: #f9fafb;
  color: #6b7280;
}

/* Table cells with inputs */
.data-table td { padding: 8px 12px; vertical-align: middle; }

/* Breadcrumb sits on its own line above the page title (.page-header .container is flex). */
.page-header nav[aria-label="Breadcrumb"] { flex: 0 0 100%; margin-bottom: 8px; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.pagination-prev, .pagination-next { padding: 8px 16px; border: 1px solid var(--brand-powder); border-radius: 6px; background: #fff; color: var(--brand-royal); font-size: 14px; }
.pagination-prev:hover, .pagination-next:hover { background: var(--brand-ice); }
.pagination-current { padding: 8px 14px; background: var(--brand-royal); color: #fff; border-radius: 6px; font-size: 14px; font-weight: 600; }
.pagination-page { padding: 8px 14px; border: 1px solid var(--brand-powder); border-radius: 6px; background: #fff; color: #374151; font-size: 14px; }
.pagination-page:hover { background: var(--brand-ice); border-color: var(--brand-royal); color: var(--brand-royal); }
.pagination-dots { padding: 8px 4px; color: #6b7280; font-size: 14px; }
.pagination-info { font-size: 12px; color: #6b7280; text-align: center; margin-top: 10px; }

/* Filter modals */
.filter-options { display: flex; flex-direction: column; gap: 8px; }
.filter-options .category-tag { width: 100%; text-align: center; }

/* Search suggestions — scoped to enroll page input */
#leadSearchInput { position: relative; }
#leadSearchSuggestions {
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Record navigation (prev/next/pagination position) on detail pages */
.record-nav {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px 16px;
    padding: 12px 16px; margin-bottom: 0;
    background: #f8fafc; border: 1px solid var(--brand-powder); border-radius: 8px;
}
.record-nav__info { flex: 0 0 auto; }
.record-nav__position { font-size: 13px; font-weight: 600; color: #374151; }
.record-nav__controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.record-nav__btn { font-size: 13px; padding: 6px 14px; }
.record-nav__btn--disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.record-nav-wrapper { margin-bottom: 16px; }

/* Newsletter recipient source selector — pill toggle group */
.form-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 8px;
}
.form-radio-group .radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: #fff;
    border: 1px solid var(--brand-powder, #e5e7eb);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.form-radio-group .radio-label input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.form-radio-group .radio-label .radio-check {
    display: none;
    color: currentColor;
}
.form-radio-group .radio-label:hover {
    border-color: var(--brand, #3b82f6);
    background: var(--brand-ice, #f9fafb);
    color: var(--brand-royal, #2563eb);
}
.form-radio-group .radio-label:has(input:checked) {
    background: var(--brand-royal, #2563eb);
    border-color: var(--brand-royal, #2563eb);
    color: #fff;
}
.form-radio-group .radio-label:has(input:checked) .radio-check {
    display: inline-flex;
}

/* Board pills — domain selection UI for blog post form */
.board-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
fieldset.form-group { border: none; padding: 0; margin: 0; }
.board-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px; border: 1px solid var(--brand-powder, #e5e7eb);
    border-radius: 20px; background: #fff; cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.board-pill:hover { background: var(--brand-ice, #f9fafb); border-color: var(--brand-royal, #3b82f6); }
.board-pill input[type="checkbox"] { margin: 0; width: 14px; height: 14px; cursor: pointer; }
.board-pill input[type="checkbox"]:checked + .board-pill__label { color: var(--brand-royal, #3b82f6); font-weight: 600; }
.board-pill--selected { border-color: var(--brand-royal, #3b82f6); background: var(--brand-ice, #f9fafb); }
.board-pill__label { font-size: 12px; font-weight: 500; color: #374151; white-space: nowrap; }
.board-pill__url { font-size: 10px; color: #6b7280; opacity: 0.7; }
.board-pill__tag { font-size: 10px; padding: 2px 6px; }

/* Token display with copy button */
.token-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    background: var(--brand-ice, #f9fafb);
    border: 1px solid var(--brand-powder, #e5e7eb);
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 180px;
}
.token-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.copy-token {
    flex-shrink: 0;
}
