/* Breadcrumb Tool Switcher Styles */

/* ===== CSS Variables ===== */
:root {
  --breadcrumb-height: 2.5rem;
  --breadcrumb-bg: transparent;
  --breadcrumb-separator-color: var(--text-muted, #6b7280);
  --breadcrumb-hover-bg: var(--bg-card, rgba(255, 255, 255, 0.05));

  /* Badge colors */
  --badge-free-bg: #10b981;
  --badge-free-color: white;
}

/* ===== Main Container ===== */
.breadcrumb-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--breadcrumb-height);
  font-size: 0.9375rem;
}

/* ===== Home Link (HSA Advantage) ===== */
.breadcrumb-home {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary, #fff);
  text-decoration: none;
  font-weight: 600;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}

.breadcrumb-home:hover {
  background: var(--breadcrumb-hover-bg);
  color: var(--accent-primary, #22c55e);
}

.breadcrumb-icon {
  font-size: 1.125rem;
}

/* ===== Separator ===== */
.breadcrumb-separator {
  color: var(--breadcrumb-separator-color);
  font-weight: 300;
  user-select: none;
}

/* ===== Dropdown Container ===== */
.breadcrumb-dropdown {
  position: relative;
}

/* ===== Current Tool Button ===== */
.breadcrumb-current {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.625rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-primary, #fff);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.breadcrumb-current:hover,
.breadcrumb-current:focus {
  background: var(--breadcrumb-hover-bg);
  border-color: var(--border-color, rgba(255, 255, 255, 0.1));
  outline: none;
}

.breadcrumb-current[aria-expanded="true"] {
  background: var(--breadcrumb-hover-bg);
  border-color: var(--border-color, rgba(255, 255, 255, 0.1));
}

.breadcrumb-current[aria-expanded="true"] .breadcrumb-chevron {
  transform: rotate(180deg);
}

.breadcrumb-chevron {
  transition: transform 0.2s;
  opacity: 0.7;
}

/* ===== Dropdown Menu ===== */
.breadcrumb-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 220px;
  background: var(--bg-card, #1f1f1f);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  padding: 0.375rem;
  margin: 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.breadcrumb-dropdown.open .breadcrumb-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ===== Menu Items ===== */
/* Reset Pico CSS defaults */
.breadcrumb-menu li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.breadcrumb-menu li + li {
  margin-top: 0.125rem !important;
}

.breadcrumb-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  margin: 0 !important;
  color: var(--text-primary, #fff);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.15s;
  line-height: 1.4;
}

.breadcrumb-menu a:hover {
  background: var(--bg-card-hover, rgba(255, 255, 255, 0.05));
}

.breadcrumb-menu a.active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-primary, #22c55e);
}

/* Menu item parts */
.menu-icon {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}

.menu-text {
  flex: 1;
  font-weight: 500;
}

.menu-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}

.badge-free {
  background: var(--badge-free-bg);
  color: var(--badge-free-color);
}

.menu-check {
  color: var(--accent-primary, #22c55e);
  font-size: 0.875rem;
}

/* ===== Mobile Styles ===== */
@media (max-width: 768px) {
  .breadcrumb-home .breadcrumb-brand,
  .breadcrumb-separator {
    display: none;
  }

  .breadcrumb-home {
    padding: 0.375rem;
  }

  .breadcrumb-icon {
    font-size: 1.25rem;
  }

  .breadcrumb-menu {
    left: auto;
    right: 0;
    min-width: 200px;
  }
}

/* ===== Light Theme ===== */
[data-theme="light"] .breadcrumb-home {
  color: var(--text-primary, #1f2937);
}

[data-theme="light"] .breadcrumb-home:hover {
  background: var(--bg-card, #f3f4f6);
}

[data-theme="light"] .breadcrumb-current {
  color: var(--text-primary, #1f2937);
}

[data-theme="light"] .breadcrumb-current:hover,
[data-theme="light"] .breadcrumb-current:focus,
[data-theme="light"] .breadcrumb-current[aria-expanded="true"] {
  background: var(--bg-card, #f3f4f6);
  border-color: var(--border-color, #e5e7eb);
}

[data-theme="light"] .breadcrumb-menu {
  background: #fff;
  border-color: var(--border-color, #e5e7eb);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .breadcrumb-menu a {
  color: var(--text-primary, #1f2937);
}

[data-theme="light"] .breadcrumb-menu a:hover {
  background: var(--bg-card, #f3f4f6);
}

[data-theme="light"] .breadcrumb-menu a.active {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

[data-theme="light"] .menu-check {
  color: #16a34a;
}
