/* blue-palette.css - стили для интерактивной палитры оттенков синего */

/* Базовые стили (для десктопа) */
#blue-palette-container table.color-palette {
    border-collapse: collapse;
    width: 100%;
    min-width: 950px;
    table-layout: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 100, 0.1);
}

#blue-palette-container table.color-palette th,
#blue-palette-container table.color-palette td {
    border: 1px solid #e0e0e0;
    height: 40px;
    min-height: 25px;
    position: relative;
    padding: 0;
    line-height: 1;
}

#blue-palette-container table.color-palette .color-cell {
    width: 100%;
    height: 100%;
    min-height: 25px;
    display: block;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#blue-palette-container table.color-palette .color-cell:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

#blue-palette-container table.color-palette .color-tooltip {
    visibility: hidden;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #eee; /* ИЗМЕНЕНО: было #333 */
    color: #333; /* ИЗМЕНЕНО: было white */
    text-align: center;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#blue-palette-container table.color-palette .color-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #eee transparent transparent transparent; /* ИЗМЕНЕНО: было #333 */
}

#blue-palette-container table.color-palette .color-cell:hover .color-tooltip {
    visibility: visible;
    opacity: 0.95;
}

#blue-palette-container table.color-palette .row-header {
    background-color: #f8f9fa;
    color: #555;
    font-weight: bold;
    text-align: center;
    font-size: 0.85em;
    width: 40px;
    padding: 5px;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ - ПЕРЕДЕЛАННАЯ ===== */
@media (max-width: 768px) {
    #blue-palette-container {
        margin: 10px -10px;
        overflow-x: auto;
        position: relative;
    }
    
    #blue-palette-container table.color-palette {
        min-width: 1100px;
        border-spacing: 0;
    }
    
    /* СКРЫВАЕМ ВСЕ ЗАГОЛОВОЧНЫЕ СТРОКИ НА МОБИЛЬНЫХ! */
    #blue-palette-container table.color-palette tr:first-child,
    #blue-palette-container table.color-palette tr:nth-child(2) {
        display: none !important;
    }
    
    /* ДЕЛАЕМ ЯЧЕЙКИ ДОСТАТОЧНО БОЛЬШИМИ ДЛЯ ПАЛЬЦЕВ */
    #blue-palette-container table.color-palette th,
    #blue-palette-container table.color-palette td {
        height: 50px;
        min-height: 50px;
        border: 1px solid #d0d0d0;
    }
    
    #blue-palette-container table.color-palette .color-cell {
        min-height: 50px;
    }
    
    /* ЗАГОЛОВКИ СТРОК - ДЕЛАЕМ ИХ КОМПАКТНЫМИ И ПОЛЕЗНЫМИ */
    #blue-palette-container table.color-palette .row-header {
        font-size: 0.75em;
        width: 30px;
        padding: 5px 2px;
        height: 50px;
        background-color: #f0f5ff;
        color: #1a3d7c;
        font-weight: bold;
        position: sticky;
        left: 0;
        z-index: 5;
        border-right: 2px solid #a3c1e0;
    }
    
    /* ПОДСКАЗКИ ДЛЯ МОБИЛЬНЫХ - БОЛЬШЕ И УДОБНЕЕ */
    #blue-palette-container table.color-palette .color-tooltip {
        font-size: 13px;
        padding: 10px 15px;
        max-width: 250px;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.4;
        bottom: 105%;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        background-color: #eee; /* ИЗМЕНЕНО: для мобильных тоже */
        color: #333; /* ИЗМЕНЕНО: для мобильных тоже */
        border: 1px solid #bbb;
    }
    
    #blue-palette-container table.color-palette .color-tooltip::after {
        border-color: #eee transparent transparent transparent; /* ИЗМЕНЕНО: для мобильных */
    }
    
    /* ТАП-ЭФФЕКТ ДЛЯ МОБИЛЬНЫХ */
    #blue-palette-container table.color-palette .color-cell:active {
        transform: scale(0.96);
        box-shadow: 0 0 10px rgba(0, 0, 100, 0.3);
        border-radius: 4px;
    }
    
    /* ФИКСИРУЕМ ПЕРВЫЙ СТОЛБЕЦ (НОМЕРА СТРОК) */
    #blue-palette-container table.color-palette td:first-child {
        position: sticky;
        left: 0;
        background-color: #f0f5ff;
        z-index: 2;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    #blue-palette-container table.color-palette th,
    #blue-palette-container table.color-palette td {
        height: 45px;
        min-height: 45px;
    }
    
    #blue-palette-container table.color-palette .color-cell {
        min-height: 45px;
    }
    
    #blue-palette-container table.color-palette .row-header {
        font-size: 0.7em;
        width: 28px;
        padding: 8px 1px;
        height: 45px;
    }
    
    #blue-palette-container table.color-palette .color-tooltip {
        font-size: 12px;
        padding: 8px 12px;
        max-width: 220px;
        background-color: #eee; /* ИЗМЕНЕНО: для маленьких экранов */
        color: #333; /* ИЗМЕНЕНО: для маленьких экранов */
    }
}

/* Анимации */
#blue-palette-container table.color-palette .color-cell {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}