/* Custom WinBox theme for vintage Windows look */
.winbox {
    background: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wb-header {
    background: linear-gradient(to right, #0000ff 0%, #000080 100%);
    color: white;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    font-weight: bold;
    height: 20px;
    border-bottom: 1px solid #808080;
}

.wb-title {
    padding: 3px 6px;
    line-height: 14px;
}

.wb-control {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
    margin: 2px 1px;
}

.wb-control:hover {
    background: #d0d0d0;
}

.wb-control:active {
    border: 1px inset #c0c0c0;
    background: #a0a0a0;
}

.wb-min {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect x="3" y="7" width="10" height="2" fill="black"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
}

.wb-max {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect x="3" y="3" width="10" height="10" fill="none" stroke="black" stroke-width="1.5"/><rect x="4" y="4" width="8" height="1" fill="black"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
}

.wb-close {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 4l8 8M12 4l-8 8" stroke="black" stroke-width="1.5" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
}

.wb-body {
    background: white;
    border: 2px inset #c0c0c0;
    margin: 2px;
}

.wb-body iframe {
    border: none;
    width: 100%;
    height: 100%;
}

/* Window focus states */
.winbox.focus .wb-header {
    background: linear-gradient(to right, #0000ff 0%, #000080 100%);
}

.winbox:not(.focus) .wb-header {
    background: linear-gradient(to right, #808080 0%, #606060 100%);
}

/* Loading state */
.window-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    color: #666;
}

.window-loading::before {
    content: "Loading...";
    padding: 20px;
    background: #f0f0f0;
    border: 2px inset #c0c0c0;
    border-radius: 2px;
}

/* Error state */
.window-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    color: #800000;
}

.window-error::before {
    content: "⚠️ Failed to load application";
    padding: 20px;
    background: #fff0f0;
    border: 2px inset #c0c0c0;
    border-radius: 2px;
}

.window-error-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    background: #c0c0c0;
}

.error-content {
    text-align: center;
    padding: 20px;
    background: #c0c0c0;
    border: 2px inset #c0c0c0;
    border-radius: 2px;
    max-width: 300px;
}

.error-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.error-message {
    color: #800000;
    margin-bottom: 15px;
    line-height: 1.3;
}

.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.vintage-button {
    padding: 4px 12px;
    background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
    border: 2px outset #c0c0c0;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 11px;
    color: #000000;
    cursor: pointer;
    transition: all 0.1s;
}

.vintage-button:hover {
    background: linear-gradient(to bottom, #d0d0d0 0%, #909090 100%);
}

.vintage-button:active {
    border: 2px inset #c0c0c0;
    background: linear-gradient(to bottom, #a0a0a0 0%, #c0c0c0 100%);
}
