/* Symbol Explanations Panel */
#symbol_explanations_panel {
    position: absolute;
    top: 20vh; /* Positioned above face panel which has height: 40vh */
    left: 0;
    width: 19vw; /* Same width as face panel */
    max-height: 50vh; /* Limit maximum height */
    box-sizing: border-box;
    z-index: 10006; /* Above upgrade cards which have z-index up to 10005 */
    pointer-events: none; /* Allow clicks to pass through when empty */
}

#symbol_explanations_content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Scrollbar styling similar to game logs */
#symbol_explanations_content::-webkit-scrollbar {
    width: 4px;
}

#symbol_explanations_content::-webkit-scrollbar-track {
    background: transparent;
}

#symbol_explanations_content::-webkit-scrollbar-thumb {
    background-color: rgba(214, 214, 214, 0.3);
    border-radius: 2px;
}

#symbol_explanations_content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(214, 214, 214, 0.5);
}

/* Individual symbol explanation entry */
.symbol_explanation_entry {
    padding: 6px 8px;
    border-radius: 8px;
    /* background: rgba(255, 255, 255, 0.1); */
    background: rgba(59, 58, 75, 0.7);
    /* background: rgba(0, 0, 0, 0.5); */
    backdrop-filter: blur(2px);
    font-size: 0.75em;
    line-height: 1.4;
    border-left: 2px solid rgba(0, 120, 200, 0.3);
    transition: all 0.2s ease;
}

.symbol_explanation_entry::after {
    border-radius: 8px;
}

.symbol_explanation_entry img {
    font-size: 1.2em !important;
}

.symbol_explanation_entry:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(2px);
    border-left-color: rgba(0, 120, 200, 0.5);
}

/* Symbol header with icon and name */
.symbol_explanation_header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    font-weight: 600;
    color: rgba(0, 60, 120, 0.9);
}

.symbol_explanation_header img {
    width: 1.2em;
    height: 1.2em;
    vertical-align: middle;
}

/* Symbol description text */
.symbol_explanation_text {
    /* color: rgba(0, 0, 0, 0.75); */
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2em;
    white-space: pre-line; /* Preserve line breaks */
}

.symbol_explanation_text img {
    width: 1.1em;
    height: 1.1em;
    vertical-align: middle;
    margin: 0 2px;
}

/* Hide panel when empty */
#symbol_explanations_panel.empty {
    display: none;
}

/* Fade in animation */
#symbol_explanations_panel.visible {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effect for symbol images in skill descriptions */
.hoverable-symbol {
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-block;
}

.hoverable-symbol:hover {
    transform: scale(1.2);
    filter: drop-shadow(0 0 4px rgba(255, 255, 100, 0.8));
}