/* ===== Golden Layout Overrides ===== */

/* Container fills below navbar */
#gl-container {
    height: calc(100vh - 40px);
    width: 100%;
}

/* Tab bar styling */
.lm_header {
    height: 32px !important;
}

.lm_tabs {
    height: 32px !important;
}

.lm_tab {
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    padding: 0 25px 0 10px !important;
    height: 28px !important;
    line-height: 28px !important;
    margin: 2px 1px 0 !important;
    border-radius: 3px 3px 0 0 !important;
    overflow: visible !important;
    position: relative !important;
}

.lm_tab .lm_title {
    font-size: 11px !important;
    line-height: 28px !important;
}

.lm_tab .lm_close_tab {
    top: 7px !important;
    right: 6px !important;
    width: 11px !important;
    height: 11px !important;
}

/* Header controls (maximize, close) — move below tab bar */
.lm_controls {
    top: 5px !important;
    right: 3px !important;
}

/* Active tab */
.lm_tab.lm_active {
    background: #fff !important;
    border-bottom: 2px solid #5755d9 !important;
}

/* Tab badges — custom, not using Spectre badges */
.pm-tab-badge {
    display: inline-block;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    padding: 0 4px;
    margin-left: 4px;
    position: relative;
    top: 0;
    vertical-align: baseline;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pm-tab-badge-error { background: #e74c3c; }
.pm-tab-badge-warning { background: #f39c12; }
.pm-tab-badge-info { background: #3498db; }
.pm-tab-badge-success { background: #27ae60; }

/* Suppress Spectre badge pseudo-elements inside GL tabs */
.lm_tab .badge::after,
.lm_tab [data-badge]::after,
.lm_tab.badge::after {
    display: none !important;
}

/* Content area */
.lm_content {
    overflow: auto;
    background: #fff;
}

/* Splitter */
.lm_splitter {
    background: #e0e0e0 !important;
}

.lm_splitter:hover {
    background: #5755d9 !important;
}

/* Header controls (close, maximize) */
.lm_controls > li {
    width: 16px !important;
    height: 16px !important;
}

/* Make the Ace editor fill its container */
.lm_content #editor {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Preview needs scroll */
.lm_content #panel-preview {
    height: 100%;
    overflow: auto;
}

/* Timeline needs full height */
.lm_content #timeline {
    height: 100%;
}

/* Kanban needs full height */
.lm_content .pm-kanban {
    height: 100%;
}

/* Properties scroll */
.lm_content .pm-properties-content {
    height: 100%;
    overflow: auto;
}

/* Schedule scroll */
.lm_content .pm-schedule-panel-content {
    height: 100%;
    overflow: auto;
}

/* Checklist scroll */
.lm_content .pm-checklist-content {
    height: 100%;
    overflow: auto;
}

/* Issues scroll */
.lm_content #panel-issues {
    height: 100%;
    overflow: auto;
}

/* Gantt container */
.lm_content .pm-gantt-container {
    height: 100%;
    position: relative;
}

/* Active Gantt mode button */
.pm-gantt-mode-active {
    background: #5755d9 !important;
    color: #fff !important;
    border-color: #5755d9 !important;
}

.pm-gantt-svg {
    overflow: visible;
}

/* Drop indicators */
.lm_dropTargetIndicator {
    outline: 2px dashed #5755d9 !important;
    background: rgba(87, 85, 217, 0.1) !important;
}

/* Maximised item */
.lm_maximised .lm_header {
    background: #5755d9 !important;
}

.lm_maximised .lm_tab.lm_active {
    border-bottom-color: #fff !important;
}

/* Budget scroll */
.lm_content .pm-budget-content {
    height: 100%;
    overflow: auto;
}

/* Mindmap scroll */
.lm_content .pm-mindmap-content {
    height: 100%;
    overflow: auto;
}
