/**
 * django-cookie-optin default styles
 * Override via CSS variables: --cookie-optin-primary, --cookie-optin-slider, --cookie-optin-notice-image
 */
:root {
  /* Use project's --theme-primary or Bootstrap's --bs-primary if defined, else fallback */
  --cookie-optin-primary: var(--theme-primary, var(--bs-primary, #2980b9));
  --cookie-optin-slider: var(--theme-primary, var(--bs-primary, #2980b9));
  --cookie-optin-notice-image: url('img/cookie.svg');
}

/* Legacy notice (e.g. video overlay) */
.cookieoptin-notice {
  padding: 20px;
  background-color: #222;
  border: 1px solid #fff;
}
.cookieoptin-notice strong {
  color: white;
  display: block;
}
.cookieoptin-notice a {
  color: var(--cookie-optin-primary);
}
.cookieoptin-notice .btn {
  box-shadow: none;
  border-radius: 0;
  padding: 10px 15px;
  border: 0;
}
.cookieoptin-notice .btn.btn-success {
  background-color: var(--cookie-optin-primary);
  color: white;
}
.cookieoptin-notice .btn.btn-decline {
  border: 1px solid #888;
  color: #444;
  background-color: transparent;
}

/* Klaro modal container */
#cookie-optin .cookie-modal {
  z-index: 99999;
}

.klaro .cookie-modal .slider{
  padding: 0;
  box-shadow: none !important;
}

#cookie-optin .klaro input:checked + .cm-app-label .slider,
#cookie-optin .klaro input:checked + .cm-service-label .slider {
  background-color: var(--cookie-optin-slider);
}
#cookie-optin .klaro p,
#cookie-optin .klaro h1,
#cookie-optin .klaro h2,
#cookie-optin .klaro ul,
#cookie-optin .klaro li,
#cookie-optin .klaro strong {
  color: #333;
}

#cookie-optin .klaro a {
  color: var(--cookie-optin-primary);
}

#cookie-optin .klaro h1 {
  font-size: 24px !important;
  font-weight: bold;
  font-family: var(--bs-body-font-family) !important;
}

/* Buttons */
#cookie-optin .klaro .cm-btn {
  order: 3;
  box-shadow: none;
  padding: 10px 35px;
  font-weight: bold !important;
}
#cookie-optin .klaro .cm-btn.cm-btn-success {
  order: 1;
  background-color: var(--cookie-optin-primary);
}
#cookie-optin .klaro .cm-btn.cm-btn-info {
  order: 2;
}
#cookie-optin .klaro .cm-btn.cn-decline {
  border: 1px solid #fff;
  color: #888;
  background-color: transparent;
}
#cookie-optin .klaro .cm-btn.cn-decline:hover {
  border: 1px solid #ccc;
}

/* Modal */
#cookie-optin .klaro .cm-modal {
  background-color: #fff;
  
}

#cookie-optin .klaro .cm-modal{
  max-width: 600px;
  margin: 0 auto;
}

#cookie-optin .klaro .cm-modal .cm-header,
#cookie-optin .klaro .cm-modal .cm-footer {
  border-color: #eee;
}
#cookie-optin .klaro .cm-modal .cm-toggle-all {
  border-top: 0;
}
#cookie-optin .klaro .cm-modal .cm-body {
  padding: 10px;
}


/* Cookie notice (first-time banner) */
#cookie-optin .klaro .cookie-notice {
  background-color: #fff;
  padding-top: 120px;
  box-shadow: none;
  border-radius: 10px;
  border: 1px solid #eee;
  box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}
@media (min-width: 990px) {
  #cookie-optin .klaro .cookie-notice {
    max-width: 600px;
  }
}
#cookie-optin .klaro .cookie-notice::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 50%;
  margin-right: -50px;
  height: 90px;
  width: 90px;
  background-size: cover;
  background-image: var(--cookie-optin-notice-image);
}

#cookie-optin .klaro .cookie-notice .cn-ok {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}
@media (max-width: 767px) {
  #cookie-optin .klaro .cookie-notice .cn-ok {
    flex-direction: column;
  }
  #cookie-optin .klaro .cookie-notice .cn-ok .cm-btn:not(:nth-child(even)) {
    margin-bottom: 10px;
  }
}

#cookie-optin .cm-footer-buttons {
 flex-wrap: wrap;
 gap: 10px;
}

/* Video player with cookie overlay */
.video {
  position: relative;
}
.video p {
  color: white;
}
.video .video-player {
  padding: 1rem;
}

/* Hide iframe until consent */
.cookieoptin-notice + iframe {
  display: none;
}

.cookieoptin-hide {
  display: none;
}
.cookieoptin-hide.cookieoptin-notice + iframe {
  display: block;
}



@media (min-width: 768px) {
  #cookie-optin .klaro .cm-modal .cm-body {
    padding: 1rem !important;
  }
}