/* Main Container */
#consent-banner-main {
  position: relative;
  z-index: 2147483647;
}

/* Lock scroll when settings are active */
body.consent-banner-settings-active {
  position: fixed;
  overflow: hidden;
  width: 100%;
}

/* Settings Overlay */
#consent-banner-settings-overlay {
  background-color: #000;
  opacity: 0.5;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2147483646;
  cursor: pointer;
}

#consent-banner-main .consent-banner-heading {
  font-family: naf, sans-serif;
  font-weight: 700;
  font-style: normal;
  display: block;
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 8px;
}

#consent-banner-main p {
  font-family: caf, sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1rem;
  line-height: 1.2;
}

#consent-banner-main p a {
  color: var(--Primary-Blue);
  text-decoration: underline;
}

#consent-banner-main p a:hover {
  text-decoration: none;
}

/* Backdrop */
#consent-banner-main dialog::backdrop {
  background: rgba(0, 0, 0, .7);
}

#consent-banner-main[data-wall="false"] dialog::backdrop {
  display: none;
}

/* Modal & Settings Dialogs - Shared Styles */
#consent-banner-modal,
#consent-banner-settings {
  border: none;
  padding: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.4) 0 0 20px;
}

/* Modal Styles */
#consent-banner-modal {
  padding: 30px 5.2% !important;
}

#consent-banner-modal .consent-banner-modal-wrapper {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  z-index: 1;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

#consent-banner-modal .consent-banner-modal-buttons {
  justify-content: center;
  display: flex;
  align-items: flex-end;
  gap: 10px 15px;
}

#consent-banner-settings .consent-banner-settings-buttons .consent-banner-button:first-child,
#consent-banner-modal .consent-banner-modal-buttons .consent-banner-button:first-child {
  background: #fff;
  outline: 2px solid #000;
  color: #000;
  outline-offset: -2px;
}

#consent-banner-settings .consent-banner-settings-buttons .consent-banner-button:first-child:hover,
#consent-banner-modal .consent-banner-modal-buttons .consent-banner-button:first-child:hover {
  box-shadow: 0 5px 20px 0px #000;
}

/* Settings Dialog */
#consent-banner-settings {
  padding: 30px;
  overflow-x: hidden;
  min-width: 500px;
  max-height: none;
}

#consent-banner-settings .consent-banner-heading {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, .2);
  display: block;
}

#consent-banner-settings > div > form div:nth-child(2) {
  max-height: 65vh;
  overflow-x: hidden;
}

#consent-banner-settings ul {
  list-style: none;
  padding-left: 0;
}

#consent-banner-settings ul li {
  border-bottom: 1px solid #ededed;
  margin-top: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  position: relative;
  padding-left: 22px;
}

#consent-banner-settings ul li input[type="checkbox"] {
  position: absolute;
  left: 0;
  top: 4px;
}

#consent-banner-settings ul label {
  font-family: naf, sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.1;
  margin-left: 0;
  margin-bottom: 8px;
  display: block;
}

#consent-banner-settings .consent-banner-settings-buttons {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: space-around;
  grid-gap: 15px;
}

#consent-banner-settings .consent-banner-settings-buttons .consent-banner-button {
  flex: 1;
}

/* Bar Mode */
#consent-banner-main[data-mode="bar"] #consent-banner-modal {
  margin: 0;
  max-width: none;
  width: auto;
}

#consent-banner-main[data-mode="bar"] #consent-banner-modal[open] {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  z-index: 2147483647;
  border-bottom: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  padding: 5px;
}

/* Modal Mode */
#consent-banner-main[data-mode="modal"] .consent-banner-modal-wrapper {
  display: block;
}

/* Tablet & Mobile Styles */
@media (max-width: 768px) {
  #consent-banner-modal .consent-banner-modal-wrapper {
    display: block;
  }

  #consent-banner-modal .consent-banner-modal-wrapper p {
    margin-bottom: 10px;
  }

  #consent-banner-modal .consent-banner-modal-buttons {
    display: block;
  }

  #consent-banner-modal .consent-banner-modal-buttons .consent-banner-button {
    display: block;
    margin: 0 0 10px;
    text-align: center;
  }
}

@media (max-width: 576px) {
  #consent-banner-main:not([data-mode="bar"]) #consent-banner-modal {
    margin: 0;
    width: 90vw;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  #consent-banner-modal .consent-banner-modal-buttons {
    margin-top: 20px;
  }

  #consent-banner-settings {
    width: 100%;
    border-radius: 0;
    min-width: auto;
    height: 100vh;
    max-height: none;
    max-width: inherit;
    padding: 30px 5.2%;
  }

  #consent-banner-settings ul {
    padding-bottom: 100px;
  }

  #consent-banner-settings .consent-banner-settings-buttons {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: #fff;
    padding: 30px 5.2%;
    text-align: center;
    display: block;
  }

  #consent-banner-settings .consent-banner-settings-buttons .consent-banner-button {
    display: block;
    margin: 0 0 10px;
    text-align: center;
  }
}