/**
 * @file
 * FlowDrop Button Component Styles
 */

.fd-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fd-space-2);
  padding: var(--fd-button-padding-y) var(--fd-button-padding-x);
  font-family: inherit;
  font-size: var(--fd-button-font-size);
  font-weight: var(--fd-button-font-weight);
  line-height: 1.25;
  text-decoration: none;
  border: var(--fd-border-width) solid transparent;
  border-radius: var(--fd-button-radius);
  cursor: pointer;
  transition: background-color var(--fd-transition-fast),
              border-color var(--fd-transition-fast),
              color var(--fd-transition-fast),
              box-shadow var(--fd-transition-fast);
}

.fd-button:focus-visible {
  outline: 2px solid var(--fd-color-primary-500);
  outline-offset: 2px;
}

/* Icon */
.fd-button__icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.fd-button__icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ========================================================================
 * VARIANTS
 * ======================================================================== */

/* Primary */
.fd-button--primary {
  color: var(--fd-button-primary-text);
  background-color: var(--fd-button-primary-bg);
  border-color: var(--fd-button-primary-border);
}

.fd-button--primary:hover:not(.fd-button--disabled) {
  background-color: var(--fd-button-primary-bg-hover);
}

.fd-button--primary:active:not(.fd-button--disabled) {
  background-color: var(--fd-button-primary-bg-active);
}

/* Secondary */
.fd-button--secondary {
  color: var(--fd-button-secondary-text);
  background-color: var(--fd-button-secondary-bg);
  border-color: var(--fd-button-secondary-border);
}

.fd-button--secondary:hover:not(.fd-button--disabled) {
  background-color: var(--fd-button-secondary-bg-hover);
  border-color: var(--fd-color-gray-300);
}

.fd-button--secondary:active:not(.fd-button--disabled) {
  background-color: var(--fd-button-secondary-bg-active);
}

/* Ghost */
.fd-button--ghost {
  color: var(--fd-button-ghost-text);
  background-color: var(--fd-button-ghost-bg);
  border-color: transparent;
}

.fd-button--ghost:hover:not(.fd-button--disabled) {
  background-color: var(--fd-button-ghost-bg-hover);
}

/* Danger */
.fd-button--danger {
  color: #ffffff;
  background-color: var(--fd-color-error-500);
  border-color: var(--fd-color-error-500);
}

.fd-button--danger:hover:not(.fd-button--disabled) {
  background-color: var(--fd-color-error-600);
  border-color: var(--fd-color-error-600);
}

.fd-button--danger:active:not(.fd-button--disabled) {
  background-color: var(--fd-color-error-700);
  border-color: var(--fd-color-error-700);
}

/* ========================================================================
 * SIZES
 * ======================================================================== */

.fd-button--sm {
  padding: var(--fd-space-1) var(--fd-space-3);
  font-size: var(--fd-font-size-xs);
}

.fd-button--sm .fd-button__icon svg {
  width: 1rem;
  height: 1rem;
}

.fd-button--lg {
  padding: var(--fd-space-3) var(--fd-space-6);
  font-size: var(--fd-font-size-base);
}

.fd-button--lg .fd-button__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ========================================================================
 * STATES
 * ======================================================================== */

.fd-button--full-width {
  width: 100%;
}

.fd-button--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}


