/**
 * @file
 * FlowDrop Content Card Component Styles
 */

.fd-content-card {
  display: flex;
  align-items: flex-start;
  background-color: var(--fd-content-card-bg);
  border: var(--fd-border-width) solid var(--fd-content-card-border);
  border-radius: var(--fd-content-card-radius);
  transition: border-color var(--fd-transition-fast),
    box-shadow var(--fd-transition-fast);
}

.fd-content-card--clickable:hover {
  border-color: var(--fd-border-muted);
  box-shadow: var(--fd-shadow-md);
}

/* Main clickable area */
.fd-content-card__main {
  display: flex;
  align-items: flex-start;
  gap: var(--fd-space-4);
  flex: 1;
  padding: var(--fd-content-card-padding);
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

/* Icon */
.fd-content-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--fd-content-card-icon-size);
  height: var(--fd-content-card-icon-size);
  flex-shrink: 0;
  border-radius: var(--fd-radius-lg);
  background-color: var(--fd-content-card-icon-bg);
  color: var(--fd-content-card-icon-color);
}

.fd-content-card__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Content */
.fd-content-card__content {
  flex: 1;
  min-width: 0;
}

.fd-content-card__header {
  display: flex;
  align-items: baseline;
  gap: var(--fd-space-3);
  flex-wrap: wrap;
}

.fd-content-card__title {
  margin: 0;
  font-size: var(--fd-content-card-title-size);
  font-weight: var(--fd-font-weight-semibold);
  color: var(--fd-content-card-title-color);
}

.fd-content-card__edited {
  font-size: var(--fd-content-card-meta-size);
  color: var(--fd-content-card-meta-color);
}

.fd-content-card__description {
  margin: var(--fd-space-1) 0 0;
  font-size: var(--fd-content-card-description-size);
  color: var(--fd-content-card-description-color);
  line-height: var(--fd-line-height-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer with meta and status */
.fd-content-card__footer {
  display: flex;
  align-items: center;
  gap: var(--fd-space-3);
  margin-block-start: var(--fd-space-3);
  flex-wrap: wrap;
}

.fd-content-card__meta {
  display: flex;
  align-items: center;
  gap: var(--fd-space-2);
  flex-wrap: wrap;
}

.fd-content-card__meta-item {
  display: inline-flex;
  align-items: center;
  padding: var(--fd-space-1) var(--fd-space-2);
  font-size: var(--fd-text-xs);
  font-weight: var(--fd-font-weight-medium);
  color: var(--fd-muted-foreground);
  background-color: var(--fd-subtle);
  border-radius: var(--fd-radius-md);
}

/* Status badge */
.fd-content-card__status {
  display: inline-flex;
  align-items: center;
  padding: var(--fd-space-1) var(--fd-space-2);
  font-size: var(--fd-text-xs);
  font-weight: var(--fd-font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--fd-letter-spacing-wide);
  border-radius: var(--fd-radius-md);
}

.fd-content-card__status--success {
  background-color: var(--fd-success-muted);
  color: var(--fd-success-hover);
}

.fd-content-card__status--warning {
  background-color: var(--fd-warning-muted);
  color: var(--fd-warning-hover);
}

.fd-content-card__status--error {
  background-color: var(--fd-error-muted);
  color: var(--fd-error-hover);
}

.fd-content-card__status--info {
  background-color: var(--fd-info-muted);
  color: var(--fd-info);
}

.fd-content-card__status--neutral {
  background-color: var(--fd-subtle);
  color: var(--fd-muted-foreground);
}

/* Animated status for running state */
@keyframes fd-status-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

.fd-content-card__status--animated {
  animation: fd-status-pulse 1.5s ease-in-out infinite;
}

/* Actions area */
.fd-content-card__actions {
  display: flex;
  align-items: flex-start;
  padding: var(--fd-space-3);
  flex-shrink: 0;
}

.fd-content-card__menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: var(--fd-border-width) solid var(--fd-border);
  border-radius: var(--fd-radius-md);
  background-color: transparent;
  color: var(--fd-muted-foreground);
  cursor: pointer;
  transition: background-color var(--fd-transition-fast),
    border-color var(--fd-transition-fast),
    color var(--fd-transition-fast);
}

.fd-content-card__menu-button:hover {
  background-color: var(--fd-subtle);
  border-color: var(--fd-border-muted);
  color: var(--fd-foreground);
}

.fd-content-card__menu-button svg {
  width: 1.25rem;
  height: 1.25rem;
}