/*
 * Klaro.js Complete Styles for AENU
 * Using klaro-no-css.js — this file provides ALL Klaro styling.
 * Design: Sharp Grotesk, black/white, bottom bar notice, no rounded corners.
 */

/* ============================================================================
   TYPOGRAPHY
   ============================================================================ */

.klaro,
.klaro * {
  font-family: 'Sharp Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-sizing: border-box;
}

/* ============================================================================
   CONSENT NOTICE — Bottom bar
   ============================================================================ */

.klaro .cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #ffffff;
  color: #000000;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  padding: 1.5rem 2rem;
  animation: klaro-slide-up 0.3s ease;
}

/* cn-body wraps both text and buttons — use flex row layout */
.klaro .cookie-notice .cn-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.klaro .cookie-notice .cn-body p {
  margin: 0;
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.875rem;
  line-height: 1.6;
  font-weight: 300;
  flex: 1;
  min-width: 0;
}

/* Links in notice text */
.klaro .cookie-notice a {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.2s ease;
}

.klaro .cookie-notice a:hover {
  opacity: 0.7;
}

/* Button container in notice */
.klaro .cookie-notice .cn-ok {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

/* "Manage preferences" link on notice */
.klaro .cookie-notice .cn-learn-more {
  font-size: 0.8125rem;
  color: rgba(0, 0, 0, 0.5);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.klaro .cookie-notice .cn-learn-more:hover {
  color: #000000;
}

/* ============================================================================
   BUTTONS — Equal prominence
   ============================================================================ */

.klaro .cm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

/* Remove browser default blue focus outline */
.klaro .cm-btn:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.klaro .cm-btn:focus:not(:focus-visible) {
  box-shadow: none;
}

.klaro .cm-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
}

/* Accept / Accept All — solid black */
.klaro .cm-btn.cm-btn-success,
.klaro .cm-btn.cm-btn-accept-all {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.klaro .cm-btn.cm-btn-success:hover,
.klaro .cm-btn.cm-btn-accept-all:hover {
  background: #333333;
  border-color: #333333;
}

/* Decline — outlined */
.klaro .cm-btn.cm-btn-decline {
  background: transparent;
  color: #000000;
  border-color: rgba(0, 0, 0, 0.25);
}

.klaro .cm-btn.cm-btn-decline:hover {
  border-color: #000000;
}

/* "Accept selected" button — hide from notice, only show in modal */
.klaro .cookie-notice .cm-btn.cm-btn-accept {
  display: none;
}

/* Save button in modal */
.klaro .cm-btn.cm-btn-info,
.klaro .cm-btn.cm-btn-accept {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.klaro .cm-btn.cm-btn-info:hover,
.klaro .cm-btn.cm-btn-accept:hover {
  background: #333333;
  border-color: #333333;
}

/* ============================================================================
   CONSENT MODAL — Preferences (via footer "Manage Cookies")
   ============================================================================ */

/* Overlay */
.klaro .cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Modal box */
.klaro .cookie-modal .cm-modal {
  background: #ffffff;
  color: #000000;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

/* Modal header */
.klaro .cookie-modal .cm-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.klaro .cookie-modal .cm-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: #000000;
}

.klaro .cookie-modal .cm-header h1 a {
  color: inherit;
  text-decoration: none;
}

/* Close button */
.klaro .cookie-modal .cm-modal .hide {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: rgba(0, 0, 0, 0.5);
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.2s ease;
}

.klaro .cookie-modal .cm-modal .hide:hover {
  color: #000000;
}

/* Modal body */
.klaro .cookie-modal .cm-body {
  padding: 1rem 1.5rem;
}

.klaro .cookie-modal .cm-body p {
  margin: 0 0 1rem;
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 300;
}

/* Service list */
.klaro .cookie-modal .cm-list-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
}

.klaro .cookie-modal .cm-list-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
}

.klaro .cookie-modal .cm-list-description {
  color: rgba(0, 0, 0, 0.6);
  font-size: 0.8125rem;
  line-height: 1.4;
  margin: 0;
  padding-left: 3.25rem;
}

/* Purpose list */
.klaro .cookie-modal .cm-purposes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.klaro .cookie-modal .cm-purpose {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.5rem 0;
}

.klaro .cookie-modal .cm-purpose:last-child {
  border-bottom: none;
}

/* Toggle switch */
.klaro .cm-list-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.klaro .cm-list-label .slider {
  position: relative;
  display: inline-block;
  width: 2.5rem;
  height: 1.25rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.klaro .cm-list-label .slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.klaro .cm-list-input:checked + .cm-list-label .slider {
  background: #000000;
}

.klaro .cm-list-input:checked + .cm-list-label .slider::after {
  transform: translateX(1.25rem);
}

.klaro .cm-list-label .slider:focus-within {
  outline: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

/* Modal footer */
.klaro .cookie-modal .cm-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.klaro .cookie-modal .cm-footer a {
  color: rgba(0, 0, 0, 0.5);
  text-decoration: none;
  font-size: 0.75rem;
}

/* Links in modal */
.klaro .cookie-modal a {
  color: #000000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.klaro .cookie-modal a:hover {
  opacity: 0.7;
}

/* ============================================================================
   HIDE BRANDING & UNWANTED ELEMENTS
   ============================================================================ */

/* "Realized with Klaro!" link */
.klaro .cm-powered-by,
.klaro a[href*="kiprotect.com"] {
  display: none !important;
}

/* Service expand arrow in notice bar */
.klaro .cookie-notice .cm-services,
.klaro .cookie-notice .cm-list {
  display: none;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 768px) {
  .klaro .cookie-notice {
    padding: 1.25rem;
  }

  .klaro .cookie-notice .cn-body {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .klaro .cookie-notice .cn-ok {
    justify-content: stretch;
  }

  .klaro .cookie-notice .cn-ok .cm-btn {
    flex: 1;
    justify-content: center;
  }

  .klaro .cookie-modal .cm-modal {
    max-height: 90vh;
    margin: 0.5rem;
  }
}

/* ============================================================================
   ANIMATION
   ============================================================================ */

@keyframes klaro-slide-up {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
