/*
    This file is part of BDUK (BOII Development UI Kit) and is licensed under the MIT License.
    See the LICENSE file in the root directory for full terms.

    © 2025 Case @ BOII Development

    Support honest development — retain this credit. Don’t be that guy...
*/

/* Tooltip */
#tooltip {
    position: absolute;
    display: none;
    z-index: 9999;
    max-width: 15vw;
    min-width: 12.5vw;
    background: var(--background_main);
    color: var(--text_primary);
    border-radius: var(--border_radius_outer);
    font-size: 1rem;
    border: var(--border_dark);
    box-shadow: var(--shadow_soft);
    pointer-events: none;
    font-family: var(--text_font);
    overflow: hidden;
}

/* Title */
.tooltip_title {
    position: relative;
    padding: 1vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--tooltip_title);
    font-family: var(--header_font);
    border-bottom: var(--border_dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Rarity Badge */
.tooltip_rarity {
    position: absolute;
    right: 1vh;
    top: 1vh;
    text-transform: uppercase;
    background: var(--tooltip_rarity_badge);
    color: var(--text_primary);
    border: var(--border_dark);
    padding: 0.3vh 0.5vh;
    font-size: 1vh;
    font-family: var(--text_font);
    box-shadow: var(--inset_shadow_large);
    white-space: nowrap;
}

/* Body */
.tooltip_body {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1vh;
    overflow-wrap: break-word;
}

/* Subtitles */
.tooltip_subtitle {
    position: relative;
    display: flex;
    margin: 1vh;
    border-bottom: var(--border_dashed);
    padding-left: 1vh;
}
.tooltip_subtitle::before {
    position: absolute;
    bottom: 0;
    left: 0;
    content: "";
    width: 0.3vh;
    height: 100%;
    background: var(--accent);
}

/* Description */
.tooltip_description {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 1vh;
    text-align: left;
    word-break: break-word;
    line-height: 1;
}
.tooltip_description p {
    margin: 0;
    color: var(--text_primary);
    overflow-wrap: break-word;
}

/* Values */
.tooltip_values {
    margin: 1vh;
}
.tooltip_values ul {
    padding: 0;
    margin: 0;
    list-style: none;
}
.tooltip_values ul li {
    display: flex;
    justify-content: space-between;
    gap: 1vh;
    word-break: break-word;
}

/* Actions */
.tooltip_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1vh;
    width: 100%;
    margin: 1vh;
}

/* Keys */
.tooltip_key_hint {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tooltip_key {
    box-shadow: var(--inset_shadow_large);
    background: var(--background_hover);
    border-radius: var(--border_radius_outer);
    padding: 0.3vh 1vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text_primary);
    opacity: 0.9;
    margin-right: 1vh;
    white-space: nowrap;
}
