/* The item card shown when a named item is hovered or focused (Components/ItemHoverCard.razor). js/rf-itemcard.js
   places it beside the item, over the page, so a scrolling panel around it cannot cut it off. It hides a moment
   after the mouse leaves, so the mouse can move onto the card and use its link. */

.rf-itemhover {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--rf-space-2);
    cursor: help;
    border-radius: var(--rf-radius-sm, 4px);
}

.rf-itemhover:focus-visible {
    outline: none;
    box-shadow: var(--rf-focus);
}

.rf-itemhover strong,
.rf-itemhover .rf-itemhover__name {
    text-decoration: underline dotted;
    text-underline-offset: 3px;
}

.rf-itemcard {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--rf-space-2);
    width: 19rem;
    max-width: calc(100vw - 16px);
    padding: var(--rf-space-3);
    border: 1px solid var(--rf-line-strong);
    border-radius: var(--rf-radius);
    background: var(--rf-surface-1);
    box-shadow: var(--rf-shadow-lg), var(--rf-bevel);
    color: var(--rf-ink);
    font-size: var(--rf-size-body);
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    cursor: default;
    visibility: hidden;
    opacity: 0;
    transition: opacity 120ms ease, visibility 0s linear 180ms;
}

.rf-itemhover:hover > .rf-itemcard,
.rf-itemhover:focus-within > .rf-itemcard {
    visibility: visible;
    opacity: 1;
    transition: opacity 120ms ease, visibility 0s;
}

.rf-itemcard__head {
    display: flex;
    align-items: center;
    gap: var(--rf-space-3);
}

.rf-itemcard__pic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 2px solid currentColor;
    border-radius: var(--rf-radius);
    background: var(--rf-surface-2);
    font-size: 1.25rem;
}

.rf-itemcard__pic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rf-itemcard__title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rf-itemcard__name {
    font-size: var(--rf-size-heading);
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: break-word;
    text-decoration: none;
}

.rf-itemcard__kind {
    color: var(--rf-ink-muted);
    font-size: var(--rf-size-small);
}

.rf-itemcard__kind em {
    font-style: normal;
    font-weight: 800;
}

.rf-itemcard__desc {
    color: var(--rf-ink);
    font-weight: 600;
}

.rf-itemcard__desc--quiet {
    color: var(--rf-ink-muted);
}

.rf-itemcard__rows {
    display: flex;
    flex-direction: column;
    padding-top: var(--rf-space-2);
    border-top: 1px solid var(--rf-line);
}

.rf-itemcard__label {
    color: var(--rf-ink-muted);
    font-size: var(--rf-size-small);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rf-itemcard__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--rf-space-3);
    padding: 1px 0;
    color: var(--rf-ink-muted);
}

.rf-itemcard__row i {
    width: 1.1em;
    text-align: center;
}

.rf-itemcard__row b {
    color: var(--rf-ink);
    font-weight: 800;
}

.rf-itemcard__more {
    align-self: flex-start;
    color: var(--rf-gold-bright);
    font-weight: 700;
    text-decoration: none;
}

.rf-itemcard__more:hover {
    text-decoration: underline;
}
