﻿html, body {
    background-color: #0C0C0C;
    color: #CCCCCC;
    font-size: 14px; /* match default Ubuntu Terminal size */
}

a, .btn-link {
    color: #0366d6;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #0C0C0C;
    font-family: "Courier New", Courier, monospace !important;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Optional: prevent text selection while dragging the window */
body.dragging {
    user-select: none;
    cursor: move;
}

.term-window {
    background: #111;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.35);
    backdrop-filter: blur(6px);
    background-color: #300a24; /* Ubuntu Terminal purple */
    color: #eeeeec;
}
    /* Apply Ubuntu Mono to everything inside terminal window */
    .term-window,
    .term-window * {
        font-family: 'Ubuntu Mono', monospace;
        font-size: 14px; /* match default Ubuntu Terminal size */
        line-height: 1.3;
    }

.term-titlebar {
    position: sticky; /* <-- stays put even when content scrolls */
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 36px;
    padding: 0 10px;
    background: linear-gradient(#2b2b2b, #222);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    z-index: 1; /* keep in front of scrolled content */
    user-select: none; /* improve drag feel */
}

    .term-titlebar .title {
        font-size: 12px;
        opacity: 0.9;
        display: inline-flex; /* keep dot + text on same line */
        align-items: center; /* vertical alignment */
        gap: 8px; /* space between them */
        white-space: nowrap;
    }

    .term-titlebar .title-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background-color: #ff5f56; /* red */
        touch-action: manipulation;
    }

.term-content {
    height: calc(100% - 36px);
    display: flex;
    flex-direction: column;
}

.term-scroll {
    flex: 1 1 auto;
    overflow: auto; /* content can overflow & scroll */
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.45;
    color: #eaeaea;
}

/* make sure nothing blocks clicks */
.term-window, .term-content, .term-scroll, .term-prompt {
    pointer-events: auto;
}

/* surrounding bits */
.term-output {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
    color: #eaeaea;
    overflow: hidden;
}

.term-caret {
    color: #9be7c4;
    font-weight: 600;
}

.term-input-wrap {
    position: relative
}

/* Console fills the available height inside .term-scroll */
/* Wrap: no forced full height */
.term-host {
    display: flex;
    flex-direction: column;
    height: auto; /* was 100%; remove the forced tall column */
    max-height: 100%; /* still respect the window's space */
    gap: 6px; /* small, neat spacing */
}

/* Output: auto height until it gets tall, then scroll */
.term-output--scroll {
    flex: 0 1 auto; /* don't expand just to fill space */
    max-height: 48vh; /* adjust to taste, e.g., 40–60vh */
    overflow: auto;
    margin: 0;
    padding: 0 2px 0 0; /* tiny right padding so scrollbar doesn't overlap */
    line-height: 1.3;
    /* hide scrollbar on WebKit browsers (Chrome, Edge, Safari) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge Legacy */
}
    .term-output--scroll::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Edge */
    }

/* Prompt: tight spacing */
.term-prompt {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

    .term-prompt span {
        color: #eeeeec; /* prompt arrow color */
    }

/* Transparent input + custom underline cursor (unchanged) */
.term-input {
    background: transparent;
    border: none;
    outline: none;
    color: #eaeaea;
    font: inherit;
    width: 100%;
    caret-color: transparent;
}

.term-input-wrap {
    position: relative;
}

.term-cursor {
    position: absolute;
    bottom: 2px;
    left: var(--caret-x,0px);
    width: 0.6ch;
    height: 2px;
    background: #eeeeec;
    animation: blink 1s steps(2,start) infinite;
    pointer-events: none;
}

@keyframes blink {
    to {
        visibility: hidden
    }
}

.gnome-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    gap: 8px;
    background-color: #2e3436; /* GNOME dark background */
}

    .gnome-loader div {
        width: 10px;
        height: 10px;
        background-color: #eeeeec; /* GNOME light dots */
        border-radius: 50%;
        animation: gnomePulse 1.2s infinite ease-in-out;
    }

        .gnome-loader div:nth-child(1) {
            animation-delay: 0s;
        }

        .gnome-loader div:nth-child(2) {
            animation-delay: 0.2s;
        }

        .gnome-loader div:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes gnomePulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}
