/* ===========================================
   Action Buttons - Icon-only copy/speak/view details
   Show on hover for pointer devices, always visible on touch
   =========================================== */

.step-action-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
}

.step-action-buttons .expand-btn {
  display: none;
  align-items: center;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: "Rubik", Arial, Helvetica, sans-serif;
  font-size: var(--font-size-xs);
  cursor: pointer;
  padding: var(--spacing-xs) 0;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.step-action-buttons .expand-btn:hover {
  opacity: 1;
}

.step-action-buttons .action-button,
.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 2px;
  cursor: pointer;
}

.step-action-buttons .action-button .material-symbols-outlined,
.action-button .material-symbols-outlined {
  font-size: 0.85rem;
  line-height: 1;
  color: var(--color-message-text);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  transition: color 0.15s ease;
}

.step-action-buttons .action-button:hover .material-symbols-outlined,
.action-button:hover .material-symbols-outlined {
  color: var(--color-text);
}

/* Success state */
.step-action-buttons .action-button.success .material-symbols-outlined,
.action-button.success .material-symbols-outlined {
  color: #4CAF50;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

/* Error state */
.step-action-buttons .action-button.error .material-symbols-outlined,
.action-button.error .material-symbols-outlined {
  color: var(--color-accent);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.show-more-btn,
.show-less-btn {
  display: none;
}

.message.message-collapsible.has-overflow:not(.expanded) > .step-action-buttons {
  opacity: 1;
  pointer-events: auto;
}

.message.message-collapsible.has-overflow:not(.expanded)
  > .step-action-buttons
  .show-more-btn {
  display: inline-flex;
  pointer-events: auto;
}

.device-pointer
  .message.message-collapsible.has-overflow:not(.expanded)
  > .step-action-buttons
  .action-button {
  opacity: 0;
  pointer-events: none;
}

.device-pointer
  .message.message-collapsible.has-overflow:not(.expanded):hover
  > .step-action-buttons
  .action-button {
  opacity: 1;
  pointer-events: auto;
}

.device-pointer
  .message.message-collapsible.has-overflow.expanded:hover
  > .step-action-buttons
  .show-less-btn {
  display: inline-flex;
  pointer-events: auto;
}

.device-touch
  .message.message-collapsible.has-overflow.expanded
  > .step-action-buttons
  .show-less-btn {
  display: inline-flex;
  pointer-events: auto;
}

/* User messages: right-aligned */
.message-user .step-action-buttons {
  justify-content: flex-end;
  width: 100%;
}



/* ===========================================
   Hover behavior - Pointer devices
   =========================================== */

.device-pointer .step-action-buttons:hover,
.device-pointer :hover > .step-action-buttons {
  opacity: 1;
  pointer-events: auto;
}

/* ===========================================
   Touch devices - Always visible
   =========================================== */

.device-touch .step-action-buttons {
  opacity: 1;
  pointer-events: auto;
}
