.cookiepopup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem;
}

.cookiepopup.cookiepopup-hidden {
  display: none;
}

.cookiepopup:not(.cookiepopup-hidden) {
  animation: cookiepopup-slide-up 0.3s ease-out;
}

@keyframes cookiepopup-slide-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cookiepopup-panel {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid #1f2937;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, #111827, #030712);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.cookiepopup-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  border: 1px solid rgba(234, 179, 8, 0.3);
  background: linear-gradient(to bottom right, rgba(234, 179, 8, 0.2), rgba(249, 115, 22, 0.2));
  color: #facc15;
}

.cookiepopup-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.cookiepopup-body {
  flex: 1;
  min-width: 0;
}

.cookiepopup-title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
}

.cookiepopup-text {
  margin: 0;
  max-width: 36rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: #9ca3af;
}

.cookiepopup-link {
  color: #22d3ee;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.cookiepopup-link:hover {
  color: #67e8f9;
}

.cookiepopup-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: auto;
}

.cookiepopup-accept,
.cookiepopup-decline {
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.cookiepopup-accept {
  color: #000;
  font-weight: 700;
  background: linear-gradient(to right, #06b6d4, #22d3ee);
}

.cookiepopup-accept:hover {
  background: linear-gradient(to right, #22d3ee, #67e8f9);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
}

.cookiepopup-decline {
  color: #d1d5db;
  background: #1f2937;
  border: 1px solid #374151;
}

.cookiepopup-decline:hover {
  color: #fff;
  background: #374151;
}

@media (max-width: 1499px) {
  .cookiepopup {
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .cookiepopup-panel {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 1rem;
    max-width: none;
    width: 100%;
    padding: 1.25rem;
    border-radius: 0.875rem;
  }

  .cookiepopup-icon {
    display: none;
  }

  .cookiepopup-body {
    grid-column: 1;
    grid-row: 1;
    align-self: auto;
  }

  .cookiepopup-title {
    margin-bottom: 0.375rem;
    font-size: 1rem;
  }

  .cookiepopup-text {
    max-width: none;
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .cookiepopup-buttons {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    width: 100%;
    gap: 0.625rem;
  }

  .cookiepopup-accept,
  .cookiepopup-decline {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.75rem 1rem;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .cookiepopup {
    padding: 0.75rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }

  .cookiepopup-panel {
    padding: 1rem;
    gap: 0.875rem;
  }

  .cookiepopup-buttons {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    gap: 0.5rem;
  }

  .cookiepopup-accept,
  .cookiepopup-decline {
    flex: none;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookiepopup:not(.cookiepopup-hidden) {
    animation: none;
  }
}
