/* Terminal / PowerShell Simulator Styles */

.terminal-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Terminal Window */
.terminal-window {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
}

/* PowerShell Theme */
.terminal-window.powershell {
    background: #012456;
}

.terminal-window.powershell .terminal-titlebar {
    background: #1e1e2e;
    border-bottom: 1px solid #333;
}

/* Mac Terminal Theme */
.terminal-window.mac-terminal {
    background: #1e1e1e;
}

.terminal-window.mac-terminal .terminal-titlebar {
    background: #3b3b3b;
}

.mac-terminal .terminal-line.prompt { color: #57c94a; }
.mac-terminal .terminal-line.output { color: #e0e0e0; }
.mac-terminal .terminal-prompt-text { color: #57c94a; }

/* Terminal Title Bar */
.terminal-titlebar {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    gap: 12px;
}

.terminal-titlebar .macos-traffic-lights {
    margin-right: 8px;
}

.terminal-title-text {
    font-size: 12px;
    color: #ccc;
    flex: 1;
    text-align: center;
}

.terminal-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 11px;
    color: #ddd;
}

.terminal-tab-icon {
    font-size: 12px;
}

/* Terminal Body */
.terminal-body {
    padding: 16px;
    min-height: 280px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
}

.terminal-body::-webkit-scrollbar { width: 8px; }
.terminal-body::-webkit-scrollbar-track { background: transparent; }
.terminal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* Terminal Output Lines */
.terminal-line {
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.prompt { color: #ffdd57; }
.terminal-line.output { color: #e0e0e0; }
.terminal-line.error { color: #ff6b6b; }
.terminal-line.success { color: #51cf66; }
.terminal-line.info { color: #74c0fc; }

/* PowerShell specific colors */
.powershell .terminal-line.prompt { color: #ffdd57; }
.powershell .terminal-line.output { color: #cccccc; }

/* Input Line */
.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.terminal-prompt-text {
    color: #ffdd57;
    font-size: 13px;
    white-space: nowrap;
    margin-right: 4px;
}

.powershell .terminal-prompt-text { color: #ffdd57; }

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Cascadia Code', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    outline: none;
    caret-color: #fff;
}

.terminal-input::placeholder { color: rgba(255,255,255,0.3); }

/* Blinking cursor indicator */
.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: rgba(255,255,255,0.8);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Command counter */
.terminal-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.command-counter {
    display: flex;
    align-items: center;
    gap: 4px;
}

.command-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
}

.command-dot.completed { background: #51cf66; }
.command-dot.current { background: #ffdd57; }

/* Terminal + MCQ Combined Layout */
.terminal-mcq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.terminal-mcq-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 13px;
}

.terminal-mcq-divider::before,
.terminal-mcq-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

/* Command hint */
.terminal-hint {
    padding: 8px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-top: 8px;
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* Drag and Drop Ordering Styles */
.ordering-container {
    max-width: 600px;
    margin: 0 auto;
}

.ordering-instructions {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ordering-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    counter-reset: step-counter;
}

.ordering-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
    user-select: none;
    counter-increment: step-counter;
}

.ordering-item:active { cursor: grabbing; }

.ordering-item:hover {
    border-color: #003366;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ordering-item.dragging {
    opacity: 0.5;
    border-color: #C5A03F;
    background: #fff8e1;
}

.ordering-item.drag-over {
    border-color: #003366;
    border-style: dashed;
    background: #f0f4f8;
}

.ordering-handle {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #bbb;
    font-size: 18px;
    flex-shrink: 0;
    cursor: grab;
}

.ordering-handle:active { cursor: grabbing; }

.ordering-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #003366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ordering-text {
    font-size: 14px;
    color: #1a1a2e;
    flex: 1;
}

/* Touch-friendly ordering for mobile */
@media (max-width: 768px) {
    .ordering-item {
        padding: 12px;
    }
    .ordering-text {
        font-size: 13px;
    }
}
