/* CONTENEDOR DEL SVG */
.svg-box {
  width: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ROBOT SVG */
.robot {
  width: 100%;
  max-width: 320px;      /* ⬅ tamaño real del robot */
  height: auto;
  cursor: pointer;
  overflow: visible;
  animation: flotando 4s ease-in-out infinite;
}

/* COLORES */
.casco, .cuerpo, .brazo {
  fill: #e6e9ef;
}

.visor {
  fill: #0f2d3d;
}

.ojo {
  fill: #3ff3ff;
}

.boca {
  fill: none;
  stroke: #3ff3ff;
  stroke-width: 3;
  stroke-linecap: round;
}

.detalle {
  fill: none;
  stroke: #3ff3ff;
  stroke-width: 3;
}

.sombra {
  fill: rgba(0,0,0,0.15);
}

/* FLOTE */
@keyframes flotando {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* PARPADEO */
.ojo {
  animation: parpadeo 5s infinite;
}

@keyframes parpadeo {
  0%, 96%, 100% { opacity: 1; }
  97%, 99% { opacity: 0; }
}

/* ===================== */
/* SALUDO (BRAZO DERECHO) */
/* ===================== */

.robot .brazo-der {
  transform-box: fill-box;
  transform-origin: top center;
  animation: saludo 10s ease-in-out infinite;
}

@keyframes saludo {
  0%, 70% {
    transform: rotate(0deg);
  }
  
  /* levanta bastante el brazo */
  75% {
    transform: rotate(-65deg);
  }

  80% {
    transform: rotate(-45deg);
  }

  85% {
    transform: rotate(-70deg);
  }

  90% {
    transform: rotate(-55deg);
  }

  100% {
    transform: rotate(0deg);
  }
}


/* ===================== */
/* MODO ENOJADO */
/* ===================== */

.robot.enojado {
  filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.robot.enojado .ojo {
  fill: #ff4d4d;
}

.robot.enojado .boca {
  opacity: 0;
}

.robot.enojado .detalle {
  stroke: #ff0000;
}

/* ===================== */
/* RESPONSIVE */
/* ===================== */

@media (max-width: 768px) {
  .robot {
    max-width: 240px;
  }
}

.robot .brazo-izq {
  transform-box: fill-box;
  transform-origin: top center;
  animation: saludo-izq 10s ease-in-out infinite;
}
@keyframes saludo-izq {
  0%, 70% {
    transform: rotate(0deg);
  }

  75% {
    transform: rotate(65deg);
  }

  80% {
    transform: rotate(45deg);
  }

  85% {
    transform: rotate(70deg);
  }

  90% {
    transform: rotate(55deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* CONTENEDOR DEL SVG */
.svg-box {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* evita que se salga */
}

/* SVG ROBOT RESPONSIVE */
.robot {
  width: clamp(160px, 60%, 320px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

/* ================== COOKIE MODAL ================== */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.cookie-modal {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 520px;
  width: 90%;
  max-height: 90%;
  display: grid;
  gap: 1.5rem;
  text-align: center;
  animation: cookieFade 0.3s ease;
}

/* TEXTO */
.cookie-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  margin: 0;
}

.cookie-description {
  font-size: 0.95rem;
  color: #444;
  margin: 0;
}

.cookie-small {
  font-size: 0.8rem;
  color: #666;
}

/* SVG */
.cookie-svg {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 220px;
}

/* BOTONES */
.cookie-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-accept {
  background: #111;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.cookie-reject {
  background: #e5e5e5;
  color: #111;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

/* ANIMACIÓN */
@keyframes cookieFade {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.imagen-box.svg-box {
  max-width: 200px;
  width: 100%;
  margin: 0 auto;
}

.imagen-box.svg-box svg {
  width: 100%;
  height: auto; /* 👈 MUY IMPORTANTE */
  display: block;
}

.robot {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}


/* SVG */
.imagen-box.svg-box {
  max-width: 180px;
  width: 100%;
}

.imagen-box.svg-box svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Botones SIEMPRE visibles */
.cookie-actions {
  display: flex;
  gap: 1rem;
  margin-top: auto; /* 👈 empuja botones hacia abajo */
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 480px) {

  .cookie-modal {
    max-height: 90vh;
    max-width: 70vh;
    padding: 1.4rem 1.2rem;
    gap: 1rem;
  }

  /* SVG más pequeño */
  .imagen-box.svg-box {
    max-width: 130px;
  }

  /* Título */
  .cookie-title {
    font-size: 1.2rem;
    line-height: 1.3;
  }

  /* Texto principal */
  .cookie-description {
    font-size: 0.9rem;
  }

  .cookie-small {
    font-size: 0.75rem;
  }

  /* Botones en columna */
  .cookie-actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-actions button {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
  }

}

/* ========== COOKIE MODAL RESPONSIVE ========== */
@media (max-width: 600px) {

  .cookie-modal {
    max-width: 360px;
    padding: 1.2rem;
    gap: 1rem;
    border-radius: 14px;
  }

  .cookie-svg {
    min-height: 140px;
  }

  .cookie-svg svg {
    max-width: 180px;
    height: auto;
  }

  .cookie-title {
    font-size: 1.2rem;
  }

  .cookie-description {
    font-size: 0.85rem;
  }

  .cookie-small {
    font-size: 0.7rem;
  }

  .cookie-actions {
    gap: 0.6rem;
  }

  .cookie-accept,
  .cookie-reject {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}
