/* ============================================================
   AUTO KING — COOKIE BANNER
   Componente reutilizable (JS + CSS) de aviso de cookies.
   Fuente: Smooch Sans · Paleta: rojo #A30D0D, dorado #f0a500, negro
   Soporte claro/oscuro: reacciona a data-theme="light|dark" en <html>.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Smooch+Sans:wght@400;500;600;700;800&display=swap');

.ak-cookie-banner {
  --ak-red: #A30D0D;
  --ak-red-hover: #7e0a0a;
  --ak-gold: #f0a500;
  --ak-gold-dark: #d18e00;
  --ak-bg: #ffffff;
  --ak-bg-2: #f6f4ef;
  --ak-text: #0b0f19;
  --ak-text-muted: rgba(11, 15, 25, 0.72);
  --ak-border: rgba(0, 0, 0, 0.12);

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9000;
  background: var(--ak-bg);
  color: var(--ak-text);
  font-family: 'Smooch Sans', 'Inter', -apple-system, sans-serif;
  border-top: 3px solid var(--ak-red);
  box-shadow: 0 -12px 40px rgba(5, 11, 26, 0.12);
  transform: translateY(110%);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 18px 24px;
}

/* Modo oscuro */
html[data-theme="dark"] .ak-cookie-banner {
  --ak-bg: #0a0a0a;
  --ak-bg-2: #161616;
  --ak-text: #f5f5f5;
  --ak-text-muted: rgba(245, 245, 245, 0.72);
  --ak-border: rgba(255, 255, 255, 0.10);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
}

.ak-cookie-banner.show {
  transform: translateY(0);
}

.ak-cookie-banner.hide {
  transform: translateY(110%);
}

.ak-cookie-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.ak-cookie-text {
  flex: 1;
  min-width: 0;
}

.ak-cookie-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--ak-gold);
  margin-bottom: 2px;
}

.ak-cookie-text p {
  font-size: 15px;
  font-weight: 400;
  color: var(--ak-text-muted);
  line-height: 1.45;
  margin: 0;
}

.ak-cookie-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ak-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(240, 165, 0, 0.5);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.ak-cookie-link:hover {
  color: var(--ak-gold-dark);
}

.ak-cookie-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.ak-cookie-contact {
  font-size: 13px;
  font-weight: 500;
  color: var(--ak-text-muted);
  text-align: right;
  letter-spacing: 0.2px;
}

.ak-cookie-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.ak-cookie-btn {
  font-family: 'Smooch Sans', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ak-cookie-btn-primary {
  color: #fff;
  background: var(--ak-red);
  border: 2px solid var(--ak-red);
  box-shadow: 0 6px 18px rgba(163, 13, 13, 0.35);
}

.ak-cookie-btn-primary:hover {
  background: var(--ak-red-hover);
  border-color: var(--ak-red-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(163, 13, 13, 0.45);
}

.ak-cookie-btn-secondary {
  color: var(--ak-gold);
  background: transparent;
  border: 2px solid var(--ak-gold);
  box-shadow: none;
}

.ak-cookie-btn-secondary:hover {
  background: rgba(240, 165, 0, 0.12);
  color: var(--ak-gold-dark);
  transform: translateY(-2px);
}

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

.ak-cookie-btn:focus-visible,
.ak-cookie-link:focus-visible {
  outline: 3px solid var(--ak-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Móvil ---- */
@media (max-width: 768px) {
  .ak-cookie-banner {
    padding: 16px 18px;
  }
  .ak-cookie-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .ak-cookie-title {
    font-size: 18px;
  }
  .ak-cookie-text p {
    font-size: 14px;
  }
  .ak-cookie-side {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }
  .ak-cookie-contact {
    text-align: center;
    font-size: 12px;
  }
  .ak-cookie-actions {
    width: 100%;
    gap: 10px;
  }
  .ak-cookie-actions .ak-cookie-btn {
    flex: 1;
    width: auto;
    text-align: center;
    padding: 13px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ak-cookie-banner {
    transition: none;
  }
}
