.container {
    display: flex;
    flex-direction: column;
    width: 50%;
    height: 100vh;
}
.file-bar {
    background: #2d2d30;
    min-height: 35px;
    display: flex;
    align-items: center;
    overflow: hidden; /* prevent the bar itself from growing */
}

/* file scroll tabs */
.file-tab-scroll {
    display: flex;
    align-items: center;
    overflow-x: auto;
    flex: 1; /* take all space left of the buttons */
    min-width: 0; /* allow flex item to shrink below content size */
    scrollbar-width: none; /* Firefox: hide scrollbar */
}
.file-tab-scroll::-webkit-scrollbar {
    display: none; /* Chrome/Safari: hide scrollbar */
}
.file-tab {
    padding: 8px 16px;
    color: #969696;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid #1e1e1e;
    white-space: nowrap;
    transition:
        background 0.15s,
        color 0.15s;
    user-select: none;
}
.file-tab.active {
    background: #1e1e1e;
    color: #fff;
    border-bottom: 2px solid #0e639c;
}
.file-tab:hover {
    background: #37373d;
    color: #ccc;
}
.file-icon {
    font-size: 14px;
}

/* buttons */
.file-bar-actions {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 8px;
    flex-shrink: 0; /* never shrink — always visible */
    background: #2d2d30;
}
.run-button {
    margin-left: auto;
    padding: 6px 16px;
    background: #0e639c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.run-button:hover {
    background: #1177bb;
}
.run-button:hover:not(:disabled) {
    background: #1177bb;
}
.run-button:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

.stop-button {
    margin-left: 5px;
    padding: 6px 16px;
    background: #d13438;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stop-button:hover {
    background: #e81123;
}
.stop-button:hover:not(:disabled) {
    background: #e81123;
}
.stop-button:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}

/* build and serial output */
.build-output {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e1e1e;
    border-top: 1px solid #007acc;
    max-height: 250px;
    overflow-y: auto;
    padding: 12px;
    color: #ccc;
    font-family: "Courier New", monospace;
    font-size: 14px;
    white-space: pre-wrap;
    display: none;
    z-index: 10;
}

.build-output.show {
    display: block;
}

.build-output .stdout {
    color: #4ec9b0;
}

.build-output .stderr {
    color: #f48771;
}

.build-output .success {
    color: #89d185;
}

.close-output {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
}

.close-output:hover {
    color: #fff;
}

#editor {
    flex: 1;
    width: 100%;
    z-index: 1;
}

#realtimeRatio {
    position: absolute;
    flex: 1;
    z-index: 2;
    top: 30px;
    right: 10px;
    color: green;
    visibility: visible;
    font-size: 13px;
}

/* ── Serial Monitor Input Bar ─────────────────────────── */
.serial-input-bar {
    position: absolute;
    display: flex;
    bottom: 0;
    left: 0;
    right: 0;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-top: 1px solid #2d2d30;
    background: #1e1e1e;
    z-index: 11;
}

.serial-input {
    flex: 1;
    background: #2d2d30;
    color: #d4d4d4;
    border: 1px solid #3e3e42;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 13px;
    font-family: "Courier New", monospace;
    height: 28px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
    caret-color: #007acc;
}

.serial-input::placeholder {
    color: #555;
}

.serial-input:focus {
    border-color: #007acc;
}

.serial-send {
    background: #0e639c;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 0 14px;
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: 0.02em;
    transition: background 0.15s;
}

.serial-send:hover {
    background: #1177bb;
}

.serial-send:active {
    background: #0a4f7e;
}

/* ── Collaboration Logos ─────────────────────────── */
.header-logos {
    position: absolute;
    top: 0px; /* Adjust as needed for vertical alignment with other elements */
    right: 0px;
    display: flex;
    align-items: center;
    z-index: 3; /* Higher z-index to ensure it's on top */
    height: 24px;
    flex-direction: row;
}

#petoi-logo-container {
    display: flex;
    background-color: white;
}

#petoi-logo-img {
    display: flex;
    align-items: center;
    height: 24px; /* Match the height of the APE logo text */
    width: auto; /* Maintain aspect ratio */
    cursor: pointer;
}

.collaboration-separator {
    align-items: center;
    font-size: 14px;
    font-weight: bold;
    color: #ccc; /* A neutral color */
    margin: 0 5px; /* Small horizontal space */
}

/* Modify existing APE logo style */
#ape-logo {
    display: flex;
    align-items: center;
    height: 24px;
    font-size: 16px; /* Slightly larger to match potential image height */
    font-weight: bold;
    color: #007acc; /* A common blue from the project's theme */
    text-decoration: none;
    transition: color 0.2s;
    background-color: white;
    padding: 0px 5px;
}

#ape-logo a {
    color: inherit; /* Inherit color from parent */
    text-decoration: none; /* Remove underline from link */
}

#ape-logo a:hover {
    color: #1177bb; /* Slightly lighter blue on hover */
    text-decoration: underline; /* Add underline on hover for clarity */
}
