/* MS-DOS Prompt Home Page Styles */

/*
 * Lock page to the visible viewport (see visualViewport in script.js). Plain
 * 100vh jumps when the mobile OSK opens because vh ignores the keyboard.
 */
html {
    overflow: hidden;
    height: 100%;
    height: var(--app-height, 100dvh);
}

body {
    background-color: #000000;
    color: #cccccc;
    font-family: 'Courier New', monospace;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100%;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    overscroll-behavior: none;
}

.dos-container {
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dos-header {
    display: none;
}

.dos-header h1 {
    margin: 0;
    font-size: 1.2em;
    text-shadow: 0 0 5px #00ff00;
}

.dos-status {
    font-size: 0.9em;
}

.dos-terminal {
    flex: 1;
    padding: 10px;
    padding-bottom: 48px;
    overflow-y: auto;
    background-color: #000000;
    font-size: 14px;
    line-height: 1.4;
}

/*
 * Mobile OSK only appears for a focused editable field. This input mirrors the
 * current line; it is nearly invisible. font-size 16px avoids iOS zoom-on-focus.
 */
.terminal-input-capture {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    margin: 0;
    border: none;
    padding: 0 10px;
    opacity: 0.04;
    background: #000;
    color: transparent;
    caret-color: transparent;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    z-index: 100;
    box-sizing: border-box;
}

.terminal-line {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.prompt {
    color: #cccccc;
    margin-right: 5px;
}

.command {
    color: #ffffff;
}

.terminal-output {
    margin-left: 20px;
    margin-top: 5px;
}

.output-line {
    margin-bottom: 3px;
    /* Preserve padding spaces from dir / terminal output (HTML collapses them otherwise). */
    white-space: pre-wrap;
}

/* Empty output lines collapse without height; use after program text for visible blank lines. */
.output-line.output-line--blank {
    min-height: 1.4em;
}

/* In-.bat HTML "application" overlay (content starting with '<') */
.bat-app-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: var(--app-height, 100dvh);
    z-index: 500;
    display: flex;
    flex-direction: column;
    background-color: #000000;
    box-sizing: border-box;
}

.bat-app-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    height: 27px;
    gap: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #aaaaaa;
    background-color: blue;
    border-bottom: 1px solid #284028;
}

.bat-app-header-rule {
    flex: 1 1 auto;
    min-width: 0;
    height: 1px;
    align-self: center;
    background-color: blue;
    opacity: 0.85;
}

.bat-app-close {
    flex: 0 0 auto;
    font-family: sans-serif;
    font-size: 13px;
    padding: 0px 18px;
    color: #cccccc;
    background-color: orangered;
    border: 1px solid #444444;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 0;
    height: 27px;
}

.bat-app-close:hover {
    color: #ffffff;
    border-color: #666666;
}

.bat-app-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.dos-footer {
    display: none;
}

.footer-text {
    margin: 0;
}

/* Animation for typing effect */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background-color: #cccccc;
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 2px;
}

.after-cursor {
    color: #ffffff;
}

/* Scrollbar styling */
.dos-terminal::-webkit-scrollbar {
    width: 10px;
}

.dos-terminal::-webkit-scrollbar-track {
    background: #000000;
}

.dos-terminal::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 5px;
}

.dos-terminal::-webkit-scrollbar-thumb:hover {
    background: #999999;
}