src/components/deck-summary/deck-summary.module.css
.summary {
  border-style: solid;
  border-width: 1px;
  border-radius: var(--rounded);
  overflow: hidden;
  transition: border 0.15s ease-in-out;

  &:focus-within {
    border-color: 1px solid var(--focus);
  }
}

.summary.shadow {
  box-shadow: var(--shadow);
}

.summary a {
  text-decoration: none;

  &:focus {
    outline: none;
  }
}

.thumbnail {
  width: 2.5rem;
  position: relative;
  flex: 0 0 auto;
}

.validation {
  display: inline-block;
  background: var(--health);
  color: var(--color-inverted);
  border-radius: 100%;
  padding: 1px;
  position: absolute;
  bottom: -0.125rem;
  right: -0.125rem;
}

.header,
.meta {
  width: 100%;
}

.header {
  display: flex;
  align-items: center;
  padding: 0.375rem;
  gap: 0.75rem;
  transition: background 0.15s ease-in-out;
  border-bottom: 1px solid transparent;
}

.header-container {
  flex: 1 1 auto;
  position: relative;
}

.header-row {
  display: flex;
  justify-content: space-between;
  flex-flow: row nowrap;
  align-items: center;
  line-height: 1;
  column-gap: 0.125rem;
  row-gap: 0.25rem;
  margin-top: 0.125rem;

  &.wrap {
    flex-wrap: wrap;
  }
}

.info-container {
  opacity: 1;
}

.title {
  display: flex;
  gap: 0.25rem;
  font-family: var(--font-family-ui);
  font-size: var(--text-sm);
  hyphens: auto;
  color: currentColor;
}

.sub {
  font-family: var(--font-family-content);
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-xs);
}

:lang(ko, zh, zh-Hant, zh-Hans) .sub {
  font-style: normal;
}

.meta {
  position: relative;
  grid-area: meta;
  font-size: var(--text-sm);
  padding: 0.5rem;
  overflow: hidden;
}

.summary.sm .meta {
  padding: 0.375rem;
}

.quick-actions {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-end;
  padding: 0.0625rem;
  margin: auto;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  background: rgba(0, 0, 0, 0.2);
  text-align: right;
  transition:
    0.2s ease-in-out opacity,
    0.2s visibility;
  transition-behavior: allow-discrete;
}

:root[data-theme="light"] .quick-actions {
  background: rgba(255, 255, 255, 0.2);
}

.quick-action {
  list-style: none;
  transform: translateX(0.375rem);
  transition: 0.2s ease-in-out transform;
  transition-behavior: allow-discrete;

  &:not(:first-child) {
    margin-left: 0.3125rem;
  }
}

.summary.interactive {
  &:not(:hover):not(:focus-within) {
    border-color: var(--palette-1);
  }

  &:not(:hover) .header {
    background: var(--palette-point-five);
    color: var(--text);
    text-shadow: none;
    border-bottom: 1px solid var(--palette-1);
  }
}

.summary.interactive.elevated {
  &:not(:hover):not(:focus-within) {
    border-color: var(--palette-2);
  }

  &:not(:hover) .header {
    background: var(--palette-1);
    border-bottom: 1px solid var(--palette-2);
  }
}

@media (pointer: fine) {
  .summary.interactive {
    &:hover {
      & .quick-actions {
        opacity: 1;
        pointer-events: all;
        visibility: visible;
      }

      & .quick-action {
        transform: translateX(0);
      }
    }
  }
}

@starting-style {
  .quick-actions {
    opacity: 0;
  }

  .quick-action {
    transform: translateX(0.375rem);
  }
}
