/* Prio1 Portable Cookie Consent (P1P) */
#p1p-consent-root { all: initial; }

.p1p-consent {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: none;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.p1p-consent.p1p-open { display: block; }

.p1p-consent__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(20px);
}

.p1p-consent__modal {
  position: absolute;
  left: 16px;
  right: 16px;
  max-width: 720px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  color: #111;
}

.p1p-consent__modal[data-position="bottom-left"] { bottom: 16px; left: 16px; right: auto; }
.p1p-consent__modal[data-position="bottom-right"] { bottom: 16px; right: 16px; left: auto; }
.p1p-consent__modal[data-position="top-left"] { top: 16px; left: 16px; right: auto; }
.p1p-consent__modal[data-position="top-right"] { top: 16px; right: 16px; left: auto; }
.p1p-consent__modal[data-position="center"] { top: 50%; left: 50%; transform: translate(-50%, -50%); }

@media (min-width: 760px) {
  .p1p-consent__modal { left: 24px; right: 24px; }
  .p1p-consent__modal[data-position="bottom-left"],
  .p1p-consent__modal[data-position="top-left"] { left: 24px; }
  .p1p-consent__modal[data-position="bottom-right"],
  .p1p-consent__modal[data-position="top-right"] { right: 24px; }
}

.p1p-consent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #eee;
}

.p1p-consent__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
}

.p1p-consent__close {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 0px 8px 8px 8px;
    border-radius: 8px;
    color: #000;
    margin: 0;
    font-weight: 600;
}
.p1p-consent__close:hover {
  background: transparent!important;
  color: #777;
}
.p1p-consent__body {
  padding: 14px 18px 8px 18px;
  max-height: min(70vh, 640px);
  overflow: auto;
}

.p1p-consent__intro {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.4;
  color: #222;
}

.p1p-consent__section {
  padding: 12px 0;
  border-top: 1px solid #f1f1f1;
}

.p1p-consent__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.p1p-consent__label {
  font-weight: 700;
  font-size: 14px;
}

.p1p-consent__desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #333;
}

.p1p-consent__links {
  display: flex;
  gap: 12px;
  padding-top: 10px;
  flex-wrap: wrap;
}

.p1p-consent__links a {
  font-size: 13px;
  color: #0b57d0;
  text-decoration: underline;
}

.p1p-consent__footer {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 18px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.p1p-btn {
  appearance: none;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
}

.p1p-btn:focus { outline: 2px solid #000; outline-offset: 2px; }

.p1p-btn--primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.p1p-btn--secondary {
  border-color: #ddd;
  background: #fff;
}

.p1p-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.p1p-switch input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  background: #ddd;
  border-radius: 999px;
  position: relative;
  outline: none;
  cursor: pointer;
  border: 1px solid #ccc;
}

.p1p-switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fff;
  transition: transform 120ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.p1p-switch input[type="checkbox"]::before {
	display: none!important;
}
.p1p-switch input[type="checkbox"]:checked {
  background: #111;
  border-color: #111;
}
.p1p-switch input[type="checkbox"]:checked::after {
  left: 22px;
}
.p1p-badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eee;
  color: #111;
  white-space: nowrap;
}

.p1p-badge--locked {
  background: #111;
  color: #fff;
}

.open-cookie-settings {
	cursor: pointer;
}

body.cookie-settings-open {
  overflow: hidden;
}

.p1p-consent__overlay {
  touch-action: none;
}

.p1p-consent__body {
  overscroll-behavior: contain;
}

html.cookie-settings-open {
  overscroll-behavior: none;
}

.p1p-consent__body {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .p1p-consent__modal[data-position="center"] {
    top: 15px;
    bottom: 15px;
    left: 15px;
    right: 15px;
    transform: none;
    max-width: none;
    display: flex;
    flex-direction: column;
  }

  .p1p-consent__body {
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
  }
}
