/**
 * TransTeam — WorkScout-style dashboard sidebar
 */

.tt-am-side {
  background: var(--tt-am-white, #fff);
  border-radius: 14px;
  border: 1px solid rgba(15, 76, 129, 0.1);
  box-shadow: 0 4px 24px rgba(15, 76, 129, 0.06);
  padding: 1rem 0;
  font-family: var(--tt-am-font, "DM Sans", system-ui, sans-serif);
  min-width: 260px;
}

.tt-am-side__section + .tt-am-side__section {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(15, 76, 129, 0.06);
}

.tt-am-side__heading {
  margin: 0;
  padding: 0.5rem 1.25rem 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tt-am-success, #00a651);
}

.tt-am-side__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tt-am-side__item {
  margin: 0;
  padding: 0;
}

/* Top-level links */
.tt-am-side__link--top,
.tt-am-side__toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: #4a5568;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tt-am-side__link--top:hover,
.tt-am-side__toggle:hover {
  background: rgba(15, 76, 129, 0.04);
  color: var(--tt-am-primary, #0f4c81);
}

.tt-am-side__item.is-active > .tt-am-side__link--top,
.tt-am-side__sub-item.is-active > .tt-am-side__link {
  background: rgba(0, 166, 81, 0.1);
  color: var(--tt-am-success, #00a651);
  font-weight: 600;
}

.tt-am-side__item.is-active > .tt-am-side__link--top .tt-am-side__icon,
.tt-am-side__item.is-active > .tt-am-side__link--top .tt-am-side__icon svg {
  color: var(--tt-am-success, #00a651);
}

.tt-am-side__icon {
  display: flex;
  width: 20px;
  flex-shrink: 0;
  color: #9aa3b2;
}

.tt-am-side__item.is-active .tt-am-side__icon {
  color: var(--tt-am-success, #00a651);
}

.tt-am-side__label {
  flex: 1;
}

.tt-am-side__badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--tt-am-success, #00a651);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  border-radius: 99px;
}

.tt-am-side__badge--empty {
  display: none !important;
}

.tt-am-side__arrow {
  display: flex;
  color: #9aa3b2;
  transition: transform 0.25s ease;
}

.tt-am-side__item.is-open > .tt-am-side__toggle .tt-am-side__arrow {
  transform: rotate(180deg);
}

/* Submenu */
.tt-am-side__sub {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  background: rgba(15, 76, 129, 0.02);
}

.tt-am-side__sub[hidden] {
  display: none;
}

.tt-am-side__sub-item .tt-am-side__link {
  display: block;
  padding: 0.5rem 1.25rem 0.5rem 3.25rem;
  font-size: 0.875rem;
  color: #5a6478;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.tt-am-side__sub-item .tt-am-side__link:hover {
  background: rgba(15, 76, 129, 0.04);
  color: var(--tt-am-primary, #0f4c81);
}

.tt-am-side__item--logout .tt-am-side__link--top {
  color: #6b7280;
}

.tt-am-side__item--logout .tt-am-side__link--top:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.06);
}

/* Hide default WorkScout dashboard nav when ours is active */
body.tt-am-dashboard .dashboard-sidebar > nav:not([data-tt-am-sidebar]),
body.tt-am-dashboard .dashboard-sidebar .dashboard-nav,
body.tt-am-dashboard #dashboard-menu,
body.tt-am-dashboard .user-menu-sidebar {
  display: none !important;
}

body.tt-am-dashboard .dashboard-sidebar {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

@media (max-width: 991px) {
  .tt-am-side {
    min-width: 0;
    margin-bottom: 1.5rem;
  }
}
