/*
 * Compiled application.css
 */

@import url(https://fonts.googleapis.com/css?family=Maven+Pro:400,500,700,900);

/* --- Global Styles --- */
body { margin-top: 4rem; }
body::after { content: ''; display: block; height: 50px; }
code { display: block; white-space: pre-wrap; }

/* --- UI Components --- */
.filepond--file-action-button { cursor: pointer; }
#file-selector { box-shadow: inset 0 0.2rem 1rem rgba(0, 0, 0, 0.25); }
.filepond--panel-root { background-color: transparent; border: 1px dashed #2c3340; }
.hover-text-primary:hover { color: #1707ff; transition: color 0.8s; text-rendering: geometricPrecision; }
.hover-card:hover { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15); background-color: #fff3cd; transition: box-shadow 0.3s, background-color 0.3s; }

/* --- Layout & Responsiveness --- */
/* FIX: overflow visible is crucial here to stop the handle from being cut off */
#graph-1, #assignment-table-1, #assignments, #cluster-navigation-1 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: visible !important; 
    z-index: 1 !important;
}

#graph-1 .sv-wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important; 
}

#graph-1 .sv-wrapper > svg:first-child {
    width: 100% !important;
    max-width: 100% !important;
}

/* --- Assignment Table UI --- */
.jsv-assignment-table { border: 2px solid #333 !important; border-collapse: collapse !important; width: 100% !important; table-layout: auto; }
.jsv-assignment-table caption, .jsv-assignment-table-title, #assignments > h3, #assignments > h4, #assignments > .title { text-align: center !important; font-weight: bold; margin-bottom: 1rem; }
.jsv-assignment-table thead th { border: 1px solid #666 !important; background-color: #f8f9fa !important; padding: 5px 8px !important; font-weight: bold !important; text-align: center !important; }
.jsv-assignment-table tbody td { border: 1px solid #ddd !important; padding: 4px 8px !important; line-height: 1.3 !important; }
.jsv-assignment-table tbody tr:nth-child(even) { background-color: #f9f9f9 !important; }
.jsv-assignment-table tbody tr:nth-child(odd) { background-color: #ffffff !important; }
.jsv-assignment-table tbody tr:hover { background-color: #e9ecef !important; cursor: pointer; }
.jsv-assignment-table tbody tr.selected { background-color: #cce5ff !important; border: 2px solid #0066cc !important; }
#assignments { height: auto !important; overflow: visible !important; padding: 10px !important; }

/* --- Badges --- */
.jsv-badge { margin: 1px 4px !important; padding: 2px 8px !important; font-size: 11px !important; line-height: 1.2 !important; }
.peak-badge { margin: 1px 5px !important; padding: 2px 9px !important; display: inline-block !important; font-size: 12.5px !important; font-weight: 600 !important; }
.peak-badge + .peak-badge { margin-left: 6px !important; }
.atom-badge { padding: 2px 7px !important; margin: 1px 2px !important; font-size: 11px !important; }

/* --- JSV Controls & Zoombox Positioning --- */

/* 1. Menu/Controls - TOP CENTER */
.jsv-menu {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 300px !important; 
    top: 10px !important; 
    right: auto !important;
    margin: 0 !important;
    z-index: 20;
    /* FIX: Prevents clipping of the handle */
    overflow: visible !important; 
}

/* 2. Menu Handle - CENTERED WITH OFFSET */
.jsv-menu-handle {
    position: absolute !important;
    left: 50% !important;
    
    /* FIX: Positioned to sit exactly on top of the menu bar */
    top: -12px !important; 
    
    /* FIX: Correct offset for a 40px wide button (half of 40 = 20) */
    margin-left: -20px !important; 
    
    /* FIX: Match the dimensions of the SVG (40x12) to avoid squashing */
    width: 40px !important;
    height: 12px !important;
    
    padding: 0 !important;
    z-index: 25;
    
    transform: translateX(-50%) !important; 
    right: auto !important;
    overflow: visible !important;
}

/* Ensure handle SVG isn't clipped */
.jsv-menu-handle svg {
    width: 40px !important;
    height: 12px !important;
    display: block !important;
    overflow: visible !important;
}

/* 3. Zoombox - TOP RIGHT */
#graph-1 .sv-wrapper svg[width="176.5"] {
    position: absolute !important;
    left: auto !important; 
    right: 10px !important;
    top: 10px !important; 
    width: 176.5px !important;
    height: 61px !important;
    min-width: 176.5px !important;
    display: block !important;
    flex: none !important;
    transform: none !important; 
    z-index: 15;
}

.jsv-zoombox, .zoombox, .sv-zoombox {
    position: absolute !important;
    right: 10px !important;
    left: auto !important;
    top: 10px !important; 
    width: 176.5px !important;
}

/* ============================================
   JSV POPUP DIALOGS (Outer Styling)
   ============================================ */

.jsv-dialog {
    /* 1. Force Absolute Positioning */
    position: absolute !important;
    top: 60px !important; /* Sits just below the menu */
    left: 50% !important;
    transform: translateX(-50%) !important; /* Centers it horizontally */
    
    /* 2. Visual Styling */
    background-color: white !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
    
    /* 3. Visibility */
    z-index: 1000 !important; 
    margin: 0 !important;
}

/* Dialog Header */
.jsv-dialog-header {
    background-color: #f1f3f4 !important;
    color: #333 !important;
    font-weight: bold !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid #ddd !important;
    border-radius: 8px 8px 0 0 !important;
}

/* Dismiss 'X' Button */
.jsv-dialog-dismiss {
    position: absolute !important;
    top: 10px !important;
    right: 15px !important;
    font-family: sans-serif !important;
    font-weight: bold !important;
    color: #888 !important;
    cursor: pointer !important;
    background: none !important;
    border: none !important;
}

.jsv-dialog-dismiss:hover { color: #d93025 !important; }

/* Dialog Contents Container */
.jsv-dialog-contents { padding: 15px !important; }

/* Ensure the buttons inside the svg menu are clickable */
.jsv-menu-button { cursor: pointer !important; pointer-events: all !important; }

/* ============================================
   JSV POPUP DIALOGS (Internal Styling)
   ============================================ */

/* Headers & Tables */
.jsv-dialog h3 { font-size: 1.1rem !important; margin-top: 15px !important; margin-bottom: 5px !important; font-weight: bold; }
.jsv-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 0.9rem; }
.jsv-table th, .jsv-table td { border: 1px solid #ddd; padding: 4px 8px; text-align: left; }
.jsv-table th { background-color: #f8f9fa; font-weight: bold; }

/* Settings Layout */
.jsv-scroll { overflow-y: auto !important; overflow-x: hidden !important; }

/* Layout: Forces side-by-side label and input */
.jsv-settings div { 
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    padding: 8px 0 !important; 
    border-bottom: 1px solid #eee !important; 
}
.jsv-settings div:last-child { border-bottom: none !important; }

/* Form Elements */
.jsv-label { font-weight: 500; font-size: 0.95rem; }
.jsv-input-group { display: flex; align-items: center; }
.jsv-input[type="text"] { width: 60px; padding: 2px 5px; border: 1px solid #ccc; border-radius: 3px; text-align: right; }
.jsv-input-addon { margin-left: 5px; color: #666; font-size: 0.9rem; }
.jsv-alert { background-color: #fff3cd; color: #856404; padding: 8px; border-radius: 4px; font-size: 0.85rem; margin-bottom: 10px; line-height: 1.4; border: 1px solid #ffeeba; }

/* Footer & Buttons */
.jsv-dialog-footer {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 45px; padding: 0 15px;
    background-color: #f8f9fa; border-top: 1px solid #ddd; border-radius: 0 0 8px 8px;
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
}

.jsv-button {
    padding: 4px 12px; font-size: 0.9rem; border-radius: 4px; border: 1px solid #ccc;
    background-color: white; cursor: pointer; transition: background 0.2s;
}
.jsv-button:hover { background-color: #e2e6ea; }