/* Item tooltip: a dark panel of the theme (see theme.css). Tooltip.__applyTheme colors the header and the border after
   the item sprite, and the title takes the rarity color of the item like the item names of the Loot channel */
.tooltip-container {
    position: absolute;
    width: 200px;
    background: var(--color-panel-background);
    border: 1px solid var(--color-panel-border);
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    /* Let clicks pass through */
    pointer-events: none;
    z-index: 1000;
    font-family: 'Verdana', sans-serif;
    font-size: 11px;
    color: white;
    overflow: hidden;
    transition: opacity 0.1s ease;
}

.tooltip-header {
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 48px;
    position: relative;
}

.tooltip-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, transparent, var(--color-panel-background));
}

.tooltip-image-container {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 2px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.tooltip-sprite {
    image-rendering: pixelated;
}

.tooltip-weight-header {
    font-weight: bold;
    color: var(--color-text-soft);
    font-size: 10px;
    z-index: 1;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.8);
}

.tooltip-body {
    padding: 8px 10px;
}

/* The color comes from the rarity class of the item (loot-common, loot-rare, ..., see chatbox.css) */
.tooltip-title {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 8px;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Second line of the title: the item name when the title names something else (e.g., the furniture of a furniture package) */
.tooltip-subtitle {
    margin-top: 2px;
    font-weight: normal;
    font-size: 10px;
    color: var(--color-text-muted);
}

.tooltip-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-soft);
}

.stat .icon {
    width: 14px;
    text-align: center;
}

.tooltip-description {
    margin-top: 8px;
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
}
