/* ============================================================================
   av-heatmap.css — Modulo CSS estratto da av.html
   AIVEK Vision — Generato automaticamente
   ============================================================================ */

/* ========================================
   INSIGHT HEATMAP DRAWER STYLES
   ======================================== */

/* Trigger icon (mock) - positioned top right */
#menuDotsHeatmap {
    position: fixed;
    top: 18px;
    right: 60px;
    z-index: 1050;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c3e50 100%);
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e6e6e6;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#menuDotsHeatmap:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
#menuDotsHeatmap:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Overlay backdrop */
#heatmapOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#heatmapOverlay.open {
    opacity: 1;
    visibility: visible;
}

/* Heatmap Drawer - sliding panel from right */
#heatmapDrawer {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    max-width: 100vw;
    height: 100%;
    background: linear-gradient(180deg, #0a0f1a 0%, #0d1421 50%, #111827 100%);
    border-left: 1px solid #1e3a5f;
    z-index: 1200;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.6);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow: hidden;
}
#heatmapDrawer.open {
    right: 0;
}

/* Drawer Header */
.heatmap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(90deg, #1e3a5f 0%, #2c4a6e 100%);
    border-bottom: 1px solid #2a4a6e;
    flex-shrink: 0;
}
.heatmap-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.5px;
}
.heatmap-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #e6e6e6;
    font-size: 20px;
    transition: background 0.2s ease, transform 0.2s ease;
}
.heatmap-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}
.heatmap-close-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Drawer Body - scrollable */
.heatmap-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Summary Cards Section */
.heatmap-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.heatmap-metric-card {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.6) 0%, rgba(44, 74, 110, 0.4) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.heatmap-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}
.heatmap-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
    margin-bottom: 6px;
}
.heatmap-metric-label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

/* Heatmap Canvas Container */
.heatmap-canvas-container {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid #1e3a5f;
    border-radius: 12px;
    padding: 16px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#heatmapCanvas {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 8px;
}
.heatmap-canvas-placeholder {
    color: #6b7280;
    font-size: 14px;
    text-align: center;
}
.heatmap-canvas-placeholder i {
    display: block;
    font-size: 40px;
    margin-bottom: 12px;
    color: #374151;
}

/* Cognitive Touches List - Collapsible */
.heatmap-touches-section {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid #1e3a5f;
    border-radius: 12px;
    overflow: hidden;
}
.heatmap-touches-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: rgba(30, 58, 95, 0.4);
    cursor: pointer;
    transition: background 0.2s ease;
}
.heatmap-touches-header:hover {
    background: rgba(30, 58, 95, 0.6);
}
.heatmap-touches-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}
.heatmap-touches-toggle {
    color: #9ca3af;
    font-size: 12px;
    transition: transform 0.3s ease;
}
.heatmap-touches-toggle.collapsed {
    transform: rotate(-90deg);
}
.heatmap-touches-list {
    max-height: 300px;
    overflow-y: auto;
    transition: max-height 0.3s ease;
}
.heatmap-touches-list.collapsed {
    max-height: 0;
    overflow: hidden;
}
.heatmap-touch-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.5);
    transition: background 0.2s ease;
}
.heatmap-touch-item:last-child {
    border-bottom: none;
}
.heatmap-touch-item:hover {
    background: rgba(59, 130, 246, 0.05);
}
.heatmap-touch-agent {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}
.heatmap-touch-content {
    flex: 1;
    min-width: 0;
}
.heatmap-touch-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.heatmap-touch-confidence {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.heatmap-touch-snippet {
    font-size: 13px;
    color: #9ca3af;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Drawer Footer - Action Buttons */
.heatmap-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(180deg, transparent 0%, rgba(17, 24, 39, 0.9) 100%);
    border-top: 1px solid #1e3a5f;
    flex-shrink: 0;
}
.heatmap-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.heatmap-btn-export {
    background: linear-gradient(135deg, #1e3a5f 0%, #2c4a6e 100%);
    color: #e5e7eb;
    border: 1px solid #3b82f6;
}
.heatmap-btn-export:hover {
    background: linear-gradient(135deg, #2c4a6e 0%, #3b5998 100%);
    transform: translateY(-1px);
}
.heatmap-btn-export:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
.heatmap-btn-close {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
    border: 1px solid #374151;
}
.heatmap-btn-close:hover {
    background: rgba(107, 114, 128, 0.3);
    color: #e5e7eb;
}
.heatmap-btn-close:focus {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}

/* Responsive adjustments for Heatmap Drawer */
@media (max-width: 520px) {
    #heatmapDrawer {
        width: 100vw;
        right: -100vw;
    }
    .heatmap-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .heatmap-metric-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 14px 16px;
    }
    .heatmap-metric-value {
        font-size: 24px;
        margin-bottom: 0;
        order: 2;
    }
    .heatmap-metric-label {
        order: 1;
    }
    .heatmap-footer {
        flex-wrap: wrap;
    }
    .heatmap-btn {
        flex: 1 1 calc(50% - 6px);
    }
    .heatmap-btn-close {
        flex: 1 1 100%;
    }
}

