/**
 * B2B Shop Sidebar Category Tree Widget Styles
 * Clean, borderless list style matching the theme and catalog specification.
 */

.b2b-cat-sidebar-widget {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-family: inherit;
  color: #1e293b;
  position: relative;
  width: 100%;
}

.b2b-cat-sidebar-widget * {
  box-sizing: border-box;
}

/* Header Area */
.b2b-cat-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.15rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.b2b-cat-widget-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: -0.01em;
}

.b2b-cat-widget-title .b2b-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(250, 103, 66, 0.1);
  color: #fa6742;
  border-radius: 6px;
  font-size: 0.88rem;
}

.b2b-cat-all-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.25s ease;
}

.b2b-cat-all-link:hover {
  color: #fa6742;
  background: #fff;
  border-color: #fa6742;
  transform: translateX(2px);
}

.b2b-cat-all-link i {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}

.b2b-cat-all-link:hover i {
  transform: translateX(2px);
}

/* Instant Search Box */
.b2b-cat-search-box {
  position: relative;
  margin-bottom: 1.15rem;
}

.b2b-cat-search-box .b2b-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}

.b2b-cat-search-input {
  width: 100%;
  padding: 0.55rem 1.85rem 0.55rem 2.1rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.88rem;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.25s ease;
}

.b2b-cat-search-input:focus {
  background: #ffffff;
  border-color: #fa6742;
  box-shadow: 0 0 0 3px rgba(250, 103, 66, 0.12);
}

.b2b-cat-search-clear {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 4px;
}

.b2b-cat-search-clear:hover {
  color: #ef4444;
}

/* Group List (Clean & Borderless) */
.b2b-cat-groups-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.b2b-cat-group-card {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  transition: all 0.2s ease;
}

/* Group Header */
.b2b-cat-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0;
  user-select: none;
}

.b2b-cat-group-title-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 1rem;
  transition: color 0.2s ease;
  flex: 1;
}

.b2b-cat-group-num {
  color: #475569;
  font-weight: 800;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  min-width: 1.15rem;
}

.b2b-cat-group-name {
  color: #0f172a;
  transition: color 0.2s ease;
}

.b2b-cat-group-title-link:hover .b2b-cat-group-name,
.b2b-cat-group-title-link:hover .b2b-cat-group-num,
.b2b-cat-group-card.is-active-group .b2b-cat-group-name,
.b2b-cat-group-card.is-active-group .b2b-cat-group-num {
  color: #fa6742;
}

.b2b-cat-group-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.b2b-cat-group-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.b2b-cat-group-card.is-active-group .b2b-cat-group-badge {
  background: rgba(250, 103, 66, 0.15);
  color: #fa6742;
}

.b2b-cat-group-toggle {
  background: transparent;
  border: none;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.b2b-cat-group-toggle:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.b2b-toggle-chevron {
  font-size: 0.72rem;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.b2b-cat-group-card.is-open .b2b-toggle-chevron {
  transform: rotate(180deg);
}

/* Sub-categories List */
.b2b-cat-sub-wrap {
  padding: 0.25rem 0 0 1.25rem;
  border-top: none !important;
}

.b2b-cat-sub-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.b2b-cat-sub-item {
  position: relative;
  transition: all 0.2s ease;
}

.b2b-sub-item-row {
  display: flex;
  align-items: center;
}

.b2b-cat-sub-link {
  display: flex;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.2rem 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.b2b-sub-dash {
  color: #94a3b8;
  font-weight: 700;
  margin-right: 0.45rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.b2b-sub-title {
  flex: 1;
  transition: transform 0.2s ease, color 0.2s ease;
}

.b2b-cat-sub-link:hover .b2b-sub-dash {
  color: #fa6742;
  transform: translateX(2px);
}

.b2b-cat-sub-link:hover .b2b-sub-title {
  color: #fa6742;
  transform: translateX(2px);
}

.b2b-cat-sub-link:hover {
  background: rgba(250, 103, 66, 0.05);
}

/* Active Sub Item */
.b2b-cat-sub-item.is-active .b2b-cat-sub-link {
  background: rgba(250, 103, 66, 0.1);
  color: #fa6742;
  font-weight: 700;
}

.b2b-cat-sub-item.is-active .b2b-sub-dash {
  color: #fa6742;
  font-weight: 900;
}

.b2b-sub-count-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 0.5rem;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.b2b-cat-sub-link:hover .b2b-sub-count-badge {
  background: #fa6742;
  color: #ffffff;
}

.b2b-cat-sub-item.is-active .b2b-sub-count-badge {
  background: #fa6742;
  color: #ffffff;
}

/* Multi-slug Sub Pills */
.b2b-sub-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.15rem 0 0.25rem 1.1rem;
}

.b2b-sub-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.b2b-sub-pill:hover {
  border-color: #fa6742;
  color: #fa6742;
  background: #fff;
}

.b2b-sub-pill.is-active {
  background: #fa6742;
  color: #ffffff;
  border-color: #fa6742;
}

.b2b-pill-cnt {
  font-size: 0.68rem;
  opacity: 0.85;
}

/* No results state */
.b2b-cat-no-results {
  text-align: center;
  padding: 1.25rem 1rem;
  color: #94a3b8;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.b2b-cat-no-results i {
  font-size: 1.3rem;
  color: #cbd5e1;
}
