/* T061 - Panel de acciones (Components/D365/ActionPane). gate-3 §0.1.1 P1-P6. */

.d365-actionpane {
  background: var(--m365-surface-card);
  border-bottom: 1px solid var(--m365-stroke-divider);
}

.d365-actionpane-toolbar {
  display: flex;
  align-items: center;
  gap: var(--m365-space-3);
  padding: var(--m365-space-2) var(--m365-space-3) 0;
  flex-wrap: nowrap;
}

.d365-actionpane-back {
  background: transparent;
  border: none;
  color: var(--m365-text-link);
  font-size: 16px;
  padding: var(--m365-space-1);
  flex-shrink: 0;
}

/* P1: fijos, fuera del tabulador, siempre visibles, icono + texto. */
.d365-actionpane-fixed {
  display: flex;
  align-items: center;
  gap: var(--m365-space-3);
  flex-shrink: 0;
  padding-bottom: var(--m365-space-2);
  border-right: 1px solid var(--m365-stroke-divider);
  margin-right: var(--m365-space-1);
  padding-right: var(--m365-space-3);
}

.d365-actionpane-fixed-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--m365-text-link);
  font-size: var(--m365-fs-body);
  font-weight: var(--m365-fw-semibold);
  padding: var(--m365-space-1) var(--m365-space-1);
  white-space: nowrap;
}

.d365-actionpane-fixed-btn:hover:not(:disabled) {
  text-decoration: underline;
}

.d365-actionpane-fixed-btn:disabled {
  color: var(--m365-text-disabled);
}

/* P2: pestanas; la activa lleva subrayado de acento. */
.d365-actionpane-tabs {
  display: flex;
  align-items: flex-end;
  gap: var(--m365-space-4);
  overflow-x: auto;
  flex: 1;
  min-width: 0;
}

.d365-actionpane-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--m365-text-primary);
  font-size: var(--m365-fs-body-lg);
  padding: var(--m365-space-1) 0 var(--m365-space-2);
  white-space: nowrap;
}

.d365-actionpane-tab.is-active {
  color: var(--m365-text-primary);
  font-weight: var(--m365-fw-semibold);
  border-bottom-color: var(--m365-accent);
}

.d365-actionpane-tab:hover {
  color: var(--m365-accent-70);
}

.d365-actionpane-inline-search {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--m365-text-secondary);
  padding: var(--m365-space-1);
  align-self: flex-end;
  margin-bottom: var(--m365-space-2);
}

/* P3: grupos con leyenda centrada, divisor vertical; overflow -> scroll horizontal
   DENTRO del panel (la clase .d365-scroll-x de app.css hace el scroll). */
.d365-actionpane-groups {
  display: flex;
  align-items: stretch;
  padding: var(--m365-space-2) var(--m365-space-3);
  gap: 0;
}

.d365-actionpane-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--m365-space-4);
  flex-shrink: 0;
}

.d365-actionpane-group-caption {
  font-size: var(--m365-fs-caption);
  font-weight: var(--m365-fw-semibold);
  color: var(--m365-text-secondary);
  text-align: center;
  margin-bottom: var(--m365-space-2);
}

.d365-actionpane-group-caption-empty {
  height: calc(var(--m365-fs-caption) + var(--m365-space-2));
}

.d365-actionpane-group-buttons {
  display: flex;
  align-items: center;
  gap: var(--m365-space-4);
}

.d365-actionpane-group-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  color: var(--m365-text-primary);
  font-size: var(--m365-fs-caption);
  white-space: nowrap;
  min-width: 56px;
}

.d365-actionpane-group-btn .d365-actionpane-btn-icon {
  font-size: 16px;
  color: var(--m365-text-link);
}

.d365-actionpane-group-btn:hover:not(:disabled) {
  text-decoration: underline;
}

.d365-actionpane-group-btn:disabled {
  color: var(--m365-text-disabled);
}

.d365-actionpane-group-btn:disabled .d365-actionpane-btn-icon {
  color: var(--m365-text-disabled);
}

.d365-actionpane-divider {
  width: 1px;
  align-self: stretch;
  background: var(--m365-stroke-divider);
  flex-shrink: 0;
}

/* P4: chevron de colapso abajo a la derecha. */
.d365-actionpane-collapse-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--m365-space-2) 2px 0;
}

.d365-actionpane-collapse-btn {
  background: transparent;
  border: none;
  color: var(--m365-text-secondary);
  font-size: 12px;
  padding: 2px var(--m365-space-2);
}

.d365-actionpane-collapse-btn:hover {
  color: var(--m365-text-primary);
}
