#result-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 480px;          /* default width */
    min-width: 320px;
    max-width: 90vw;
    background: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;       /* the inner content scrolls, not the whole panel */
}

#result-panel-header {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#result-panel-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px;
}

#result-panel-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 1001;
}

#result-panel-resize-handle:hover,
#result-panel-resize-handle.resizing {
    background: rgba(0, 0, 0, 0.08);
}

body.panel-resizing {
    user-select: none;      /* prevents text selection while dragging */
    cursor: col-resize;
}

#result-panel-actions {
    display: flex;
    gap: 4px;
}

#result-panel-minimize,
#result-panel-close {
    border: none;
    /*background: transparent;*/
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Minimized state: hide the panel entirely */
#result-panel.minimized {
    display: none;
}

/* The floating restore button */
#result-panel-restore {
    display: none; /* shown only while minimized */
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    background: #2d6cdf;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 18px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

#result-panel-restore:hover {
    background: #245bb8;
}

#result-panel-restore.visible {
    display: block;
}