/* =========================
   HIVARO – Clean UI Kit
   Hauptdatei (Master) - Importiert alle CSS-Module
   ========================= */

/* CSS IMPORTS */
@import url('./tokens.css');
@import url('./base.css');
@import url('./components.css');
@import url('./layout.css');
@import url('./pages.css');

/* ======================================================
   ANIMATIONS
   ====================================================== */

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.on {
  opacity: 1;
  transform: translateY(0);
}

/* Brand animation */
@keyframes brandSlideGrow {
  0% { transform: translateX(0) scale(1); }
  40% { transform: translateX(6px) scale(1.08); }
  70% { transform: translateX(12px) scale(1.14); }
  100% { transform: translateX(8px) scale(1.10); }
}

@keyframes logoSlideGrow {
  0% { transform: translateX(0) scale(1); }
  40% { transform: translateX(4px) scale(1.06); }
  70% { transform: translateX(9px) scale(1.12); }
  100% { transform: translateX(6px) scale(1.08); }
}

.brand-anim {
  transform-origin: left center;
  animation: brandSlideGrow 520ms cubic-bezier(.2,.9,.2,1) forwards;
}

.logo-anim {
  transform-origin: left center;
  animation: logoSlideGrow 520ms cubic-bezier(.2,.9,.2,1) forwards;
}

/* Soft pulse animation for primary button */
@keyframes softPulse {
  0%, 100% {
    box-shadow: 0 10px 30px rgba(45,45,45,.18), 0 0 0 0 rgba(91,141,239,.0);
  }
  50% {
    box-shadow: 0 12px 36px rgba(45,45,45,.22), 0 0 0 6px rgba(91,141,239,.12);
  }
}

/* ======================================================
   COOKIE BANNER
   ====================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #111827, #0a0e14);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  transform: translateY(100%);
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}

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

.cookie-content {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-text {
  color: rgba(234,240,255,.92);
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
  min-width: 280px;
}

.cookie-text a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-text a:hover {
  opacity: .8;
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border .18s ease;
}

.cookie-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}

.cookie-btn.primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #1a1a1a;
}

.cookie-btn.primary:hover {
  background: var(--color-accent);
  filter: brightness(1.1);
}

/* ======================================================
   COOKIE CONSENT MODAL
   ====================================================== */
.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal.visible {
  display: flex;
}

.cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.cookie-modal-content {
  position: relative;
  background: #fff;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--stroke);
}

.cookie-modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.cookie-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}

.cookie-modal-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.cookie-modal-body {
  padding: 24px;
}

.cookie-intro {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.cookie-category {
  margin-bottom: 16px;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--color-bg-main);
  border-radius: 12px;
}

.cookie-category-info h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text);
}

.cookie-category-info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 28px;
  transition: background .3s ease;
}

.cookie-toggle .slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .slider {
  background: var(--color-primary);
}

.cookie-toggle input:checked + .slider::before {
  transform: translateX(24px);
}

.cookie-toggle input:disabled + .slider {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Info Box */
.cookie-info-box {
  margin-top: 20px;
  padding: 16px;
  background: rgba(200, 136, 42, 0.07);
  border-radius: 12px;
  border: 1px solid rgba(200, 136, 42, 0.14);
}

.cookie-info-box h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--color-primary);
}

.cookie-info-box ul {
  margin: 0 0 12px;
  padding-left: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.cookie-info-box p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.cookie-info-box strong {
  color: var(--text);
}

.cookie-modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--stroke);
  justify-content: flex-end;
}

.cookie-modal-footer .btn {
  min-width: auto;
  padding: 12px 24px;
}

/* Mobile Anpassungen für Banner */
@media (max-width: 640px) {
  .cookie-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    text-align: center;
  }
}

/* Mobile Anpassungen für Modal */
@media (max-width: 560px) {
  .cookie-modal-content {
    border-radius: 16px;
    margin: 10px;
  }

  .cookie-modal-header {
    padding: 16px 20px;
  }

  .cookie-modal-body {
    padding: 20px;
  }

  .cookie-category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cookie-toggle {
    align-self: flex-end;
  }

  .cookie-modal-footer {
    flex-direction: column;
    padding: 16px 20px;
  }

  .cookie-modal-footer .btn {
    width: 100%;
  }
}