/**
 * ChecaApp — Estilos del Consentimiento de Cookies
 * Diseño flotante no intrusivo, glassmorphic y responsive
 */

.cookie-banner-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999999;
  max-width: 420px;
  width: calc(100% - 3rem);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  padding: 1.25rem 1.35rem;
  color: #f1f5f9;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.cookie-banner-container.cookie-banner-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-banner-container.cookie-banner-closing {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  pointer-events: none;
}

/* Header */
.cookie-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.cookie-banner-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-banner-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-block;
  animation: cookieWiggle 3s ease-in-out infinite;
}

@keyframes cookieWiggle {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-8deg); }
  20%, 40% { transform: rotate(8deg); }
  50% { transform: rotate(0deg); }
}

.cookie-banner-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.cookie-banner-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.cookie-banner-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Descripción */
.cookie-banner-text {
  margin: 0 0 1rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #94a3b8;
}

.cookie-banner-link {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.cookie-banner-link:hover {
  color: #7dd3fc;
}

/* Botones de Acción */
.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cookie-banner-btn {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}

.cookie-banner-btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.cookie-banner-btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.cookie-banner-btn-primary:active {
  transform: translateY(0);
}

.cookie-banner-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.cookie-banner-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Badge de estado guardado */
.cookie-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: #10b981;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Adaptación Responsive */
@media (max-width: 576px) {
  .cookie-banner-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
    padding: 1.15rem;
  }

  .cookie-banner-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .cookie-banner-btn {
    width: 100%;
    padding: 0.75rem 1rem;
  }
}

/* ==============================================================================
   ACCESSIBILITY HARDENING (A11Y & INTENTIONAL MOTION)
   ============================================================================== */

:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.cookie-banner-btn:focus-visible,
.cookie-banner-close-btn:focus-visible,
.cookie-banner-link:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner-icon {
    animation: none !important;
  }

  .cookie-banner-container {
    transition-duration: 0.08s !important;
    transform: none !important;
  }

  .cookie-banner-btn-primary:hover {
    transform: none !important;
  }
}

