/* ===============================
   HEADER PATH - מסלול עמוד מקצועי ונקי
   =============================== */

@layer components {
  /* המעטפת הראשית */
  .header-path {
    margin-top: 0;
    padding: 0.5rem 1rem;
    background: rgba(44, 62, 80, 0.03);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    direction: rtl;
    position: relative;
    z-index: 1;
  }

  @media (max-width: 1023px) {
    .header-path {
      margin-top: 0;
      padding: 0.375rem 0.75rem;
    }
  }

/* Wrapper */
.header-path-wrapper {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

/* רשימת פריטים - שורה אחת */
.header-path-items {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

/* פריט בודד */
.header-path-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}

.header-path-item span,
.header-path-item a {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

/* אייקון */
.header-path-item i {
  font-size: 0.875rem;
  opacity: 0.8;
  color: rgba(148, 163, 184, 0.9);
}

/* לינק */
.header-path-link {
  display: inline-flex;
  align-items: center;
  color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
  transition: color 0.2s;
}

.header-path-link:hover {
  color: var(--primary-500);
}

.header-path-link:hover + i,
.header-path-item:hover i {
  opacity: 1;
  color: var(--primary-500);
}

/* פריט נוכחי (פעיל) */
.header-path-item.active .header-path-current {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.header-path-item.active i {
  color: var(--primary-500);
  opacity: 1;
}

.header-path-current {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

/* מפריד */
.header-path-separator {
  display: inline-flex;
  align-items: center;
  color: rgba(148, 163, 184, 0.5);
  font-size: 0.75rem;
  margin: 0 0.25rem;
  flex-shrink: 0;
}

.header-path-separator i {
  font-size: 0.625rem;
  transform: scaleX(-1); /* Flip chevron for RTL */
}

/* כפתור תפריט (אם יש) */
.header-path-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  margin-right: 0.25rem;
  background: transparent;
  border: none;
  color: rgba(148, 163, 184, 0.7);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
  border-radius: 0.25rem;
}

.header-path-menu-btn:hover {
  background: rgba(52, 152, 219, 0.1);
  color: var(--primary-500);
}

/* תפריט נפתח */
.header-path-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.25rem;
  min-width: 12rem;
  background: rgba(30, 41, 59, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  padding: 0.25rem 0;
  display: none;
}

.header-path-menu.show {
  display: block;
}

.header-path-menu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.header-path-menu-item:hover {
  background: rgba(52, 152, 219, 0.1);
  color: var(--primary-500);
}

.header-path-menu-item i {
  font-size: 0.75rem;
  width: 1rem;
  text-align: center;
}

/* גלילה אופקית במובייל */
@media (max-width: 768px) {
  .header-path-items {
    gap: 0.375rem;
    padding-bottom: 0.25rem;
  }
  
  .header-path-item {
    font-size: 0.8125rem;
  }
  
  .header-path-item i {
    font-size: 0.75rem;
  }
  
  .header-path-separator {
    margin: 0 0.125rem;
  }
}

/* הסתרת scrollbar אבל שמירה על גלילה */
.header-path-items::-webkit-scrollbar {
  height: 4px;
}

.header-path-items::-webkit-scrollbar-track {
  background: transparent;
}

.header-path-items::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 2px;
}

.header-path-items::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

/* כפתורי ניווט - actions-bar */
.header-path-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-right: auto;
  flex-shrink: 0;
}

/* הסתרת actions אם ריק */
.header-path-actions:empty {
  display: none;
}

.header-path-actions .btn {
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  padding: calc(var(--space-1) * 1.6) calc(var(--space-2) * 1.8);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.header-path-actions .btn-outline-secondary {
  color: rgba(148, 163, 184, 0.9);
  border-color: rgba(148, 163, 184, 0.3);
  background: transparent;
}

.header-path-actions .btn-outline-secondary:hover {
  background: rgba(52, 152, 219, 0.1);
  border-color: #3498db;
  color: var(--primary-500);
  transform: translateY(-1px);
}

.header-path-actions .btn i {
  font-size: var(--text-sm);
  margin-left: 0.25rem;
}

@media (max-width: 768px) {
  .header-path-wrapper {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }
  
  .header-path-actions {
    flex-shrink: 0;
  }
  
  .header-path-items {
    flex: 1 1 auto;
    min-width: 0;
  }
} /* סיום @layer components */
}

