@charset "UTF-8";
/* ============================================================
   FLOATING LOG WINDOW
   Draggable, resizable floating panel for communication log
   Uses theme CSS variables for colors

   Theme variables used (defined in theme files):
   --log-bg, --log-titlebar-bg, --log-border
   --log-text, --log-text-muted
   --log-outbound, --log-inbound, --log-state-transition
   --log-success, --log-error
   ============================================================ */

.floating-log {
    position: fixed;
    bottom: 80px;
    left: 80px;
    width: 650px;
    height: 250px;
    min-width: 400px;
    min-height: 150px;
    display: none;
    flex-direction: column;
    background: var(--log-bg);
    border: 1px solid var(--log-border);
    border-radius: var(--log-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 9999;
    resize: both;
    overflow: hidden;
}

.floating-log.visible {
    display: flex;
}

/* ------------------------------------------------------------
   Titlebar - draggable handle
   ------------------------------------------------------------ */
.floating-log-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--log-titlebar-bg);
    border-bottom: 1px solid var(--log-titlebar-bg);
    cursor: move;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
}

.floating-log-title {
    font-weight: 600;
    font-size: 12px;
    color: var(--log-text);
}

/* Toolbar buttons */
.floating-log-titlebar .btn {
    background: var(--btn-log-bg);
    color: var(--btn-log-icon);
    border: none;
    border-radius: var(--btn-log-radius);
    padding: 4px 10px;
    height: 18px;
    font-size: 10px;
    min-width: auto;
    cursor: pointer;
    box-shadow: var(--btn-log-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.floating-log-titlebar .btn:hover {
    background: var(--btn-log-bg-hover);
    box-shadow: var(--btn-log-shadow-hover);
}

/* Close button - square */
.btn-close-float {
    width: 18px;
    padding: 2px 0 0 1px !important;
    font-size: 15px !important;
    font-weight: 400;
}

/* Auto-scroll toggle button */
.btn-auto-scroll {
    background: var(--btn-log-bg) !important;
    color: var(--btn-log-icon) !important;
}

.btn-auto-scroll:hover {
    background: var(--btn-log-bg-hover) !important;
}

.btn-auto-scroll.paused {
    background: var(--status-error) !important;
    color: white !important;
}

.btn-auto-scroll.paused:hover {
    background: #8b1515 !important;
}

/* Spacer to push buttons right */
.titlebar-spacer {
    flex: 1;
}

/* ------------------------------------------------------------
   Log content area
   ------------------------------------------------------------ */
.floating-log-content {
    flex: 1;
    overflow-y: scroll;
    padding: 8px 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.5;
    background: var(--log-bg);
}

/* Custom scrollbar */
.floating-log-content::-webkit-scrollbar {
    width: 12px;
}

.floating-log-content::-webkit-scrollbar-track {
    background: var(--log-scrollbar-track);
}

.floating-log-content::-webkit-scrollbar-thumb {
    background: var(--log-scrollbar);
    border-radius: var(--log-scrollbar-radius);
}

.floating-log-content::-webkit-scrollbar-thumb:hover {
    background: var(--log-scrollbar-hover);
}

/* ------------------------------------------------------------
   Log entries - use theme variables
   ------------------------------------------------------------ */
.log-entry {
    white-space: pre;
    color: var(--log-inbound);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.log-entry.outbound {
    color: var(--log-outbound);
}

.log-entry.state-transition {
    color: var(--log-state-transition);
}

.log-entry.success-msg {
    color: var(--log-success);
}

.log-entry.error-msg {
    color: var(--log-error);
}

/* ------------------------------------------------------------
   Resize handle hint
   ------------------------------------------------------------ */
.floating-log::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(200,212,224,0.3) 50%);
    border-radius: 0 0 5px 0;
}

/* ------------------------------------------------------------
   Status bar clickable toggle
   ------------------------------------------------------------ */
.status-clickable {
    cursor: pointer;
}
