/**
 * DebugKit Toolbar Display Fixes
 * Ensures the debug toolbar is visible and properly positioned
 */

/* Ensure DebugKit toolbar is visible and positioned correctly */
#debug-kit-toolbar,
script[id="__debug_kit"] {
    z-index: 999999 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure toolbar panels are visible */
#debug-kit-toolbar .debug-kit-toolbar {
    display: flex !important;
    align-items: center !important;
    height: auto !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
}

/* DebugKit panel styling */
#debug-kit-toolbar .debug-kit-panel-button {
    background: transparent !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding: 3px 8px !important;
    margin: 0 2px !important;
    font-size: 11px !important;
    cursor: pointer !important;
    display: inline-block !important;
}

#debug-kit-toolbar .debug-kit-panel-button:hover {
    background: #333 !important;
    border-color: #666 !important;
}

/* Panel content containers */
.debug-kit-panel {
    position: fixed !important;
    bottom: 30px !important;
    left: 0 !important;
    right: 0 !important;
    height: 400px !important;
    background: #fff !important;
    border-top: 2px solid #000 !important;
    z-index: 999998 !important;
    overflow: auto !important;
    display: none !important;
}

.debug-kit-panel.debug-kit-panel-active {
    display: block !important;
}

/* Adjust main content to account for debug bar */
body.debug-kit-toolbar-attached {
    margin-bottom: 30px !important;
}

/* Fix for any container conflicts */
.lyk-container,
.lyk-main,
.lyk-footer {
    margin-bottom: 30px !important;
}

/* Make sure scrollbars don't interfere */
html, body {
    padding-bottom: 30px !important;
}

/* DebugKit SQL panel specific fixes */
.debug-kit-sql-log table {
    width: 100% !important;
    font-size: 11px !important;
}

.debug-kit-sql-log th,
.debug-kit-sql-log td {
    padding: 4px 8px !important;
    border: 1px solid #ddd !important;
}

/* Make sure the toolbar is above everything */
.debug-kit-toolbar,
.debug-kit-panel {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Hide any conflicting elements that might overlay the toolbar */
.lyk-footer {
    margin-bottom: 35px !important;
}

/* Emergency fallback - if nothing else works, at least show the button */
.debug-kit-toolbar-handle {
    position: fixed !important;
    bottom: 0 !important;
    right: 20px !important;
    z-index: 999999 !important;
    background: #f00 !important;
    color: #fff !important;
    padding: 5px 10px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    border-radius: 3px 3px 0 0 !important;
}