/* Cookie consent banner + preference panel — scoped to #pc-cookie-consent-root */

#pc-cookie-consent-root{
  position: relative;
  z-index: 1200;
}

#pc-cookie-consent-root .pc-cookie-banner{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--pc-border, #e5e5e5);
  box-shadow: 0 -8px 32px rgba(0,0,0,.08);
  padding: 14px 0 calc(14px + env(safe-area-inset-bottom, 0px));
}

#pc-cookie-consent-root .pc-cookie-banner[hidden]{
  display: none !important;
}

#pc-cookie-consent-root .pc-cookie-banner__inner{
  display: grid;
  gap: 14px;
  align-items: center;
  max-width: min(100% - 32px, 1440px);
  margin: 0 auto;
  padding: 0 16px;
}

#pc-cookie-consent-root .pc-cookie-banner__text{
  margin: 0;
  font-size: var(--pc-text-sm, .875rem);
  line-height: 1.55;
  color: var(--pc-text-secondary, #444);
}

#pc-cookie-consent-root .pc-cookie-banner__links{
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: .8125rem;
}

#pc-cookie-consent-root .pc-cookie-banner__links a{
  color: var(--pc-fg, #111);
  text-decoration: underline;
  text-underline-offset: .15em;
}

#pc-cookie-consent-root .pc-cookie-banner__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#pc-cookie-consent-root .pc-cookie-btn{
  appearance: none;
  border: 1px solid var(--pc-border, #ddd);
  background: #fff;
  color: var(--pc-fg, #111);
  border-radius: 999px;
  padding: .62rem 1rem;
  font: inherit;
  font-size: .8125rem;
  font-weight: var(--pc-font-weight-semibold, 600);
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

#pc-cookie-consent-root .pc-cookie-btn:focus-visible{
  outline: 2px solid var(--pc-fg, #111);
  outline-offset: 2px;
}

#pc-cookie-consent-root .pc-cookie-btn--primary{
  background: var(--pc-fg, #111);
  border-color: var(--pc-fg, #111);
  color: #fff;
}

#pc-cookie-consent-root .pc-cookie-btn--primary:hover{
  background: #222;
  border-color: #222;
}

#pc-cookie-consent-root .pc-cookie-btn--ghost:hover{
  border-color: var(--pc-fg, #111);
}

#pc-cookie-consent-root .pc-cookie-dialog{
  width: min(100% - 24px, 520px);
  max-height: calc(100vh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--pc-border, #e5e5e5);
  border-radius: var(--pc-radius-lg, 12px);
  box-shadow: var(--pc-shadow-2, 0 16px 48px rgba(0,0,0,.14));
}

#pc-cookie-consent-root .pc-cookie-dialog::backdrop{
  background: rgba(0,0,0,.42);
}

#pc-cookie-consent-root .pc-cookie-dialog__form{
  padding: 20px 20px 16px;
}

#pc-cookie-consent-root .pc-cookie-dialog__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#pc-cookie-consent-root .pc-cookie-dialog__title{
  margin: 0;
  font-size: var(--pc-text-lg, 1.125rem);
  font-weight: var(--pc-font-weight-bold, 700);
}

#pc-cookie-consent-root .pc-cookie-dialog__close{
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--pc-muted, #666);
  padding: 4px 8px;
}

#pc-cookie-consent-root .pc-cookie-dialog__lead{
  margin: 0 0 16px;
  font-size: var(--pc-text-sm, .875rem);
  color: var(--pc-text-secondary, #555);
  line-height: 1.55;
}

#pc-cookie-consent-root .pc-cookie-pref{
  display: grid;
  gap: 10px;
}

#pc-cookie-consent-root .pc-cookie-pref__row{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--pc-border, #e5e5e5);
  border-radius: var(--pc-radius-md, 8px);
  background: var(--pc-surface-2, #fafafa);
}

#pc-cookie-consent-root .pc-cookie-pref__row.is-disabled{
  opacity: .72;
}

#pc-cookie-consent-root .pc-cookie-pref__meta strong{
  display: block;
  font-size: .875rem;
}

#pc-cookie-consent-root .pc-cookie-pref__meta p{
  margin: 4px 0 0;
  font-size: .8125rem;
  color: var(--pc-muted, #666);
  line-height: 1.45;
}

#pc-cookie-consent-root .pc-cookie-pref__badge{
  font-size: .6875rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pc-muted, #666);
  white-space: nowrap;
}

#pc-cookie-consent-root .pc-cookie-switch{
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

#pc-cookie-consent-root .pc-cookie-switch input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

#pc-cookie-consent-root .pc-cookie-switch__ui{
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #d5d5d5;
  position: relative;
  transition: background .15s ease;
}

#pc-cookie-consent-root .pc-cookie-switch__ui::after{
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}

#pc-cookie-consent-root .pc-cookie-switch input:checked + .pc-cookie-switch__ui{
  background: var(--pc-fg, #111);
}

#pc-cookie-consent-root .pc-cookie-switch input:checked + .pc-cookie-switch__ui::after{
  transform: translateX(18px);
}

#pc-cookie-consent-root .pc-cookie-switch input:focus-visible + .pc-cookie-switch__ui{
  outline: 2px solid var(--pc-fg, #111);
  outline-offset: 2px;
}

#pc-cookie-consent-root .pc-cookie-dialog__actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

/* Footer opener — self-contained class, no global layout selectors */
.pc-cookie-footer-link{
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.pc-cookie-footer-link:hover,
.pc-cookie-footer-link:focus-visible{
  color: var(--pc-fg, #111);
  text-decoration: underline;
  outline: 2px solid var(--pc-fg, #111);
  outline-offset: 2px;
}

@media (min-width: 768px){
  #pc-cookie-consent-root .pc-cookie-banner__inner{
    grid-template-columns: 1fr auto;
    gap: 20px;
  }

  #pc-cookie-consent-root .pc-cookie-banner__actions{
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

@media (max-width: 560px){
  #pc-cookie-consent-root .pc-cookie-banner__actions,
  #pc-cookie-consent-root .pc-cookie-dialog__actions{
    flex-direction: column;
  }

  #pc-cookie-consent-root .pc-cookie-btn{
    width: 100%;
    text-align: center;
  }
}
