/* ═══════════════════════════════════════════════════════
   DRESSTYLE GLOBAL TRANSLATOR — Living Globe™ CSS
   Versión 1.0 · dresstyle.world
   ══════════════════════════════════════════════════════ */

/* ── Widget container ─────────────────────────────────── */
#drst-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
}

/* ── Menú de idiomas ──────────────────────────────────── */
#drst-lang-menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  min-width: 110px;
}

#drst-widget.open #drst-lang-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.drst-lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 7px 14px 7px 10px;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .18s, transform .15s, border-color .18s;
  white-space: nowrap;
}

.drst-lang-item:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
  transform: translateX(-3px);
  color: #fff;
}

.drst-lang-item.drst-active {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.drst-lang-flag { font-size: 15px; line-height: 1; }
.drst-lang-code { flex: 1; font-weight: 500; }
.drst-lang-check { font-size: 10px; opacity: .7; margin-left: auto; }

.drst-pdf-item { color: rgba(255,255,255,0.6); }
.drst-pdf-item svg { color: rgba(255,255,255,0.6); }
.drst-pdf-item:hover { color: #fff; }

/* ES = "ver original" — separado visualmente */
.drst-original {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 4px;
  padding-top: 9px;
  color: rgba(255,255,255,0.55);
  font-style: italic;
}
.drst-original:hover { color: rgba(255,255,255,0.9); }

/* ── El Globo ─────────────────────────────────────────── */
#drst-globe-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  cursor: pointer;
  outline: none;
}

#drst-globe-wrap:focus-visible {
  box-shadow: 0 0 0 3px rgba(100,180,255,0.5);
  border-radius: 50%;
}

#drst-globe-svg {
  width: 72px;
  height: 72px;
  animation: drst-globe-spin 12s linear infinite,
             drst-globe-glow 4s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 24px rgba(0,100,220,.4));
  transition: transform .2s;
}

#drst-globe-wrap:hover #drst-globe-svg {
  animation-duration: 4s, 4s;
  filter: drop-shadow(0 8px 32px rgba(0,140,255,.6));
}

@keyframes drst-globe-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes drst-globe-glow {
  from { filter: drop-shadow(0 6px 24px rgba(0,100,220,.4)); }
  to   { filter: drop-shadow(0 8px 32px rgba(30,160,255,.65)); }
}

/* ── Mascota ──────────────────────────────────────────── */
#drst-pet {
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  z-index: 2;
}

#drst-widget.open #drst-pet {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* ── Íconos orbitales ─────────────────────────────────── */
.drst-orbit-icon {
  position: absolute;
  font-size: 14px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  width: 20px;
  height: 20px;
  text-align: center;
  line-height: 20px;
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
  animation: drst-orbit var(--dur, 8s) linear var(--delay, 0s) infinite;
  transform-origin: 0 0;
}

#drst-globe-wrap:hover  .drst-orbit-icon,
#drst-widget.open .drst-orbit-icon {
  opacity: 1;
}

@keyframes drst-orbit {
  from {
    transform: rotate(var(--start, 0deg)) translateX(52px) rotate(calc(-1 * var(--start, 0deg)));
  }
  to {
    transform: rotate(calc(var(--start, 0deg) + 360deg)) translateX(52px) rotate(calc(-1 * (var(--start, 0deg) + 360deg)));
  }
}

/* ── Badge idioma activo ──────────────────────────────── */
#drst-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: #111;
  color: #fff;
  font-size: 13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 3;
  line-height: 1;
}

/* ── Overlay mientras traduce ─────────────────────────── */
#drst-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(248, 246, 243, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

#drst-overlay.on { display: flex; }

#drst-ov-globe {
  width: 80px;
  height: 80px;
  animation: drst-globe-spin 3s linear infinite;
  filter: drop-shadow(0 4px 20px rgba(0,100,220,.35));
}

#drst-overlay-text {
  font-size: 10px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #aaa;
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  margin: 0;
  animation: drst-fade-text 1.4s ease-in-out infinite alternate;
}

@keyframes drst-fade-text {
  from { opacity: .4; }
  to   { opacity: 1;  }
}

/* ── Responsive móvil ─────────────────────────────────── */
@media (max-width: 480px) {
  #drst-widget {
    bottom: 20px;
    right: 16px;
  }
  #drst-globe-svg, #drst-globe-wrap {
    width: 60px;
    height: 60px;
  }
  .drst-lang-item {
    font-size: 10px;
    padding: 6px 12px 6px 9px;
  }
}
