/**
 * @file
 * The visitor statistics notice and the "Cookie settings" link.
 *
 * Klaro renders the notice; these rules give it the portal's look over
 * Klaro's own: the Poppins title, the Rubik text, the palette and the
 * theme's button style. Every notice rule starts at #klaro, so it wins over
 * Klaro's class selectors whatever the order of the files.
 */

/* A bar at the foot of the window, as wide as the boxed page. */
#klaro .cookie-notice:not(.cookie-modal-notice) {
  position: fixed;
  z-index: 1200;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  border-top: 4px solid #260387;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  color: #3e3e3e;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  line-height: 1.714;
}

#klaro .cookie-notice:not(.cookie-modal-notice):focus {
  outline: none;
}

#klaro .cookie-notice:not(.cookie-modal-notice):focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: -6px;
}

#klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 32px;
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
}

#klaro .cookie-notice .cn-body h2#id-cookie-title {
  grid-column: 1;
  margin: 0 0 4px;
  padding: 0;
  color: #282828;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
}

#klaro .cookie-notice .cn-body p {
  grid-column: 1;
  margin: 0;
  padding: 0;
  color: #3e3e3e;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  line-height: 1.714;
  text-align: left;
}

#klaro .cookie-notice .cn-body p.cn-changes {
  margin-top: 4px;
  text-decoration: none;
}

/* The link to the privacy notice, on a line of its own. */
#klaro .cookie-notice #id-cookie-notice a {
  display: table;
  min-height: 0;
  margin-top: 4px;
  color: #260387;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#klaro .cookie-notice #id-cookie-notice a:hover {
  color: #1a025e;
}

#klaro .cookie-notice #id-cookie-notice a:focus {
  outline: none;
}

#klaro .cookie-notice #id-cookie-notice a:focus-visible {
  border-radius: 2px;
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

#klaro .cookie-notice .cn-body .cn-ok {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 3;
  justify-content: flex-end;
  margin: 0;
}

/* Accept and Decline: the same size and weight, the theme's button look. */
#klaro .cookie-notice .cn-body .cn-ok .cn-buttons {
  display: flex;
  gap: 12px;
  width: auto;
  margin: 0;
}

#klaro .cookie-notice .cn-body .cn-buttons button.cm-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 140px;
  margin: 0;
  padding: 10px 25px;
  cursor: pointer;
  /* Not "all": the focus outline appears at once, without a white flash. */
  transition: background-color 0.3s ease, border-color 0.3s ease;
  text-align: center;
  text-transform: uppercase;
  color: #fff;
  border: 2px solid #1a73e8;
  border-radius: 4px;
  background: #1a73e8;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

#klaro .cookie-notice .cn-body .cn-buttons button.cm-btn:hover {
  border-color: #0d47a1;
  background: #0d47a1;
}

#klaro .cookie-notice .cn-body .cn-buttons button.cm-btn:focus {
  outline: none;
}

#klaro .cookie-notice .cn-body .cn-buttons button.cm-btn:focus-visible {
  outline: 2px solid #260387;
  outline-offset: 2px;
}

@media (max-width: 991px) {
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }

  #klaro .cookie-notice .cn-body h2#id-cookie-title {
    font-size: 16px;
  }

  /* Tighter lines: the notice takes less of a small screen. */
  #klaro .cookie-notice .cn-body p {
    line-height: 1.5;
  }

  #klaro .cookie-notice .cn-body .cn-ok {
    grid-column: 1;
    grid-row: auto;
    margin-top: 12px;
  }

  #klaro .cookie-notice .cn-body .cn-ok .cn-buttons {
    width: 100%;
  }

  #klaro .cookie-notice .cn-body .cn-buttons button.cm-btn {
    min-width: 0;
    padding: 10px 16px;
  }
}

/* Phones: smaller text and the theme's small buttons, so the notice takes
   about a quarter of the screen. */
@media (max-width: 575px) {
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    padding: 10px 12px;
  }

  #klaro .cookie-notice .cn-body h2#id-cookie-title {
    margin-bottom: 0;
    font-size: 14px;
  }

  #klaro .cookie-notice .cn-body p {
    font-size: 13px;
    line-height: 1.4;
  }

  /* The link to the privacy notice runs on after the text. */
  #klaro .cookie-notice #id-cookie-notice a {
    display: inline;
    margin-top: 0;
  }

  #klaro .cookie-notice .cn-body .cn-ok {
    margin-top: 8px;
  }

  #klaro .cookie-notice .cn-body .cn-buttons button.cm-btn {
    padding: 6px 16px;
    font-size: 12px;
  }
}

/* Short windows, such as a phone held sideways: the buttons beside the
   text, one above the other, so the text keeps most of the width. */
@media (max-width: 991px) and (max-height: 480px) {
  #klaro .cookie-notice:not(.cookie-modal-notice) .cn-body {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    padding: 10px 16px;
  }

  #klaro .cookie-notice .cn-body h2#id-cookie-title {
    margin-bottom: 0;
    font-size: 14px;
  }

  #klaro .cookie-notice .cn-body p {
    font-size: 13px;
    line-height: 1.4;
  }

  #klaro .cookie-notice #id-cookie-notice a {
    display: inline;
    margin-top: 0;
  }

  #klaro .cookie-notice .cn-body .cn-ok {
    grid-column: 2;
    grid-row: 1 / span 3;
    margin-top: 0;
  }

  #klaro .cookie-notice .cn-body .cn-ok .cn-buttons {
    flex-direction: column;
    gap: 8px;
    width: auto;
  }

  #klaro .cookie-notice .cn-body .cn-buttons button.cm-btn {
    min-width: 112px;
    padding: 6px 16px;
    font-size: 12px;
  }
}

/* Room below the page, so the notice covers nothing at the end of it. */
html.neurotecheu-analytics-notice-open body {
  padding-bottom: var(--neurotecheu-analytics-notice-height, 0);
}

/* "Cookie settings", under the footer, in the footer's colours. */
.neurotecheu-analytics-settings {
  padding: 0 24px 28px;
  text-align: center;
  background: #1a025e;
}

.neurotecheu-analytics-settings .neurotecheu-analytics-settings__button {
  display: inline-block;
  margin: 0;
  padding: 4px 2px;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
  text-transform: none;
  color: rgba(255, 255, 255, 0.65);
  border: 0;
  border-radius: 2px;
  background: none;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}

.neurotecheu-analytics-settings .neurotecheu-analytics-settings__button:hover {
  color: #82fec8;
  background: none;
}

.neurotecheu-analytics-settings .neurotecheu-analytics-settings__button:focus {
  outline: none;
}

.neurotecheu-analytics-settings .neurotecheu-analytics-settings__button:focus-visible {
  outline: 2px solid #82fec8;
  outline-offset: 2px;
}
