/* ==========================================
   TERMINAL STYLES
   ========================================== */

.terminal-container {
    background: #000000;
    border: 1px solid #333333;
    padding: 1%;
    height: 50vh;
    min-height: 300px;
    max-height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#terminal {
    height: 100%;
}

/* Terminal Tabs */
.terminal-tabs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333333;
    background: #111111;
    overflow-x: auto;
    justify-content: space-between;
    min-height: 44px;
}

.terminal-tabs-container {
    display: flex;
    overflow-x: auto;
    flex: 1;
    min-width: min-content;
}

.terminal-add-tab-btn {
    padding: 8px 16px;
    background: #222222;
    border: 1px solid #333333;
    border-bottom: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    min-width: 50px;
    min-height: 44px;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Courier New', 'Monaco', monospace;
}

.terminal-add-tab-btn:hover {
    background: #2a2a2a;
    border-color: #555555;
}

.terminal-fullscreen-btn {
    padding: 8px 16px;
    background: #222222;
    border: 1px solid #333333;
    border-bottom: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    min-width: 50px;
    min-height: 44px;
    text-align: center;
    transition: all 0.3s ease;
    font-family: 'Courier New', 'Monaco', monospace;
}

.terminal-fullscreen-btn:hover {
    background: #2a2a2a;
    border-color: #555555;
}

.terminal-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #222222;
    border: 1px solid #333333;
    border-bottom: none;
    color: #cccccc;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    position: relative;
    margin-right: 4px;
    min-height: 44px;
    min-width: 44px;
}

.terminal-tab:hover {
    background: #2a2a2a;
}

.terminal-tab.active {
    background: #000000;
    color: #ffffff;
    border-color: #555555;
}

.terminal-tab-close {
    margin-left: 8px;
    color: #888888;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.terminal-tab-close:hover {
    color: #ffffff;
}

.terminal-content {
    position: relative;
    flex: 1 1 auto;
    min-height: 0; /* allow flex child to shrink so scrolling works */
}

/* removed idle lock overlay */

/* Toolbar */
.terminal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 8px;
    background: #111111;
    border-left: 1px solid #333333;
    border-right: 1px solid #333333;
}

.terminal-search {
    display: flex;
    align-items: center;
    gap: 6px;
}

.terminal-search input[type="text"] {
    background: #222222;
    border: 1px solid #333333;
    color: #ffffff;
    padding: 6px 8px;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 12px;
    min-width: 180px;
}

.terminal-settings {
    display: flex;
    align-items: center;
    gap: 6px;
}

.terminal-btn {
    padding: 6px 10px;
    background: #222222;
    border: 1px solid #333333;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Courier New', 'Monaco', monospace;
}

.terminal-btn:hover {
    background: #2a2a2a;
    border-color: #555555;
}

/* Tab color labels */
.terminal-tab.color-red { border-top: 2px solid #ff4d4d; }
.terminal-tab.color-green { border-top: 2px solid #4dff88; }
.terminal-tab.color-blue { border-top: 2px solid #4da6ff; }
.terminal-tab.color-yellow { border-top: 2px solid #ffd24d; }

/* Pin icon spacing */
.terminal-tab .pin-icon {
    margin-left: 6px;
    font-size: 12px;
    color: #999999;
}

.terminal-tab.pinned {
    background: #1a1a1a;
}

@media (max-width: 768px) {
    .terminal-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .terminal-search input[type="text"] {
        min-width: 140px;
    }
}

.terminal-content .terminal {
    width: 100%;
    height: 100%;
}

/* Fullscreen terminal styles */
.terminal-fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.terminal-fullscreen-mode .terminal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000000;
}

.terminal-fullscreen-mode .terminal-content {
    flex: 1;
    height: 100%;
}

.terminal-fullscreen-mode .terminal-tabs {
    border-bottom: 2px solid #333333;
}

/* Responsive Terminal */
@media (max-width: 1200px) {
    .terminal-container {
        height: 45vh;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .terminal-container {
        height: 40vh;
        min-height: 200px;
        padding: 0.8%;
    }
    
    #terminal {
        font-size: 11px;
    }
    
    .terminal-tab {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .terminal-add-tab-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .terminal-container {
        height: 35vh;
        min-height: 150px;
        padding: 0.5%;
        padding: 8px;
    }
    
    #terminal {
        font-size: 10px;
    }
    
    .terminal-tab {
        padding: 5px 10px;
        font-size: 10px;
        flex-shrink: 0;
        padding: 8px 12px;
    }
    
    .terminal-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .terminal-add-tab-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .terminal-tab-close {
        font-size: 18px;
        min-width: 24px;
        min-height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .terminal-container {
        height: 30vh;
        min-height: 200px;
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .terminal-container {
        height: 25vh;
        min-height: 150px;
    }
}


