/* Action Button Base Styles */
.actionButton {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  min-width: 28px;
  min-height: 28px;
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.actionButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.actionButton:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

.actionButton:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.actionButton.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  background: var(--color-gray-disabled, #CBD5E0) !important;
  color: var(--color-text-secondary, #718096) !important;
  box-shadow: none !important;
}

.actionButton.disabled:hover {
  background: var(--color-gray-disabled, #CBD5E0) !important;
  transform: none !important;
  box-shadow: none !important;
}

.actionButton:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-bg, #fff), 0 0 0 4px rgba(var(--color-secondary-rgb, 74, 111, 165), 0.5);
}

.actionIcon {
  font-size: 14px;
  height: 14px;
  width: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.1));
}

/* Loading State */
.actionButton.loading {
  opacity: 0.65;
  cursor: not-allowed;
}

.actionButton.loading .actionIcon {
  animation: spin 1s linear infinite;
}

.actionButton.delete.loading .actionIcon {
  animation: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Delete Confirmation Buttons */
.deleteConfirmButtons {
  display: flex;
  gap: 2px;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  border-radius: 6px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.confirmButton {
  background: transparent !important;
  color: white !important;
  min-width: 24px;
  min-height: 24px;
  padding: 4px;
  box-shadow: none !important;
}

.confirmButton:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  transform: none;
}

.cancelButton {
  background: transparent !important;
  color: white !important;
  min-width: 24px;
  min-height: 24px;
  padding: 4px;
  box-shadow: none !important;
}

.cancelButton:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  transform: none;
}

/* Action Button Container */
.actionButtons {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

/* Button Variants */
.actionButton.edit {
  background: linear-gradient(180deg, #5a82b5 0%, var(--color-secondary, #4A6FA5) 100%);
  color: white;
}

.actionButton.edit:hover {
  background: linear-gradient(180deg, var(--color-secondary, #4A6FA5) 0%, var(--color-secondary-hover, #3D5D8A) 100%);
  box-shadow: 0 3px 8px rgba(74, 111, 165, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.actionButton.delete {
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: white;
}

.actionButton.delete:hover {
  background: linear-gradient(180deg, #d44040 0%, var(--color-red, #C53030) 100%);
  box-shadow: 0 3px 8px rgba(197, 48, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.actionButton.download {
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: white;
}

.actionButton.download:hover {
  background: linear-gradient(180deg, #6b7b8d 0%, var(--color-gray-hover, #4A5568) 100%);
}

.actionButton.view {
  background: linear-gradient(180deg, #5a82b5 0%, var(--color-secondary, #4A6FA5) 100%);
  color: white;
}

.actionButton.view:hover {
  background: linear-gradient(180deg, var(--color-secondary, #4A6FA5) 0%, var(--color-secondary-hover, #3D5D8A) 100%);
  box-shadow: 0 3px 8px rgba(74, 111, 165, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.actionButton.copy {
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: white;
}

.actionButton.copy:hover {
  background: linear-gradient(180deg, #6b7b8d 0%, var(--color-gray-hover, #4A5568) 100%);
}

.actionButton.connect {
  background: linear-gradient(180deg, #5a82b5 0%, var(--color-secondary, #4A6FA5) 100%);
  color: white;
}

.actionButton.connect:hover {
  background: linear-gradient(180deg, var(--color-secondary, #4A6FA5) 0%, var(--color-secondary-hover, #3D5D8A) 100%);
  box-shadow: 0 3px 8px rgba(74, 111, 165, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.actionButton.refresh {
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: white;
}

.actionButton.refresh:hover {
  background: linear-gradient(180deg, #6b7b8d 0%, var(--color-gray-hover, #4A5568) 100%);
}

.actionButton.remove {
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: white;
}

.actionButton.remove:hover {
  background: linear-gradient(180deg, #d44040 0%, var(--color-red, #C53030) 100%);
  box-shadow: 0 3px 8px rgba(197, 48, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Generic Custom Action Button */
.actionButton.custom {
  background: linear-gradient(180deg, #8494a7 0%, #6b7b8d 100%);
  color: white;
}

.actionButton.custom:hover {
  background: linear-gradient(180deg, #6b7b8d 0%, var(--color-gray-hover, #4A5568) 100%);
}

/* Success State */
.actionButton.success {
  background: linear-gradient(180deg, #48bb78 0%, var(--color-success, #38A169) 100%) !important;
  color: white !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.actionButton.success:hover {
  background: linear-gradient(180deg, var(--color-success, #38A169) 0%, var(--color-success-hover, #2F855A) 100%) !important;
  box-shadow: 0 3px 8px rgba(56, 161, 105, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Error State */
.actionButton.error {
  background: linear-gradient(180deg, #e53e3e 0%, var(--color-red, #C53030) 100%) !important;
  color: white !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.actionButton.error:hover {
  background: linear-gradient(180deg, var(--color-red, #C53030) 0%, #9B2C2C 100%) !important;
  box-shadow: 0 3px 8px rgba(197, 48, 48, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  .actionButtons {
    flex-direction: column;
    gap: 4px;
  }

  .actionButton {
    padding: 4px;
    font-size: 11px;
    min-width: 24px;
    min-height: 24px;
  }

  .actionIcon {
    font-size: 13px;
    height: 13px;
    width: 13px;
  }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
  .actionButton {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .actionButton:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .actionButton.edit {
    background: linear-gradient(180deg, #6a92c5 0%, var(--color-secondary) 100%);
  }

  .actionButton.edit:hover {
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary-hover) 100%);
  }

  .actionButton.delete {
    background: linear-gradient(180deg, #9ca3af 0%, var(--color-gray) 100%);
  }

  .actionButton.delete:hover {
    background: linear-gradient(180deg, #fc8181 0%, var(--color-red) 100%);
  }

  .actionButton.view {
    background: linear-gradient(180deg, #6a92c5 0%, var(--color-secondary) 100%);
  }

  .actionButton.view:hover {
    background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary-hover) 100%);
  }
}
