/* Team Efficiency — Default card preview (features page), scoped to #matter-efficiency */

#matter-efficiency .team-efficiency-card-shell {
  position: relative;
  border-radius: 12px;
  border: 1px solid #e6e9ed;
  background: #fff;
  overflow: hidden;
  --efficiency-card-accent: #d48d11;
}

#matter-efficiency .team-efficiency-card-shell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--efficiency-card-accent);
  z-index: 1;
}

#matter-efficiency .team-efficiency-card-inner {
  padding: 16px 18px 18px 22px;
  position: relative;
}

#matter-efficiency .team-efficiency-card-title-block h5 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #6b7280;
}

#matter-efficiency .team-efficiency-card-title-block .team-efficiency-rule-sub {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
}

#matter-efficiency .team-efficiency-layout {
  display: flex;
  gap: 18px;
  align-items: stretch;
  overflow: hidden;
}

#matter-efficiency .team-efficiency-chart-wrap {
  flex: 0 0 100%;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  transition: none;
}

#matter-efficiency .team-efficiency-layout.with-details .team-efficiency-chart-wrap {
  flex: 0 0 calc(60% - 4px);
  max-width: calc(60% - 4px);
}

#matter-efficiency .team-efficiency-chart-host {
  position: relative;
  width: 100%;
  min-height: 260px;
  height: auto;
}

#matter-efficiency .team-efficiency-details {
  flex: 0 0 0;
  max-width: 0;
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  border-left: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  padding-left: 0;
  padding-right: 4px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
  transition: max-width 0.3s ease, flex-basis 0.3s ease, opacity 0.3s ease, padding-left 0.3s ease, transform 0.3s ease;
}

#matter-efficiency .team-efficiency-details.is-visible {
  flex: 0 0 40%;
  max-width: 40%;
  padding-left: 10px;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

#matter-efficiency .team-efficiency-details.is-visible.is-hiding {
  flex: 0 0 0;
  max-width: 0;
  padding-left: 0;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
}

/* Selected Categories (matches app efficiency-selected-groups) */
#matter-efficiency .team-efficiency-selected-groups {
  flex: 0 0 auto;
  padding: 0 0 12px 0;
  border-bottom: 1px solid #eee;
  margin-bottom: 12px;
}

#matter-efficiency .team-efficiency-selected-groups-label {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b7280;
}

#matter-efficiency .team-efficiency-selected-groups-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

#matter-efficiency .team-efficiency-selected-groups-header .team-efficiency-selected-groups-label {
  margin: 0;
}

#matter-efficiency .team-efficiency-selected-groups-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

#matter-efficiency .team-efficiency-selected-groups-action {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s ease;
}

#matter-efficiency .team-efficiency-selected-groups-action:hover,
#matter-efficiency .team-efficiency-selected-groups-action:focus-visible {
  color: #111827;
  outline: none;
}

#matter-efficiency .team-efficiency-selected-groups-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#matter-efficiency .team-efficiency-selected-group-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

#matter-efficiency .team-efficiency-selected-group-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

#matter-efficiency .team-efficiency-selected-group-pill-remove:hover,
#matter-efficiency .team-efficiency-selected-group-pill-remove:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
  outline: none;
}

#matter-efficiency .team-efficiency-details-heading {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #0b1220);
}

#matter-efficiency .team-efficiency-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

#matter-efficiency .team-efficiency-table th,
#matter-efficiency .team-efficiency-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border, rgba(15, 23, 42, 0.1));
  text-align: left;
}

#matter-efficiency .team-efficiency-table th {
  font-weight: 500;
  color: var(--muted, #5b677a);
}

#matter-efficiency .team-efficiency-details::-webkit-scrollbar {
  width: 8px;
}

#matter-efficiency .team-efficiency-details::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}

#matter-efficiency .team-efficiency-details {
  scrollbar-width: thin;
}

#matter-efficiency .feature-highlight .x_panel.team-efficiency-x-panel {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin-bottom: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
