/* UC-011: cookie consent banner and settings panel. Every selector is scoped to #kp-consent-*, .kp-consent-* or .kp-btn under those ids. */

#kp-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1035;
  display: flex;
  flex-direction: column;
  max-height: 50vh;
  box-sizing: border-box;
  padding: 12px 16px;
  background: #fff;
  color: #3B495F;
  border-top: 1px solid #EDEFED;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .15);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.4;
}

#kp-consent-banner .kp-consent-text {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#kp-consent-banner p,
#kp-consent-panel p {
  margin: 0 0 6px;
  padding: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

#kp-consent-banner #kp-consent-title,
#kp-consent-panel #kp-consent-ptitle {
  font-size: 16px;
  font-weight: 700;
}

#kp-consent-banner .kp-consent-actions,
#kp-consent-panel .kp-consent-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  margin: 8px -4px 0;
}

#kp-consent-banner .kp-btn,
#kp-consent-panel .kp-btn {
  flex: 1 1 0;
  min-width: 96px;
  box-sizing: border-box;
  min-height: 40px;
  margin: 0 4px 8px;
  padding: 8px 12px;
  background: #fff;
  color: #3B495F;
  border: 2px solid #3B495F;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

#kp-consent-banner .kp-btn:hover,
#kp-consent-panel .kp-btn:hover {
  background: #EDEFED;
}

#kp-consent-banner .kp-btn:focus-visible,
#kp-consent-panel .kp-btn:focus-visible,
#kp-consent-panel .kp-consent-close:focus-visible,
#kp-consent-panel input:focus-visible,
#kp-consent-panel:focus-visible {
  outline: 3px solid #00B620;
  outline-offset: 2px;
}

#kp-consent-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 99990;
  width: 520px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 16px;
  background: #fff;
  color: #3B495F;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

#kp-consent-panel[hidden] {
  display: none;
}

#kp-consent-panel .kp-consent-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#kp-consent-panel .kp-consent-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  margin: -6px -6px 0 8px;
  padding: 0;
  background: transparent;
  color: #3B495F;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

#kp-consent-panel .kp-consent-cat {
  margin: 0 0 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid #EDEFED;
}

#kp-consent-panel .kp-consent-cat-head {
  display: flex;
  align-items: center;
}

#kp-consent-panel .kp-consent-cat-head input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
}

#kp-consent-panel .kp-consent-cat-head label {
  flex: 1 1 auto;
  margin: 0 8px 0 0;
  font-weight: 700;
}

#kp-consent-panel .kp-consent-always {
  flex: 0 0 auto;
  font-size: 12px;
  color: #888;
}

#kp-consent-panel .kp-consent-cat-desc {
  margin: 4px 0 0 26px;
}

@media (max-width: 480px) {
  #kp-consent-banner {
    padding: 10px 12px;
    font-size: 13px;
  }

  #kp-consent-banner .kp-consent-text {
    min-height: 3em;
  }

  #kp-consent-banner .kp-consent-actions,
  #kp-consent-panel .kp-consent-actions {
    flex-direction: column;
    margin: 8px 0 0;
  }

  #kp-consent-banner .kp-btn,
  #kp-consent-panel .kp-btn {
    flex: 0 0 auto;
    width: 100%;
    margin: 0 0 8px;
  }
}

@media (max-height: 420px) {
  #kp-consent-banner .kp-consent-text {
    min-height: 3em;
  }

  #kp-consent-banner .kp-consent-actions,
  #kp-consent-panel .kp-consent-actions {
    flex-direction: row;
    margin: 6px -4px 0;
  }

  #kp-consent-banner .kp-btn,
  #kp-consent-panel .kp-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 32px;
    margin: 0 4px 6px;
    padding: 4px 8px;
    font-size: 12px;
  }
}
