/* Salvapantallas Delta: reloj + fecha + clima.
   Se monta como overlay sobre la interfaz, por encima de cualquier modal. */

#delta-screensaver {
  --ss-fg: #c9b8a3;
  --ss-muted: rgba(201, 184, 163, 0.88);

  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  box-sizing: border-box !important;
  z-index: 100000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  color: var(--ss-fg);
  font-family: "Montserrat", sans-serif;
  cursor: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#delta-screensaver *,
#delta-screensaver *::before,
#delta-screensaver *::after {
  cursor: none !important;
}

#delta-screensaver.is-visible {
  display: flex;
  opacity: 1;
}

/* El overlay recibe el foco al mostrarse. Sin esto, el :focus global de
   new_stylesheet.css dibuja un borde naranja justo en el borde de la pantalla. */
#delta-screensaver:focus,
#delta-screensaver:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Dim suave: atenúa el brillo del contenido sin tapar el reloj. */
#delta-screensaver::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.delta-screensaver-wrap {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  padding: 12px;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
}

/* Clima. Tamaños = 50 % de los originales (el reloj sigue siendo legible). */
.ss-weather {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 15px);
  margin-bottom: clamp(14px, 2.5vh, 28px);
  color: var(--ss-muted);
}

.ss-temp {
  color: var(--ss-fg);
  font-size: clamp(26px, 3.75vw, 48px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ss-sep {
  align-self: stretch;
  flex: 0 0 2px;
  width: 2px;
  min-height: 28px;
  border-radius: 0;
  background: var(--ss-fg);
  opacity: 0.45;
}

.ss-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(3px, 0.4vw, 5px);
  text-align: left;
}

.ss-weather-icon {
  flex: 0 0 auto;
  font-size: clamp(19px, 2.4vw, 31px);
  line-height: 1;
  color: var(--ss-fg);
}

.ss-desc {
  max-width: 16ch;
  color: var(--ss-muted);
  font-size: clamp(7px, 0.9vw, 12px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.ss-weather.is-loading .ss-desc {
  opacity: 0.7;
}

/* Reloj y fecha */
.ss-clock {
  color: var(--ss-fg);
  font-size: clamp(36px, 9vw, 130px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.ss-date {
  margin-top: clamp(10px, 1.75vh, 20px);
  color: var(--ss-muted);
  font-size: clamp(6px, 0.8vw, 11px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.ss-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin-top: clamp(4px, 0.6vh, 7px);
  color: var(--ss-muted);
  font-size: clamp(5.5px, 0.65vw, 9px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

/* new_stylesheet.css fija color en .material-symbols-outlined; hace falta
   declararlo aquí para que el icono siga la paleta del salvapantallas. */
.ss-location-icon {
  margin: 0;
  color: var(--ss-fg);
  font-size: 1.1em;
  line-height: 1;
}

@media (max-width: 520px) {
  .ss-weather { gap: 8px; }
  .ss-desc { max-width: 12ch; }
}

@media (prefers-reduced-motion: reduce) {
  #delta-screensaver { transition: none; }
}
