:root {
  --p1cc-navy: #174d2d;
  --p1cc-navy-hover: #103a22;
  --p1cc-purple: #527158;
  --p1cc-purple-hover: #3f5e45;
  --p1cc-pink: #8b2745;
  --p1cc-orange: #8b2745;
  --p1cc-lilac: #eef4eb;
  --p1cc-border: #d8e3d5;
  --p1cc-text: #173426;
  --p1cc-muted: #5f6f64;
}

/* Brand palette overrides the legacy inline module colours. */
.p1cc {
  --p1cc-navy: #174d2d !important;
  --p1cc-navy-hover: #103a22 !important;
  --p1cc-purple: #527158 !important;
  --p1cc-purple-hover: #3f5e45 !important;
  --p1cc-pink: #8b2745 !important;
  --p1cc-orange: #8b2745 !important;
  --p1cc-lilac: #eef4eb !important;
  --p1cc-border: #d8e3d5 !important;
  --p1cc-text: #173426 !important;
  --p1cc-muted: #5f6f64 !important;
}

html.p1cc-open { overflow: hidden; }
.p1cc [hidden] { display: none !important; }

.p1cc-consent-overlay,
.p1cc-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(17, 42, 27, .68);
}

.p1cc-consent-overlay { z-index: 2147483000; }
.p1cc-overlay { z-index: 2147483100; }

.p1cc-banner,
.p1cc-dialog {
  color: var(--p1cc-text);
  background: #fff;
  border: 1px solid rgba(216, 227, 213, .95);
  box-shadow: 0 30px 90px rgba(13, 45, 27, .3);
  font-family: inherit;
}

.p1cc-banner {
  width: min(860px, 100%);
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  overflow: auto;
  border-radius: 20px;
}

.p1cc-banner-header {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 18px 28px;
}

.p1cc-brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--p1cc-navy);
}

.p1cc-brand-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--p1cc-lilac);
  border-radius: 11px;
  font-size: 20px;
}

.p1cc-brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

.p1cc-brand-word {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: -.035em;
}

.p1cc-brand-word span { color: var(--p1cc-orange); }
.p1cc-brand-small { margin-bottom: 12px; }
.p1cc-brand-small .p1cc-brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 17px; }
.p1cc-brand-small .p1cc-brand-word { font-size: 18px; }

.p1cc-privacy-label,
.p1cc-kicker {
  color: var(--p1cc-pink);
  font-weight: 850;
  font-size: 11px;
  letter-spacing: .11em;
}

.p1cc-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #e3ebe0;
  border-bottom: 1px solid #e3ebe0;
}

.p1cc-tabs button {
  position: relative;
  min-height: 58px;
  padding: 12px 16px;
  color: var(--p1cc-navy);
  background: #fff;
  border: 0;
  font: 800 15px/1.2 inherit;
  cursor: pointer;
}

.p1cc-tabs button::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.p1cc-tabs button[aria-selected="true"] { color: var(--p1cc-purple); }
.p1cc-tabs button[aria-selected="true"]::after { background: var(--p1cc-navy); }

.p1cc-tab-content {
  min-height: 245px;
  padding: 30px 34px 28px;
}

.p1cc-tab-panel h2,
.p1cc-dialog h2,
.p1cc-category h3 {
  margin: 0;
  color: var(--p1cc-navy);
}

.p1cc-tab-panel h2 { margin-bottom: 11px; font-size: 23px; line-height: 1.25; }
.p1cc-tab-panel p { margin: 0 0 12px; color: var(--p1cc-muted); font-size: 15px; line-height: 1.55; }
.p1cc-tab-panel p:last-child { margin-bottom: 0; }
.p1cc-tab-panel a,
.p1cc-policy { color: var(--p1cc-purple); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }

.p1cc-intro { display: flex; gap: 18px; align-items: flex-start; }
.p1cc-intro-icon { display: grid; flex: 0 0 52px; width: 52px; height: 52px; place-items: center; background: var(--p1cc-lilac); border-radius: 14px; font-size: 26px; }
.p1cc-note { display: inline-flex; gap: 7px; align-items: center; margin-top: 6px !important; color: #287044 !important; font-weight: 750; }
.p1cc-note span { display: grid; width: 22px; height: 22px; place-items: center; color: #fff; background: #158c55; border-radius: 50%; font-size: 13px; }

.p1cc-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 17px 0;
}

.p1cc-overview > div {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 47px;
  padding: 10px 12px;
  background: #f7faf5;
  border: 1px solid #e1e9de;
  border-radius: 11px;
}

.p1cc-overview strong { color: var(--p1cc-navy); font-size: 14px; }
.p1cc-status { color: #68756c; font-weight: 700; font-size: 12px; }
.p1cc-status-on { color: #287044; }

.p1cc-banner-actions,
.p1cc-dialog-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.p1cc-banner-actions {
  padding: 18px 24px;
  background: #f8faf6;
  border-top: 1px solid #e3ebe0;
}

.p1cc-button {
  min-height: 50px;
  padding: 11px 16px;
  border: 1px solid var(--p1cc-navy);
  border-radius: 11px;
  font: 800 14px/1.25 inherit;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.p1cc-button:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(23, 77, 45, .14); }
.p1cc-button:focus-visible,
.p1cc-close:focus-visible,
.p1cc-manage:focus-visible,
.p1cc-tabs button:focus-visible,
.p1cc-switch input:focus-visible + span { outline: 3px solid rgba(23, 77, 45, .28); outline-offset: 3px; }
.p1cc-button-decision,
.p1cc-button-primary { color: #fff; background: var(--p1cc-navy); }
.p1cc-button-decision:hover,
.p1cc-button-primary:hover { background: var(--p1cc-navy); filter: brightness(1.12); }
.p1cc-button-customize { color: #fff; background: var(--p1cc-purple); border-color: var(--p1cc-purple); }
.p1cc-button-customize:hover { background: var(--p1cc-purple); filter: brightness(1.08); }
.p1cc-button-secondary { color: var(--p1cc-navy); background: #fff; }

.p1cc-button[data-p1cc-action="reject"] {
  color: var(--p1cc-navy);
  background: #fff;
  border-color: #a9bca9;
}

.p1cc-button[data-p1cc-action="reject"]:hover {
  color: var(--p1cc-navy-hover);
  background: #f4f7f2;
  border-color: var(--p1cc-navy);
  filter: none;
}

.p1cc-button[data-p1cc-action="settings"],
.p1cc-button[data-p1cc-action="save"] {
  color: var(--p1cc-navy);
  background: var(--p1cc-lilac);
  border-color: #b8cab5;
}

.p1cc-button[data-p1cc-action="settings"]:hover,
.p1cc-button[data-p1cc-action="save"]:hover {
  color: #fff;
  background: var(--p1cc-purple-hover);
  border-color: var(--p1cc-purple-hover);
  filter: none;
}

.p1cc-button[data-p1cc-action="accept"] {
  color: #fff;
  background: var(--p1cc-navy);
  border-color: var(--p1cc-navy);
}

.p1cc-manage {
  position: fixed;
  z-index: 2147482000;
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 9px 13px;
  color: var(--p1cc-navy);
  background: #fff;
  border: 1px solid var(--p1cc-border);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(23, 77, 45, .16);
  font: 750 13px/1 inherit;
  cursor: pointer;
}

.p1cc-dialog {
  width: min(740px, 100%);
  max-height: calc(100vh - 44px);
  max-height: calc(100dvh - 44px);
  overflow: auto;
  padding: 28px;
  border-radius: 20px;
}

.p1cc-dialog-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 10px; }
.p1cc-dialog-heading { min-width: 0; }
.p1cc-kicker { margin: 0 0 5px !important; }
.p1cc-dialog h2 { font-size: 27px; }
.p1cc-dialog > p { margin: 0 0 18px; color: var(--p1cc-muted); line-height: 1.5; }
.p1cc-close { display: grid; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; place-items: center; color: var(--p1cc-navy); background: var(--p1cc-lilac); border: 0; border-radius: 10px; font: 400 28px/1 inherit; cursor: pointer; }
.p1cc-category { display: flex; width: 100%; gap: 20px; align-items: center; justify-content: space-between; padding: 16px 0; margin: 0; border-top: 1px solid #e1e9de; text-align: left; cursor: pointer; }
.p1cc-category > div { min-width: 0; text-align: left; }
.p1cc-category h3 { margin-bottom: 4px; font-size: 16px; }
.p1cc-category p { margin: 0; color: #637168; font-size: 14px; line-height: 1.4; }
.p1cc-always { flex: 0 0 auto; color: #287044; font-weight: 800; font-size: 13px; }
.p1cc-switch { position: relative; flex: 0 0 48px; width: 48px; height: 28px; }
.p1cc-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.p1cc-switch span { position: absolute; inset: 0; background: #c8cbd4; border-radius: 999px; transition: background .18s ease; }
.p1cc-switch span::after { content: ''; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0, 0, 0, .18); transition: transform .18s ease; }
.p1cc-switch input:checked + span { background: var(--p1cc-purple); }
.p1cc-switch input:checked + span::after { transform: translateX(20px); }
.p1cc-policy { display: inline-block; margin-top: 13px; }
.p1cc-dialog-actions { margin-top: 22px; }

/* Platus, kompaktiškas variantas puslapio apačioje. */
.p1cc-layout-bar .p1cc-consent-overlay {
  align-items: end;
  padding: 18px;
  background: rgba(17, 42, 27, .42);
}

.p1cc-layout-bar .p1cc-banner {
  width: min(1180px, 100%);
  border-radius: 16px;
}

.p1cc-layout-bar .p1cc-banner-header { min-height: 60px; padding: 12px 22px; }
.p1cc-layout-bar .p1cc-tabs button { min-height: 48px; }
.p1cc-layout-bar .p1cc-tab-content { min-height: 160px; padding: 20px 24px; }
.p1cc-layout-bar .p1cc-intro-icon { width: 44px; height: 44px; flex-basis: 44px; font-size: 22px; }
.p1cc-layout-bar .p1cc-tab-panel h2 { font-size: 21px; }
.p1cc-layout-bar .p1cc-banner-actions { padding: 14px 18px; }

/* Kompaktiškas variantas apatiniame dešiniajame kampe. */
.p1cc-layout-corner .p1cc-consent-overlay {
  place-items: end;
  padding: 24px;
  background: rgba(17, 42, 27, .48);
}

.p1cc-layout-corner .p1cc-banner {
  width: min(500px, 100%);
  border-radius: 18px;
}

.p1cc-layout-corner .p1cc-banner-header { min-height: 64px; padding: 14px 19px; }
.p1cc-layout-corner .p1cc-privacy-label { display: none; }
.p1cc-layout-corner .p1cc-tabs button { min-height: 50px; padding: 10px 6px; font-size: 13px; }
.p1cc-layout-corner .p1cc-tab-content { min-height: 250px; padding: 22px 20px; }
.p1cc-layout-corner .p1cc-tab-panel h2 { font-size: 20px; }
.p1cc-layout-corner .p1cc-tab-panel p { font-size: 14px; }
.p1cc-layout-corner .p1cc-intro-icon { display: none; }
.p1cc-layout-corner .p1cc-overview { grid-template-columns: 1fr; }
.p1cc-layout-corner .p1cc-banner-actions { grid-template-columns: 1fr; padding: 14px 16px 16px; }
.p1cc-layout-corner .p1cc-button { min-height: 46px; }

@media (max-width: 600px) {
  .p1cc-consent-overlay,
  .p1cc-overlay {
    align-items: end;
    padding: 10px 10px 0;
    background: rgba(17, 42, 27, .58);
  }

  .p1cc-layout-corner .p1cc-consent-overlay,
  .p1cc-layout-bar .p1cc-consent-overlay {
    place-items: end stretch;
    padding: 10px 10px 0;
    background: rgba(17, 42, 27, .58);
  }

  .p1cc-banner,
  .p1cc-layout-corner .p1cc-banner,
  .p1cc-layout-bar .p1cc-banner,
  .p1cc-dialog {
    width: 100%;
    max-height: calc(100vh - 10px);
    max-height: calc(100dvh - 10px);
    border-radius: 16px 16px 0 0;
  }

  .p1cc-banner-header { min-height: 52px; padding: 9px 15px; }
  .p1cc-privacy-label { display: none; }
  .p1cc-brand { gap: 8px; }
  .p1cc-brand-mark { width: 30px; height: 30px; flex-basis: 30px; font-size: 16px; border-radius: 9px; }
  .p1cc-brand-word { font-size: 17px; }
  .p1cc-tabs button { min-height: 44px; padding: 8px 5px; font-size: 12px; }
  .p1cc-tab-content { min-height: 0; padding: 14px 16px; }
  .p1cc-layout-corner .p1cc-tab-content,
  .p1cc-layout-bar .p1cc-tab-content { min-height: 0; padding: 14px 16px; }
  .p1cc-tab-panel h2 { margin-bottom: 7px; font-size: 18px; }
  .p1cc-tab-panel p { margin-bottom: 8px; font-size: 13px; line-height: 1.42; }
  .p1cc-intro { gap: 0; }
  .p1cc-intro-icon { display: none; }
  .p1cc-note { margin-top: 2px !important; font-size: 12px !important; }
  .p1cc-note span { width: 19px; height: 19px; font-size: 11px; }
  .p1cc-overview { grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
  .p1cc-overview > div { min-height: 42px; padding: 7px 9px; }
  .p1cc-overview strong { font-size: 12px; }
  .p1cc-status { font-size: 10px; }
  .p1cc-banner-actions,
  .p1cc-dialog-actions,
  .p1cc-layout-bar .p1cc-banner-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .p1cc-banner-actions { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .p1cc-banner-actions .p1cc-button[data-p1cc-action="accept"],
  .p1cc-dialog-actions .p1cc-button[data-p1cc-action="accept"] { grid-column: 1 / -1; }
  .p1cc-button { min-height: 44px; padding: 8px 10px; font-size: 12px; }
  .p1cc-dialog { padding: 15px 16px calc(12px + env(safe-area-inset-bottom)); }
  .p1cc-dialog-header { margin-bottom: 6px; }
  .p1cc-dialog h2 { font-size: 20px; }
  .p1cc-dialog > p { margin-bottom: 10px; font-size: 13px; line-height: 1.4; }
  .p1cc-close { width: 44px; height: 44px; flex-basis: 44px; }
  .p1cc-category { gap: 10px; padding: 10px 0; }
  .p1cc-category h3 { margin-bottom: 2px; font-size: 14px; }
  .p1cc-category p { font-size: 12px; line-height: 1.3; }
  .p1cc-always { max-width: 92px; text-align: right; }
  .p1cc-policy { margin-top: 8px; font-size: 12px; }
  .p1cc-dialog-actions { margin-top: 12px; }
  .p1cc-manage span:last-child { display: none; }
  .p1cc-manage { width: 44px; height: 44px; padding: 0; justify-content: center; }
}

@media (max-height: 690px) and (min-width: 601px) {
  .p1cc-tab-content { min-height: 205px; padding-top: 22px; padding-bottom: 20px; }
  .p1cc-banner-header { min-height: 68px; padding-top: 14px; padding-bottom: 14px; }
  .p1cc-tabs button { min-height: 50px; }
  .p1cc-banner-actions { padding-top: 14px; padding-bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .p1cc-button,
  .p1cc-switch span,
  .p1cc-switch span::after { transition: none; }
}
