/* --- TERMINAL OVERHAUL: CREAM PROTOCOL --- */

/* 1. MAIN OVERLAY (Backdrop) */
#blis-terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    /* Dimmed */
    backdrop-filter: blur(5px);
    /* Modern blur effect */
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#blis-terminal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* 2. TERMINAL BOX (The Computer) */
#blis-terminal-container {
    width: 90%;
    max-width: 800px;
    /* COMPACT MODE */
    height: 60vh;
    /* COMPACT HEIGHT */
    background-color: #FAF9F0;
    /* OUR CREAM */
    color: #555555;
    /* DARK GREY TEXT */
    font-family: 'Space Mono', monospace;
    padding: 40px;
    /* INCREASED PADDING */
    border: 1px solid #555;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 3. HEADER & CONTROLS */
#blis-terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.blis-status-text {
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

#blis-close-btn {
    cursor: pointer;
    font-weight: 700;
    transition: color 0.2s;
}

#blis-close-btn:hover {
    color: #D9E028;
    /* Citron Hover */
}

/* 4. OUTPUT AREA */
#blis-terminal-output {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: #555 #FAF9F0;
}

/* 5. INPUT AREA */
#blis-terminal-input-area {
    display: flex;
    align-items: center;
    border-top: none;
    /* SEAMLESS: No border */
    padding-top: 0;
    /* SEAMLESS: Tight packing */
    margin-top: 5px;
    /* Minimal gap */
}

.prompt-symbol {
    color: #D9E028;
    /* Citron Prompt */
    margin-right: 10px;
    font-weight: bold;
}

#blis-command-input {
    background: transparent;
    border: none;
    color: #333;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    flex-grow: 1;
    outline: none;
}

/* 6. TRIGGER BUTTON (Floating Square) */
/* 6. TRIGGER BUTTON (Floating Square) */
#blis-trigger-btn {
    position: fixed;
    bottom: 50px;
    right: 50px;
    width: 40px;
    /* MATCH SWATCH SIZE */
    height: 40px;
    /* MATCH SWATCH SIZE */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #D9E028;
    /* CITRON */
    border: 1px solid #000;
    /* THIN BORDER (Like Swatches) */
    color: #000;
    /* BLACK TEXT */

    /* MATCHING HEADER MENU */
    font-family: 'Roboto Mono', monospace;
    font-size: 13px;
    /* Smaller fit for [?] */
    font-weight: 700;

    line-height: 1;
    cursor: pointer;
    z-index: 99990;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#blis-trigger-btn:hover {
    background: #000;
    color: #D9E028;
    /* Invert on Hover */
    border-color: #D9E028;
}

/* 7. MOBILE OVERRIDES (Fullscreen) */
@media (max-width: 768px) {
    #blis-terminal-container {
        width: 100%;
        max-width: none;
        height: 100%;
        border: none;
        padding: 15px;
    }

    #blis-terminal-overlay {
        background: #FAF9F0;
        /* No dim needed, full opaque */
    }
}

/* --- PRODUCT CARD STYLES (Adapted for Light Theme) --- */
.visual-container {
    position: relative;
    width: 300px;
    height: 200px;
    background: #fff;
    overflow: hidden;
    border-bottom: 1px solid #555;
    margin-bottom: 15px;
}

.ascii-layer {
    background: transparent;
    color: #333;
    /* Dark ASCII */
    line-height: 4px;
    /* Essential for alignment */
    white-space: pre;
    font-family: 'Courier New', monospace;
    z-index: 2;
    transition: opacity 1.5s ease-out;
}

.photo-layer {
    opacity: 0;
    transition: opacity 1.5s ease-in;
}

.resolved .ascii-layer {
    opacity: 0;
}

.resolved .photo-layer {
    opacity: 1;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    z-index: 3;
}

.acquire-btn {
    text-decoration: none;
    color: #555;
    font-weight: bold;
}

.log-line {
    color: #555;
    margin-bottom: 8px;
}

.system-msg {
    color: #888;
    font-size: 11px;
}

.error-msg {
    color: #ff0000;
}

/* 9. BOOT & CURSOR */
.blis-cursor {
    display: inline-block;
    width: 12px;
    /* CHUNKY */
    height: 14px;
    /* Block height */
    background-color: #D9E028;
    /* CITRON BLOCK */
    vertical-align: sub;
    animation: blisBlink 1s infinite step-end;
    margin-left: 2px;
}

@keyframes blisBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Placeholder Styling */
.terminal-placeholder {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-family: 'Space Mono', monospace;
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.terminal-placeholder.hidden {
    opacity: 0;
}