/* Banner */
.webbiz-gdpr-banner {
  position: fixed;
  left: 5%;
  bottom: 7%;
  z-index: 100000;

  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 1.5em;
  width: 100%;
  max-width: 25em;

  background-color: var(--gdpr-primary-color);
  border-radius: 0.5em;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.5);
  opacity: 0.001;
  pointer-events: none;
  will-change: opacity;

  color: var(--gdpr-secondary-color);
  font-size: 16px;
}

.webbiz-gdpr-banner a {
  color: var(--gdpr-secondary-color);
  text-decoration: underline;
}

.webbiz-gdpr-banner a:hover,
.webbiz-gdpr-banner a:focus {
  opacity: 0.75;

  color: var(--gdpr-secondary-color);
}

.webbiz-gdpr-banner.is-opened {
  opacity: 1;
  pointer-events: all;
}

.webbiz-gdpr-banner__notice {
  line-height: 1.5;
}

.webbiz-gdpr-banner__buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: 1em 0;
  width: 100%;
}

.webbiz-gdpr-banner__buttons button,
.webbiz-gdpr-modal__button {
  flex-grow: 1;
  margin: 0 0.25em;
  padding: 0.5em 0;

  background-color: var(--gdpr-secondary-color);
  border-radius: 0.25em;
  border: 1px solid var(--gdpr-secondary-color);
  cursor: pointer;

  color: var(--gdpr-primary-color);
}

.webbiz-gdpr-banner__buttons button:hover,
.webbiz-gdpr-modal__button:hover {
  opacity: 0.75;
}

.webbiz-gdpr-banner__buttons button:first-of-type {
  background-color: var(--gdpr-primary-color);

  color: var(--gdpr-secondary-color);
}

/* Modal */
.webbiz-gdpr-modal {
  position: fixed;
  bottom: 7%;
  left: 5%;
  z-index: 100001;

  display: none;
  overflow: auto;
  padding: 1.5em;
  width: 100%;
  max-width: 400px;
  max-height: calc(100% - 8%);

  background-color: var(--gdpr-secondary-color);
  border-radius: 0.5em;
  box-shadow: 0px 8px 24px 0px rgba(20, 20, 20, 0.10), 0px 16px 40px 0px rgba(20, 20, 20, 0.10);

  font-size: 16px;
}

.webbiz-gdpr-modal.is-opened {
  display: block;
}

.webbiz-gdpr-modal__button {
  margin: 1em 0 0;
  padding: 0.5em 0;
  width: 100%;

  border: none;
  border-radius: 0.25em;
  background: var(--gdpr-primary-color);

  color: var(--gdpr-secondary-color);
  font-size: 1em;

  cursor: pointer;
}

.webbiz-gdpr-modal__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.75em 0;

  border-color: #eee;
  border-style: solid;
  border-width: 1px 0 0;
}

.webbiz-gdpr-modal__item:last-child {
  border-width: 1px 0;
}

.webbiz-gdpr-modal__title {
  margin-bottom: 1em;
}

.webbiz-gdpr-modal__title,
.webbiz-gdpr-modal__item-title {
  font-weight: 600;
}

.webbiz-gdpr-modal__item-title {
  flex-grow: 1;
  cursor: pointer;
}

.webbiz-gdpr-modal__item-title:before {
  display: inline-block;
  margin-right: 0.5em;
  width: 0.625em;
  height: 0.625em;

  background-image: url('../img/icon-plus.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  content: '';
}

.webbiz-gdpr-modal__item-text {
  padding: 0 4.5em 0 1.25em;
  overflow: hidden;
  width: 100%;
  height: 0;

  font-size: 0.875em;
}

.webbiz-gdpr-modal__item.is-opened .webbiz-gdpr-modal__item-title:before {
  background-image: url('../img/icon-minus.svg');
}
.webbiz-gdpr-modal__item.is-opened .webbiz-gdpr-modal__item-text {
  margin: 0.5em 0 0;
  height: auto;
}

.webbiz-gdpr-modal__checkbox {
  position: relative;

  display: block;
  width: 56px;
  height: 32px;
}

.webbiz-gdpr-modal__checkbox:hover {
  opacity: 0.75;
}

.webbiz-gdpr-modal__checkbox input {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;

  display: block;
  width: 100%;
  height: 100%;

  opacity: 0;

  cursor: pointer;
}

.webbiz-gdpr-modal__switch {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;

  display: block;
  width: 100%;
  height: 100%;

  background: url('../img/switch-on.svg') 20% center/10px 10px no-repeat, url('../img/switch-off.svg') 80% center/10px 10px no-repeat, var(--gdpr-disable-color);
  border-radius: 999em;

  transition: background 0.05s linear 0.05s;
}

.webbiz-gdpr-modal__switch:before {
  position: absolute;
  top: 4px;
  left: 4px;

  display: block;
  width: 24px;
  height: 24px;

  background-color: #fff;
  border-radius: 100%;
  content: '';

  transition: transform 0.15s cubic-bezier(0.65, 0, 0.35, 1);
}

.webbiz-gdpr-modal__checkbox input:disabled + .webbiz-gdpr-modal__switch {
  opacity: 0.5;
}

.webbiz-gdpr-modal__checkbox input:checked + .webbiz-gdpr-modal__switch {
  background-color: var(--gdpr-enable-color);
}
.webbiz-gdpr-modal__checkbox input:checked + .webbiz-gdpr-modal__switch:before {
  transform: translateX(24px);
}

@media(max-width: 768px) {
  .webbiz-gdpr-banner {
    right: 1em;
    bottom: 1em;
    left: 1em;

    width: auto;
    max-width: none;

    font-size: 14px;
  }

  .webbiz-gdpr-modal {
    right: 1em;
    bottom: 1em;
    left: 1em;

    width: auto;
    max-width: none;

    font-size: 14px;
  }
}
