/* css/layout/windows.css */
.os-window {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    min-height: 200px;
    border-radius: var(--window-border-radius);
    overflow: hidden;
    /* La clase glass-effect se añade aquí o vía JS */
    font-family: var(--sys-font);
    will-change: transform; /* Optimización de pintado al arrastrar */
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
}

[role="tabpanel"] {
    transition: opacity 0.18s ease, transform 0.18s ease;
    opacity: 1;
    transform: translateY(0);
}

.desktop-icon,
.start-menu-item,
.system-link,
.os-btn,
.title-bar-controls button,
.taskbar-app,
.event-row,
[role="tab"],
.window-body,
.status-bar-field {
    transition: all 0.18s ease;
}

/* --- Barra de Título --- */
.title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--titlebar-height);
    padding: 0 6px 0 8px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    user-select: none;
    cursor: default; /* El cursor de mover se activa en JS al arrastrar */
}

.title-bar-text {
    font-size: 12px;
    font-weight: bold;
    color: #1a1a1a;
    text-shadow: 0 0 5px #ffffff, 0 0 10px #ffffff; /* Efecto legibilidad Aero */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Controles de Ventana (Botones) --- */
.title-bar-controls {
    display: flex;
    gap: 2px;
}

.title-bar-controls button {
    width: 26px;
    height: 18px;
    border: 1px solid rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    background: linear-gradient(to bottom, #e4eaf2 0%, #b8c9de 100%);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.8);
}

.title-bar-controls button[aria-label="Close"] {
    background: linear-gradient(to bottom, #e3a197 0%, #c14635 100%);
    border-color: #7a1d13;
}

.title-bar-controls button:hover {
    filter: brightness(1.1);
}

.title-bar-controls button:active {
    filter: brightness(0.9);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

/* --- Cuerpo de la Ventana --- */
.window-body {
    flex: 1;
    background-color: var(--window-body-bg);
    border: 1px solid #888;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    margin: 0 4px 4px 4px; /* Margen para ver el borde de cristal inferior */
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.window-body.has-space {
    padding: 12px;
}

/* --- Barra de Estado (Status Bar) --- */
.status-bar {
    height: 22px;
    display: flex;
    align-items: center;
    background-color: var(--status-bar-bg);
    border-top: 1px solid #dfdfdf;
    margin: 0 4px 4px 4px;
    padding: 0 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.status-bar-field {
    border-right: 1px solid #ccc;
    padding-right: 10px;
    margin-right: 10px;
}

.status-bar-field:last-child {
    border-right: none;
}
