/* NeXTSTEP.css - A CSS library for the NeXTSTEP look and feel */

body {
    background-color: #4A4A4A;
    /* NeXTSTEP desktop color */
    font-family: "Helvetica", "Arial", sans-serif;
}

.window {
    border: 2px solid;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    display: inline-block;
    min-width: 350px;
    background-color: #C6C6C6;
    position: absolute;
    display: flex;
    flex-direction: column;
}

.title-bar {
    background: repeating-linear-gradient(#5A5A5A,
            #5A5A5A 1px,
            #3A3A3A 1px,
            #3A3A3A 2px);
    padding: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 20px;
    cursor: grab;
}

.window.active .title-bar {
    background: repeating-linear-gradient(#7B7B7B,
            #7B7B7B 1px,
            #5A5A5A 1px,
            #5A5A5A 2px);
}

.title-bar-text {
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    flex-grow: 1;
    text-align: center;
    padding: 0 5px;
}

.title-bar-controls {
    display: flex;
    align-items: center;
}

.title-bar-controls button {
    width: 16px;
    height: 16px;
    border: 2px solid;
    border-color: #7B7B7B #000 #000 #7B7B7B;
    background-color: #C6C6C6;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 0;
    margin: 0 1px;
}

.title-bar-controls button[aria-label="Minimize"]::before {
    content: '☐';
    color: black;
    font-size: 14px;
    line-height: 14px;
}

.title-bar-controls button[aria-label="Maximize"]::before {
    content: '▢';
    color: black;
    font-size: 14px;
    line-height: 14px;
}

.title-bar-controls button[aria-label="Close"]::before {
    content: 'X';
    color: black;
    font-size: 10px;
    font-weight: bold;
}


.window-body {
    padding: 15px;
    border-top: 1px solid #000;
    color: #000;
    background-color: #C6C6C6;
    flex-grow: 1;
    overflow: auto;
}

/* .ns-content legacy support */
.window-body {
    background-color: #C6C6C6;
}

/* Dock Styles */
.ns-dock {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 84px;
}

.ns-dock-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.ns-icon-image {
    width: 64px;
    height: 64px;
    background-color: #FFF;
    /* Placeholder for icon graphic */
    border: 2px solid #000;
    margin-bottom: 5px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4);
}

.ns-dock-icon:hover .ns-icon-image {
    background-color: #E0E0E0;
}

.ns-icon-title {
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 1px #000;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Desktop Icon Styles */
.ns-desktop-icon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
    z-index: 5;
    /* Below windows */
}

.ns-desktop-icon .ns-icon-image {
    width: 64px;
    height: 64px;
    background-color: #DDD;
    /* Lighter placeholder for desktop icons */
    border: 2px solid #000;
    margin-bottom: 5px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4);
}

.ns-desktop-icon:hover .ns-icon-image {
    background-color: #FFF;
}

.ns-desktop-icon .ns-icon-title {
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 1px #000;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Menu Styles */
.ns-menu {
    position: absolute;
    z-index: 100;
    background-color: #C6C6C6;
    border: 2px solid;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    min-width: 150px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4);
}

.ns-menu ul {
    list-style: none;
    margin: 0;
    padding: 5px;
}

.ns-menu li a {
    display: block;
    padding: 3px 10px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
}

.ns-menu li a:hover {
    background-color: #000;
    color: #FFF;
}

.ns-menu li.separator hr {
    border: none;
    border-top: 1px solid #7B7B7B;
    margin: 5px 0;
}

/* Standard Button Styles */
/* Standard Button Styles */
button {
    background-color: #C6C6C6;
    border: 2px solid;
    border-color: #FFF #7B7B7B #7B7B7B #FFF;
    padding: 4px 20px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    font-family: inherit;
    margin: 2px;
}

button:active {
    background-color: #B0B0B0;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.5);
    padding: 5px 19px 3px 21px;
}

button.default {
    border-width: 4px;
    border-style: double;
    border-color: #FFF #7B7B7B #7B7B7B #FFF;
    padding: 2px 18px;
}

button:disabled {
    color: #7B7B7B;
    background-color: #C6C6C6;
    border-color: #D1D1D1;
    box-shadow: none;
    cursor: default;
}

button:focus,
input[type="text"]:focus {
    outline: 1px dotted #000;
    outline-offset: -4px;
}

fieldset {
    border: 1px solid #7B7B7B;
    padding: 15px;
    margin: 10px 0;
}

legend {
    font-weight: bold;
    padding: 0 5px;
}

input[type="text"] {
    background-color: #E0E0E0;
    border: 2px solid;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    padding: 4px;
    font-size: 14px;
    color: #000;
    font-family: inherit;
}

.ns-input:focus,
.ns-select:focus,
.ns-textarea:focus {
    outline: none;
    border-color: #FFF #7B7B7B #7B7B7B #FFF;
    /* Invert borders on focus for deeper inset */
}

.ns-textarea {
    width: 100%;
    resize: vertical;
    /* Allow vertical resizing by user */
    overflow: auto;
    /* Enable custom scrollbars when content overflows */
}

/* Custom Checkbox */
label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 5px;
}

input[type="checkbox"],
input[type="radio"] {
    appearance: none;
    width: 14px;
    height: 14px;
    background-color: #C6C6C6;
    border: 2px solid;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0px;
    width: 3px;
    height: 8px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: black;
    border-radius: 50%;
}

/* Progress Bar */
.ns-progress-bar {
    width: 100%;
    height: 16px;
    background-color: #E0E0E0;
    border: 2px solid;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    /* Inset effect */
    box-sizing: border-box;
    overflow: hidden;
    /* Ensure fill doesn't go outside */
}

.ns-progress-fill {
    height: 100%;
    background-color: #000;
    /* NeXTSTEP often used solid black/dark gray for progress */
    transition: width 0.3s ease-in-out;
    /* Smooth transition for progress changes */
}

/* Tabbed Interface */
.ns-tabs {
    margin-top: 15px;
    border: 2px solid;
    border-color: #7B7B7B #FFF #FFF #7B7B7B;
    /* Inset effect for the whole tab area */
    background-color: #C6C6C6;
    padding: 5px;
}

.ns-tab-headers {
    display: flex;
    margin-bottom: 5px;
    border-bottom: 1px solid #7B7B7B;
}

.ns-tab-button {
    background-color: #C6C6C6;
    border: 2px solid;
    border-color: #FFF #7B7B7B #7B7B7B #FFF;
    /* Outset effect */
    padding: 5px 15px;
    font-size: 14px;
    color: #000;
    cursor: pointer;
    margin-right: -2px;
    /* Overlap borders */
    z-index: 1;
    /* Ensure active tab is on top */
    position: relative;
}

.ns-tab-button:hover {
    background-color: #D1D1D1;
}

.ns-tab-button.ns-tab-active {
    background-color: #E0E0E0;
    border-bottom-color: #E0E0E0;
    /* Hide bottom border for active tab */
    z-index: 2;
}

.ns-tab-pane {
    display: none;
    padding: 10px;
    /* Styles for the content inside the tab */
}

.ns-tab-pane.ns-tab-active {
    display: block;
}

/* Modal Overlay */
.ns-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent black */
    z-index: 1000;
    /* Ensure it's above everything else */
    pointer-events: none;
}

/* Alert Dialog */
.ns-alert-dialog {
    position: fixed;
    /* Override absolute from ns-window */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999999;
    /* Above the overlay */
    min-width: 300px;
    /* Specific min-width for dialogs */
    pointer-events: auto;
}

/* Hide minimize/maximize buttons for dialogs */
.ns-alert-dialog .ns-button-minimize,
.ns-alert-dialog .ns-button-maximize {
    display: none;
}

/* NeXTSTEP Scrollbar Styles (Webkit) */
::-webkit-scrollbar {
    width: 15px;
    /* Vertical scrollbar width */
    height: 15px;
    /* Horizontal scrollbar height */
}

::-webkit-scrollbar-track {
    background: #C6C6C6;
    /* Light gray track */
    border: 1px solid #7B7B7B;
}

::-webkit-scrollbar-thumb {
    background: #7B7B7B;
    /* Darker gray thumb */
    border: 2px solid;
    border-color: #FFF #5A5A5A #5A5A5A #FFF;
    /* Beveled effect */
}

::-webkit-scrollbar-thumb:hover {
    background: #8A8A8A;
}

::-webkit-scrollbar-button {
    background: #C6C6C6;
    /* Button background */
    height: 15px;
    width: 15px;
    border: 2px solid;
    border-color: #FFF #7B7B7B #7B7B7B #FFF;
    /* Beveled effect */
    display: block;
    /* Ensure buttons are visible */
}

/* Scrollbar arrows (simple triangle using borders) */
::-webkit-scrollbar-button:vertical:increment {
    border-top: 5px solid black;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    content: '';
    /* Clear content */
}

::-webkit-scrollbar-button:vertical:decrement {
    border-bottom: 5px solid black;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    content: '';
    /* Clear content */
}

::-webkit-scrollbar-button:horizontal:increment {
    border-left: 5px solid black;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    content: '';
    /* Clear content */
}

::-webkit-scrollbar-button:horizontal:decrement {
    border-right: 5px solid black;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    content: '';
    /* Clear content */
}

/* Corner between scrollbars */
::-webkit-scrollbar-corner {
    background: #C6C6C6;
    border: 1px solid #7B7B7B;
}

.ns-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    bottom: 0;
    right: 0;
    background-color: #555;
    /* A dark color for the handle */
    cursor: se-resize;
    z-index: 11;
    /* Ensure it's above other window content */
}