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

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

.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;
  flex: 1;
  align-items: flex-start;
  min-width: 0;
  padding: var(--fd-content-card-padding);
  text-decoration: none;
  color: inherit;
  gap: var(--fd-space-4);
}

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

.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;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--fd-space-3);
}

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

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

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

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

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

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

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

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

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

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

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

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

/* 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;
  flex-shrink: 0;
  align-items: flex-start;
  padding: var(--fd-space-3);
}

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

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

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