/* ==========================================================================
   theme-7.css — Tema "Aero 7" (html.theme-7).
   Autocontenido: declara el juego completo de tokens con valores Aero y los
   estilos propios del tema (biseles suaves y barra de título translúcida).
   Sin fuentes externas, sin imágenes externas, sin blur, sin backdrop-filter
   y sin filtros caros: el vidrio se simula con gradientes y bordes interiores.

   Contrato de marcado de ventana (lo genera js/wm.js):
     <div class="window">
       <div class="titlebar">
         <span class="titlebar-text">Título</span>
         <div class="titlebar-buttons">
           <button class="titlebar-button minimize" aria-label="Minimizar"></button>
           <button class="titlebar-button maximize" aria-label="Maximizar"></button>
           <button class="titlebar-button close" aria-label="Cerrar"></button>
         </div>
       </div>
       ...
     </div>
   Ventana inactiva: .window.inactive .titlebar
   ========================================================================== */

/* 1. Tokens: juego completo con valores Aero ------------------------------- */
.theme-7 {
  --font-ui: "TahomaLocal", Tahoma, "Trebuchet MS", sans-serif;
  --font-size: 12px;
  --text: #1b2a3a;
  --text-inverse: #fff;
  --bg-desktop: #1b3a5c;
  --window-bg: #f4f7fb;
  --window-text: #1b2a3a;
  --window-border: #8aa3bd;
  --titlebar-bg: linear-gradient(180deg, #eef3fa, #cddced);
  --titlebar-text: #1b2a3a;
  --titlebar-active-bg: linear-gradient(180deg, #eef3fa, #cddced);
  --titlebar-inactive-bg: linear-gradient(180deg, #e3e8ef, #d3dbe4);
  --taskbar-bg: linear-gradient(180deg, #1f2b3a, #111a26);
  --taskbar-border: #0b1420;
  --taskbar-text: #fff;
  --start-bg: linear-gradient(180deg, #3f7fc4, #2a5c96);
  --start-text: #fff;
  --accent: #3f7fc4;
  --accent-text: #fff;
  --menu-bg: #fff;
  --menu-border: #b9c6d4;
  --selection-bg: rgba(63, 127, 196, .5);
  --bevel-light: #ffffff;
  --bevel-dark: #b9c6d4;
  --shadow-window: 0 12px 40px rgba(9, 22, 38, .5);
  --icon-label-shadow: 1px 1px 1px rgba(0, 0, 0, .75);
  --radius: 6px;
  --control-h: 22px;
  --taskbar-h: 32px;
}

/* 2. Biseles 7 reutilizables ------------------------------------------------
   Misma API que el tema XP (.bevel-out saliente / .bevel-in hundido), pero
   más suaves: box-shadow de 1px con la paleta clara, sin relieve marcado. */
.theme-7 .bevel-out {
  box-shadow: inset 1px 1px 0 var(--bevel-light),
              inset -1px -1px 0 var(--bevel-dark);
}

.theme-7 .bevel-in {
  box-shadow: inset 1px 1px 0 var(--bevel-dark),
              inset -1px -1px 0 var(--bevel-light);
}

/* 3. Barra de título 7 -------------------------------------------------------
   Vidrio simulado SIN blur ni backdrop-filter: dos capas de gradiente lineal
   (brillo superior + gradiente base del token) y un borde interior claro. */
.theme-7 .titlebar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 6px 3px 8px;
  color: var(--titlebar-text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%),
    var(--titlebar-active-bg);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9),
              inset 1px 0 0 rgba(255, 255, 255, .55),
              inset -1px 0 0 rgba(255, 255, 255, .55); /* borde interior claro */
  user-select: none;
}

.theme-7 .window.inactive .titlebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 55%),
    var(--titlebar-inactive-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.theme-7 .titlebar-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55); /* relieve sutil, sin sombra oscura */
}

/* Botones rectangulares 26x18 con símbolo fino (1px) */
.theme-7 .titlebar-buttons {
  display: flex;
  gap: 3px;
}

.theme-7 .titlebar-button {
  position: relative;
  width: 26px;
  height: 18px;
  border: 1px solid rgba(27, 42, 58, .35);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, .2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.theme-7 .titlebar-button:hover {
  border-color: rgba(27, 42, 58, .5);
  background: linear-gradient(180deg, #ffffff, #d9e6f4);
}

.theme-7 .titlebar-button:active {
  background: linear-gradient(180deg, #cfdcea, #b9cbdd);
  box-shadow: inset 1px 1px 0 rgba(27, 42, 58, .15);
}

/* Cerrar: fondo rojizo SOLO en hover (no permanente) */
.theme-7 .titlebar-button.close:hover {
  border-color: rgba(122, 32, 18, .55);
  background: linear-gradient(180deg, #e8907c, #c94f38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}

.theme-7 .titlebar-button.close:hover::before,
.theme-7 .titlebar-button.close:hover::after {
  background: #fff;
}

/* Símbolos dibujados con CSS (finos, 1px, color del texto de la barra) */

/* Minimizar: barra inferior */
.theme-7 .titlebar-button.minimize::before {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 4px;
  left: 7px;
  height: 1px;
  background: var(--titlebar-text);
}

/* Maximizar: caja */
.theme-7 .titlebar-button.maximize::before {
  content: "";
  position: absolute;
  top: 4px;
  right: 7px;
  bottom: 4px;
  left: 7px;
  border: 1px solid var(--titlebar-text);
}

/* Cerrar: aspa con dos líneas rotadas */
.theme-7 .titlebar-button.close::before,
.theme-7 .titlebar-button.close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1px;
  background: var(--titlebar-text);
}

.theme-7 .titlebar-button.close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.theme-7 .titlebar-button.close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
