/**
 * PN Cookie Consent - front office styles.
 * Colors are applied at runtime as CSS variables on #cc-main (see pn_cookieconsent.js).
 *
 * @author    Prestanaut
 * @copyright Prestanaut
 * @license   Commercial
 */

/* Banner: inherit the theme font */
#cc-main {
  --cc-font-family: inherit;
}

#cc-main .cm__footer a,
#cc-main .pm__section-desc a {
  text-decoration: underline;
}

/* "Cookie settings" footer link */
.pn-cc-footer-link {
  padding: 0.5rem 0;
}

.pn-cc-footer-link__a {
  cursor: pointer;
}

/* Placeholder shown instead of a blocked iframe (spans: valid inside <p>) */
.pn-cc-iframe-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-sizing: border-box;
  width: 100%;
  min-height: 200px;
  padding: 1.5rem;
  background: #f4f5f7;
  border: 1px solid #dfe3e8;
  color: #2c2f31;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.pn-cc-iframe-placeholder__text {
  display: block;
  max-width: 32rem;
}

.pn-cc-iframe-placeholder__btn {
  cursor: pointer;
}

/* Cookie declaration ([pn_cookie_declaration] / displayPnCookieDeclaration) */
.pn-cc-declaration__category {
  margin-bottom: 2rem;
}

.pn-cc-declaration__badge {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
}

.pn-cc-declaration__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pn-cc-declaration__table {
  width: 100%;
  min-width: 36rem;
  font-size: 0.875rem;
}

.pn-cc-declaration__table code,
.pn-cc-declaration__consent code {
  word-break: break-all;
}

.pn-cc-declaration__consent {
  padding: 1rem 1.25rem;
  border: 1px solid #dfe3e8;
  border-radius: 0.25rem;
  background: #f8f9fa;
}

.pn-cc-declaration__help {
  font-size: 0.8125rem;
  opacity: 0.8;
}

/* Floating "Cookie settings" button (created by pn_cookieconsent.js after a decision) */
.pn-cc-widget {
  position: fixed;
  bottom: 20px;
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  min-width: 48px;
  height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 24px;
  background: #30363c;
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.pn-cc-widget--left {
  left: 20px;
}

.pn-cc-widget--right {
  right: 20px;
}

.pn-cc-widget:hover {
  transform: translateY(-2px);
}

.pn-cc-widget:focus-visible {
  outline: 3px solid #1d6ff2;
  outline-offset: 2px;
}

.pn-cc-widget svg {
  flex: none;
  width: 24px;
  height: 24px;
}

/* Icon only: the label stays available to screen readers */
.pn-cc-widget__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.pn-cc-widget--label {
  padding: 0 16px 0 12px;
}

.pn-cc-widget--label .pn-cc-widget__label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

html.show--consent .pn-cc-widget,
html.show--preferences .pn-cc-widget {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .pn-cc-widget {
    transition: none;
  }
}

@media print {
  .pn-cc-widget {
    display: none;
  }
}
