﻿/* Indicator Dropdown Styles */
.indicator-dropdown {
    position: relative;
    display: inline-block;
}

.indicator-menu {
    position: fixed;
    top: auto;
    left: auto;
    min-width: 280px;
    max-width: 350px;
    max-height: 500px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categoria espandibile */
.indicator-category-expandable {
    border-bottom: 1px solid #f0f0f0;
}

    .indicator-category-expandable:last-child {
        border-bottom: none;
    }

.category-header-expandable {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 12px;
    color: #424242;
    background: #f8f9fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

    .category-header-expandable:hover {
        background: #e9ecef;
    }

    .category-header-expandable i {
        font-size: 10px;
        color: #666;
        transition: transform 0.2s ease;
    }

.category-count {
    margin-left: auto;
    font-size: 11px;
    color: #757575;
    font-weight: 500;
}

.category-items-expandable {
    padding: 4px 0;
    background: #fafafa;
    animation: expandDown 0.2s ease-out;
}

@keyframes expandDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 1000px;
    }
}

.indicator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 8px 32px; /* Indentazione per sotto-item */
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 8px;
}

    .indicator-item:hover {
        background: #e3f2fd;
    }

    .indicator-item:active {
        background: #bbdefb;
    }

/* Font più piccolo per i nomi degli indicatori */
.indicator-name-small {
    flex: 1;
    font-size: 12px;
    color: #424242;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.indicator-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.indicator-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    font-size: 9px;
}

    .indicator-badge.off-chart {
        background: #e3f2fd;
        color: #1976d2;
    }

    .indicator-badge.signals {
        background: #fff3e0;
        color: #f57c00;
    }

.indicator-loading,
.indicator-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: #9e9e9e;
    gap: 12px;
}

    .indicator-loading i,
    .indicator-empty i {
        font-size: 24px;
    }

    .indicator-loading span,
    .indicator-empty span {
        font-size: 13px;
    }

/* Scrollbar personalizzata per il menu */
.indicator-menu::-webkit-scrollbar {
    width: 6px;
}

.indicator-menu::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 0 8px 8px 0;
}

.indicator-menu::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 3px;
}

    .indicator-menu::-webkit-scrollbar-thumb:hover {
        background: #9e9e9e;
    }

/* Stile per il bottone attivo */
.toolbar-btn.active {
    background: #e3f2fd;
    color: #1976d2;
}

/* Responsive */
@media (max-width: 768px) {
    .indicator-menu {
        min-width: 250px;
        max-width: 300px;
        max-height: 400px;
    }

    .indicator-name-small {
        font-size: 11px;
    }
}
