/**
 * Copyright since 2002 Creabilis
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to contact@creabilis.com so we can send you a copy immediately.
 *
 * @author    Creabilis <contact@creabilis.com>
 * @copyright Since 2002 Creabilis
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of Creabilis
 */

:root {
  --crea-popup-ck-bg: #fff;
  --crea-popup-ck-border-color: #d3d3d3;
  --crea-popup-ck-btn-primary-bg: var(--bs-primary, var(--primary, #000));
  --crea-popup-ck-btn-primary-color: #fff;
}

/* Popup cookie */

.crea-popup-ck {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999999999;
  display: flex;
  width: 100%;
  height: 100%;
  padding-top: .5rem;
  font-size: .875rem;
  line-height: 1.5;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease-in-out;
}

.crea-popup-ck--bottom-left {
  align-items: flex-end;
}

.crea-popup-ck--center {
  align-items: center;
  justify-content: center;
}

.crea-popup-ck.active {
  visibility: visible;
  opacity: 1;
}

.crea-popup-ck.active .crea-popup-ck-content {
  transform: translateY(0);
}

@media (min-width: 576px) {
  .crea-popup-ck {
    padding: 1.25rem;
  }

  .crea-popup-ck--bottom-left {
    --crea-popup-ck-max-width: 28.75rem;
  }

  .crea-popup-ck--center {
    --crea-popup-ck-max-width: 33.75rem;
  }
}

/* Popup cookie content */

.crea-popup-ck-content {
  display: flex;
  flex-direction: column;
  row-gap: .5rem;
  width: 100%;
  max-width: var(--crea-popup-ck-max-width, none);
  max-height: 100%;
  transition: transform .3s ease-in-out;
  transform: translateY(100%);
}

/* Popup cookie overlay */

.crea-popup-ck-overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  background-color: rgba(0, 0, 0, .75);
}

/* Popup cookie step */

.crea-popup-ck-step {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  pointer-events: auto;
  background-color: var(--crea-popup-ck-bg);
  box-shadow: 0 0 .625rem 0 rgba(0, 0, 0, .2);
}

@media (min-width: 576px) {
  .crea-popup-ck-step {
    border-radius: .5rem;
  }
}

.crea-popup-ck-step.active {
  display: flex;
}

.crea-popup-ck-step__content {
  flex: 1 1 0%;
  padding: 3rem 1.25rem 2rem;
  overflow-y: auto;
  background-image: url("../img/cookies.svg");
  background-repeat: no-repeat;
  background-attachment: local;
  background-position: top right;
  background-size: 5rem;
}

.crea-popup-ck-step__title {
  padding-right: 3rem;
  margin-bottom: .625rem;
  font-size: 1.5rem;
  font-weight: 500;
}

.crea-popup-ck-step__link,
.crea-popup-ck-step__link:hover {
  color: inherit;
  text-decoration: underline;
}

.crea-popup-ck-step__link:hover {
  opacity: .6;
}

.crea-popup-ck-step__list {
  padding-left: 0;
  margin-bottom: 0;
  list-style: none;
}

.crea-popup-ck-step__item {
  display: flex;
  column-gap: .5rem;
  align-items: flex-start;
  padding-top: .625rem;
  padding-bottom: .625rem;
}

.crea-popup-ck-step__item:not(:last-child) {
  border-bottom: 1px solid var(--crea-popup-ck-border-color);
}

.crea-popup-ck-step__item--all {
  font-weight: 500;
}

.crea-popup-ck-step__input {
  position: relative;
  top: .1875rem;
}

.crea-popup-ck-step__label {
  width: 100%;
  margin-bottom: 0;
}

.crea-popup-ck-step__item-name {
  margin-bottom: 0;
}

.crea-popup-ck-step__item-description {
  margin-bottom: 0;
  font-size: .875em;
  opacity: .6;
}

.crea-popup-ck-step__footer {
  display: flex;
  border-top: 1px solid var(--crea-popup-ck-border-color);
}

.crea-popup-ck-step__footer-btn {
  flex: 1 1 0%;
  padding: .75rem;
  color: inherit;
  background-color: transparent;
  border-width: 0;
}

.crea-popup-ck-step__footer-btn:not(:last-child) {
  border-right: 1px solid var(--crea-popup-ck-border-color);
}

.crea-popup-ck-step__footer-btn--primary {
  font-weight: 500;
  color: var(--crea-popup-ck-btn-primary-color);
  background-color: var(--crea-popup-ck-btn-primary-bg);
}

/* Popup cookie deny button */

.crea-popup-ck-deny-btn {
  align-self: flex-end;
  padding: .25rem 1rem;
  font-size: .8125rem;
  color: inherit;
  pointer-events: auto;
  background-color: var(--crea-popup-ck-bg);
  border-width: 0;
  border-radius: 5rem;
  box-shadow: 0 0 .625rem 0 rgba(0, 0, 0, .2);
}

.crea-popup-ck-deny-btn::after {
  margin-left: .375rem;
  content: "✕";
}
