:host {
  display: flex;
  align-items: center;
  position: relative;
  --card-header-text-color: var(--color-text-title);
}

:host.separated {
  border-bottom: 1px solid var(--color-border);
}

:host:not(.separated) .content {
  padding-bottom: 0;
}

.vertical-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cover-image {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background: var(--color-background-secondary);
  border-top-right-radius: var(--corner-radius);
  border-top-left-radius: var(--corner-radius);
}

.aspect-ratio-cover-container {
  --aspect-ratio: 16/9;
  position: relative;
  height: 0;
  padding-bottom: calc(100%/(var(--aspect-ratio)));
}

.aspect-ratio-cover-container > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-container {
  padding-top: calc(2 * var(--spacing-unit));
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  box-sizing: border-box;
}

.avatar-container.absolute {
  padding: calc(2 * var(--spacing-unit));
  position: absolute;
}

.avatar-container.center {
  justify-content: center;
  align-items: center;
}

.avatar-container.bottom-left {
  justify-content: flex-start;
  align-items: flex-end;
}

.avatar-container.top-left {
  justify-content: flex-start;
  align-items: flex-start;
}

.avatar-container.bottom-right {
  justify-content: flex-end;
  align-items: flex-end;
}

.avatar-container.top-right {
  justify-content: flex-end;
  align-items: flex-start;
}

.avatar-container.top-center {
  justify-content: center;
  align-items: flex-start;
}

.avatar-container.bottom-center {
  justify-content: center;
  align-items: flex-end;
}

.horizontal-container {
  display: flex;
  align-items: center;
}

.action-container {
  padding-top: calc(2 * var(--spacing-unit));
  padding-right: calc(2 * var(--spacing-unit));
  position: absolute;
  top: 0;
  right: 0;
}

.action-container.absolute {
  padding-top: var(--spacing-unit);
  padding-right: var(--spacing-unit);
}

.content {
  flex: 1;
  color: var(--card-header-text-color);
  padding: calc(4 * var(--spacing-unit));
}

.content h3, .content h4 {
  margin: 0;
  color: var(--card-header-text-color);
}

.content h3.single-line {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Tint */
:host.neutral {
  --card-header-text-color: var(--color-neutral-lightest);
}

:host.primary {
  --card-header-text-color: var(--color-primary-lightest);
}

:host.secondary {
  --card-header-text-color: var(--color-secondary-lightest);
}

:host.warning {
  --card-header-text-color: var(--color-warning-lightest);
}

:host.danger {
  --card-header-text-color: var(--color-danger-lightest);
}
