@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: "MS Sans Serif", Tahoma, Verdana, Segoe, sans-serif;
    height: 100%;
}

h1:focus {
    outline: none;
}

.btn-primary {
    color: #000;
    background-color: silver;
    border-color: #424242;
}

.content {
    padding-top: 0;
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: silver;
    color: #000;
    bottom: 28px;
    box-shadow: inset 1px 1px #fff, inset -1px -1px #000;
    display: none;
    left: 0;
    padding: 0.4rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

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

.blazor-error-boundary {
    background: silver;
    padding: 1rem;
    color: #000;
    border: 2px outset #fff;
}

img.icon-16,
img.icon-32,
.desktop-icon img,
.explorer-link img {
    image-rendering: pixelated;
}

.desktop {
    height: 100vh;
    min-height: 100vh;
    background: teal;
    color: #000;
    display: flex;
    flex-direction: column;
    padding: 8px 8px 36px;
    box-sizing: border-box;
}

.app-window {
    flex: 1;
    min-height: 0;
    background: silver;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    box-shadow: inset -1px -1px #808080, inset 1px 1px #dfdfdf;
    display: flex;
    flex-direction: column;
}

.window-title {
    background: linear-gradient(to right, #000080, #1084d0);
    color: #fff;
    font-weight: bold;
    padding: 2px 3px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    user-select: none;
}

.window-title-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-buttons {
    display: flex;
    gap: 2px;
}

.window-btn {
    width: 16px;
    height: 14px;
    line-height: 12px;
    text-align: center;
    font-size: 10px;
    background: silver;
    color: #000;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    text-decoration: none;
    padding: 0;
}

.window-btn:disabled {
    color: #808080;
}

.window-menu {
    display: flex;
    gap: 2px;
    padding: 2px 4px;
    background: silver;
    user-select: none;
}

.menu-item {
    position: relative;
}

.menu-item > span {
    display: inline-block;
    padding: 2px 8px;
}

.menu-item:hover > span {
    background: #000080;
    color: #fff;
}

.menu-dropdown {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 160px;
    background: silver;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    z-index: 20;
    padding: 2px;
}

.menu-item:hover .menu-dropdown {
    display: block;
}

.menu-dropdown a,
.menu-dropdown button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #000;
    padding: 3px 16px;
    text-decoration: none;
    font-size: 12px;
}

.menu-dropdown a:hover,
.menu-dropdown button:hover {
    background: #000080;
    color: #fff;
}

.menu-sep {
    height: 1px;
    background: #808080;
    border-bottom: 1px solid #fff;
    margin: 3px 2px;
}

.window-main {
    flex: 1;
    min-height: 0;
    display: flex;
    background: silver;
}

.explorer-pane {
    width: 180px;
    flex-shrink: 0;
    border-right: 2px groove #fff;
    background: silver;
    padding: 4px;
}

.explorer-tree {
    height: 100%;
}

.explorer-header {
    margin-bottom: 4px;
}

.explorer-header .navbar-toggler {
    background: silver;
    border: 2px outset #fff;
    color: #000;
    font-size: 12px;
    padding: 2px 8px;
}

.explorer-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.explorer-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #000;
    text-decoration: none;
    padding: 4px 6px;
}

.explorer-link img {
    width: 24px;
    height: 24px;
}

.explorer-link.active {
    background: #000080;
    color: #fff;
}

.explorer-link:hover:not(.active) {
    outline: 1px dotted #000;
}

.client-area {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    color: #000;
}

.home-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.taskbar {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    margin: 0 !important;
    padding: 2px 4px !important;
    display: flex;
    align-items: center;
    gap: 4px;
    background: silver;
    border-top: 2px outset #fff;
    z-index: 300;
}

.start-button {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    background: silver;
}

.start-button.pressed {
    border: 2px inset #fff !important;
}

.task-button {
    min-width: 110px;
    max-width: 160px;
    height: 22px;
    padding: 0 8px;
    background: silver;
    color: #000 !important;
    text-decoration: none;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 18px;
    font-size: 12px;
}

.task-button.active {
    background: url(../assets/background.bmp);
    border: 2px inset #fff;
    font-weight: bold;
}

.tray {
    margin-left: auto;
    border: 2px inset #fff;
    padding: 0 8px;
    height: 22px;
    display: flex;
    align-items: center;
}

.start-menu {
    position: absolute;
    left: 2px;
    bottom: 28px;
    display: flex;
    background: silver;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    min-width: 220px;
    z-index: 400;
}

.start-banner {
    width: 24px;
    background: linear-gradient(#000080, #1084d0);
    color: #fff;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: bold;
    font-size: 14px;
    padding: 8px 2px;
    letter-spacing: 2px;
}

.start-items {
    flex: 1;
    padding: 2px;
}

.start-items a,
.start-items .menu-disabled {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: #000;
    text-decoration: none;
}

.start-items a:hover {
    background: #000080;
    color: #fff;
}

.start-items .menu-disabled {
    color: #808080;
}

.list-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
    color: #000;
}

.find-box {
    width: 220px;
    max-width: 100%;
    margin-top: 0;
}

.toolbar-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.toolbar-check input[type="checkbox"] {
    position: static;
    left: auto;
    width: 13px;
    height: 13px;
    margin: 0;
}

.listview {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.listview-header,
.lv-row {
    display: grid;
    align-items: center;
    column-gap: 0;
}

.personnel-grid {
    grid-template-columns: 72px minmax(0, 1.15fr) minmax(0, 1.15fr) 118px 72px minmax(0, 0.85fr) 80px 88px 72px;
}

.aircraft-grid {
    grid-template-columns: 90px 70px 1.2fr 90px 90px 1.4fr 110px;
}

.listview-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: silver;
}

.listview-header .lv-col {
    min-width: 0;
    height: 20px;
    box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
    background: silver;
    border: 0;
    text-align: left;
    font-weight: normal;
    padding: 0 6px;
    overflow: hidden;
    white-space: nowrap;
    cursor: pointer;
}

.page-fill {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.listview-body {
    flex: 1 1 auto;
    height: calc(100vh - 230px);
    min-height: 180px;
    overflow-y: auto;
    background: #fff;
}

.lv-row {
    min-height: 22px;
    height: 22px;
    padding: 0;
    cursor: default;
    color: #000;
    background: #fff;
}

.lv-row > * {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0 6px;
    line-height: 22px;
}

.bio-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pic-icon-btn {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 16px;
    height: 16px;
    line-height: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.pic-icon-btn img {
    display: block;
}

.clip-cell {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.lv-row:nth-child(even):not(.highlighted) {
    background: #f2f2f2;
}

.lv-row.highlighted {
    background: navy;
    color: #fff;
}

a.crew-name {
    color: #00f;
    text-decoration: underline;
    cursor: pointer;
}

a.crew-name:visited {
    color: #00f;
}

.mission-table tr.highlighted a.crew-name,
.mission-table tr.highlighted a.crew-name:visited {
    color: #fff;
}

.lv-row > .action-cell {
    overflow: visible;
}

.btn-sm {
    padding: 0 6px 2px;
    font-size: 12px;
    line-height: 16px;
}

.status-bar {
    display: flex;
    margin-top: 4px;
    gap: 2px;
}

.status-field {
    flex: 1;
    border: 1px inset #fff;
    padding: 1px 6px;
    color: #000;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hourglass-panel {
    flex: 1;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 24px;
    color: #000;
}

.hourglass-panel .progress {
    width: 220px;
}

.load-error {
    color: #000;
    padding: 12px;
    border: 2px inset #fff;
    background: silver;
}

.empty-list {
    padding: 12px;
    color: #000;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.about-copy {
    color: #000;
}

.about-copy .motto {
    font-style: italic;
}

.program-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.desktop-icon {
    width: 88px;
    text-align: center;
    color: #000;
    text-decoration: none;
    font-size: 12px;
}

.desktop-icon img {
    width: 32px;
    height: 32px;
    display: block;
    margin: 0 auto 4px;
}

.desktop-icon:focus,
.desktop-icon:hover {
    outline: 1px dotted #000;
}

.photo-window .card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}

.bio-sheet {
    color: #000;
}

.picture-toggle {
    margin-bottom: 8px;
}

.picture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.picture-slot-title {
    font-weight: bold;
    margin-bottom: 4px;
}

.picture-frame {
    background: #000;
    min-height: 120px;
    max-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picture-frame img {
    max-width: 100%;
    max-height: 340px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.picture-slot-meta {
    margin-top: 4px;
    font-size: 11px;
    color: #000;
}

.prop-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 6px 10px;
    align-items: center;
}

.prop-grid label,
.bio-sheet label {
    margin: 0;
}

.mission-table {
    width: 100%;
}

.wrap-cell {
    white-space: normal;
    word-wrap: break-word;
}

.crew-row td {
    background: #dfdfdf;
    padding: 8px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.win-dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2147483647;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 16px;
    transform: none;
}

.win-dialog {
    width: min(920px, 94vw);
    max-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.win-dialog .card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.win-dialog .card-header h5 {
    flex: 1;
    margin: 0;
    font-size: 13px;
}

.win-dialog-body {
    padding: 10px;
    overflow: auto;
    background: silver;
    color: #000;
    flex: 1;
}

.win-dialog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    flex-shrink: 0;
}

@media (max-width: 640.98px) {
    .desktop {
        padding: 0 0 36px;
    }

    .window-main {
        flex-direction: column;
    }

    .explorer-pane {
        width: 100%;
        border-right: 0;
        border-bottom: 2px groove #fff;
    }

    .personnel-grid,
    .aircraft-grid {
        grid-template-columns: 80px 1fr 1fr 70px;
    }

    .personnel-grid > :nth-child(n+5),
    .aircraft-grid > :nth-child(n+5) {
        display: none;
    }

    .task-button {
        min-width: 0;
        max-width: 72px;
    }

}
