.lfcc-root {
  --lfcc-bg: var(--lfx-surface, #ffffff);
  --lfcc-surface: var(--lfx-surface-2, #f8f9fa);
  --lfcc-surface-strong: color-mix(in srgb, var(--lfx-surface-2, #f8f9fa) 82%, var(--lfx-border, #dee2e6) 18%);
  --lfcc-text: var(--lfx-text, #354052);
  --lfcc-muted: var(--lfx-text-muted, #6c757d);
  --lfcc-border: var(--lfx-border, #dee2e6);
  --lfcc-border-soft: var(--tblr-border-color-light, color-mix(in srgb, var(--lfx-border, #dee2e6) 60%, #fff 40%));
  --lfcc-primary: var(--lfx-primary, #206bc4);
  --lfcc-primary-hover: var(--lfx-link-hover, color-mix(in srgb, var(--lfx-primary, #206bc4) 82%, #000 18%));
  --lfcc-primary-soft: color-mix(in srgb, var(--lfx-primary, #206bc4) 12%, var(--lfx-surface, #ffffff) 88%);
  --lfcc-primary-text: var(--lfx-primary-contrast, var(--lfx-text-inverse, #ffffff));
  --lfcc-focus: color-mix(in srgb, var(--lfx-focus, var(--lfx-primary, #206bc4)) 32%, transparent 68%);
  --lfcc-shadow: var(--lfx-shadow-2, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));
  --lfcc-radius: 8px;
  color: var(--lfcc-text);
  font-family: inherit;
}

.lfcc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 99998;
  display: grid;
  gap: 14px 18px;
  max-width: 980px;
  max-height: min(620px, calc(100vh - 32px));
  margin: 0 auto;
  padding: 18px 18px 16px;
  background: var(--lfcc-bg);
  border: 1px solid var(--lfcc-border);
  border-radius: var(--lfcc-radius);
  box-shadow: var(--lfcc-shadow);
  overflow: auto;
  overscroll-behavior: contain;
}

.lfcc-banner[hidden] {
  display: none;
}

.lfcc-summary h2,
.lfcc-preferences h3 {
  margin: 0 0 8px;
  color: var(--lfcc-text);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.lfcc-summary p {
  margin: 0;
  color: var(--lfcc-muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 68ch;
}

.lfcc-policy {
  display: inline-block;
  margin-top: 9px;
  color: var(--lfcc-primary);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lfcc-policy:hover {
  color: var(--lfcc-primary-hover);
}

.lfcc-actions,
.lfcc-pref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lfcc-actions {
  justify-content: flex-end;
  align-self: start;
}

.lfcc-btn,
.lfcc-floating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--lfcc-border);
  border-radius: 7px;
  background: var(--lfcc-bg);
  color: var(--lfcc-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), color 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1), transform 120ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lfcc-btn:focus-visible,
.lfcc-floating:focus-visible,
.lfcc-category input:focus-visible {
  outline: 3px solid var(--lfcc-focus);
  outline-offset: 2px;
}

.lfcc-btn:hover,
.lfcc-floating:hover {
  border-color: var(--lfcc-primary);
  background: var(--lfcc-primary-soft);
}

.lfcc-btn:active,
.lfcc-floating:active {
  transform: translateY(1px);
}

.lfcc-btn-primary {
  border-color: var(--lfcc-primary);
  background: var(--lfcc-primary);
  color: var(--lfcc-primary-text);
}

.lfcc-btn-primary:hover {
  border-color: var(--lfcc-primary-hover);
  background: var(--lfcc-primary-hover);
  color: var(--lfcc-primary-text);
}

.lfcc-btn-secondary {
  background: var(--lfcc-surface);
  border-color: var(--lfcc-border);
}

.lfcc-btn-ghost {
  background: transparent;
  color: var(--lfcc-muted);
}

.lfcc-btn-ghost:hover {
  color: var(--lfcc-text);
}

.lfcc-preferences {
  display: none;
  padding-top: 15px;
  border-top: 1px solid var(--lfcc-border-soft);
}

.lfcc-show-preferences .lfcc-preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lfcc-preferences h3,
.lfcc-cookie-list,
.lfcc-pref-actions {
  grid-column: 1 / -1;
}

.lfcc-preferences h3 {
  margin-bottom: 2px;
}

.lfcc-category {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  min-height: 92px;
  padding: 11px;
  border: 1px solid var(--lfcc-border-soft);
  border-radius: 7px;
  background: var(--lfcc-bg);
  cursor: pointer;
  transition: background-color 180ms cubic-bezier(0.16, 1, 0.3, 1), border-color 180ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.lfcc-category:hover {
  border-color: var(--lfcc-border);
  background: var(--lfcc-surface);
}

.lfcc-category:has(input:checked) {
  border-color: color-mix(in srgb, var(--lfcc-primary) 42%, var(--lfcc-border) 58%);
  background: var(--lfcc-primary-soft);
}

.lfcc-category-required {
  cursor: default;
}

.lfcc-category-empty {
  cursor: default;
  background: var(--lfcc-surface);
}

.lfcc-category input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--lfcc-primary);
}

.lfcc-category input:disabled {
  opacity: 0.58;
}

.lfcc-category strong {
  display: inline;
  margin-bottom: 2px;
  font-size: 14px;
  line-height: 1.25;
}

.lfcc-category-copy {
  min-width: 0;
}

.lfcc-category-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 2px 7px;
  border: 1px solid var(--lfcc-border-soft);
  border-radius: 999px;
  background: var(--lfcc-bg);
  color: var(--lfcc-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 1px;
}

.lfcc-category-count-empty {
  background: var(--lfcc-surface-strong);
}

.lfcc-category small {
  display: block;
  margin-top: 5px;
  color: var(--lfcc-muted);
  font-size: 13px;
  line-height: 1.4;
}

.lfcc-category-empty-note {
  font-weight: 600;
}

.lfcc-cookie-list {
  margin-top: 2px;
  border: 1px solid var(--lfcc-border-soft);
  border-radius: 7px;
  background: var(--lfcc-surface);
}

.lfcc-cookie-list summary {
  min-height: 42px;
  padding: 12px;
  color: var(--lfcc-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lfcc-cookie-list summary:focus-visible {
  outline: 3px solid var(--lfcc-focus);
  outline-offset: 2px;
}

.lfcc-cookie-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.lfcc-cookie-service {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--lfcc-border-soft);
  border-radius: 7px;
  background: var(--lfcc-bg);
}

.lfcc-cookie-service-header {
  display: grid;
  gap: 3px;
  margin-bottom: 6px;
}

.lfcc-cookie-service-header strong {
  color: var(--lfcc-text);
  font-size: 13px;
  line-height: 1.25;
}

.lfcc-cookie-service-header span,
.lfcc-cookie-service p,
.lfcc-cookie-service small,
.lfcc-cookie-list-empty {
  color: var(--lfcc-muted);
  font-size: 12px;
  line-height: 1.4;
}

.lfcc-cookie-service p {
  margin: 0 0 8px;
}

.lfcc-cookie-service ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lfcc-cookie-service li {
  display: grid;
  gap: 3px;
}

.lfcc-cookie-service code {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--lfcc-surface-strong);
  color: var(--lfcc-text);
  font-size: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lfcc-cookie-service li > span {
  color: var(--lfcc-text);
  font-size: 12px;
  font-weight: 600;
}

.lfcc-cookie-list-empty {
  margin: 0;
  padding: 0 12px 12px;
}

.lfcc-pref-actions {
  justify-content: flex-end;
  padding-top: 2px;
}

.lfcc-floating {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99997;
  min-height: 36px;
  padding: 8px 13px;
  border-color: var(--lfcc-border);
  box-shadow: var(--lfx-shadow-1, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075));
}

.lfcc-has-demo-banner .lfcc-banner,
.lfcc-has-demo-banner .lfcc-floating {
  bottom: 76px;
}

.lfcc-cookie-policy-table-wrap {
  width: 100%;
  margin: 20px 0;
  overflow-x: auto;
}

.lfcc-cookie-policy-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--lfcc-text, #354052);
  font-size: 14px;
}

.lfcc-cookie-policy-table th,
.lfcc-cookie-policy-table td {
  padding: 12px;
  border: 1px solid var(--lfcc-border-soft, #dee2e6);
  text-align: left;
  vertical-align: top;
}

.lfcc-cookie-policy-table th {
  background: var(--lfcc-surface, #f8f9fa);
  font-weight: 700;
}

.lfcc-cookie-policy-table td span {
  display: block;
  margin-top: 4px;
  color: var(--lfcc-muted, #6c757d);
  line-height: 1.45;
}

.lfcc-cookie-policy-table code {
  white-space: nowrap;
}

.lfcc-cookie-policy-note {
  margin: 10px 0 0;
  color: var(--lfcc-muted, #6c757d);
  font-size: 13px;
}

.lfcc-banner:not([hidden]) + .lfcc-floating {
  display: none;
}

.lfcc-preset-minimal .lfcc-banner {
  max-width: 720px;
  padding: 14px;
}

.lfcc-preset-minimal .lfcc-summary h2 {
  font-size: 16px;
}

.lfcc-preset-minimal .lfcc-summary p,
.lfcc-preset-minimal .lfcc-policy,
.lfcc-preset-minimal .lfcc-btn {
  font-size: 13px;
}

.lfcc-preset-complete .lfcc-banner {
  max-width: 1080px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, auto);
  align-items: start;
}

.lfcc-preset-complete .lfcc-preferences {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .lfcc-banner {
    left: 10px;
    right: 10px;
    bottom: 12px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 14px 12px 12px;
  }

  .lfcc-has-demo-banner .lfcc-banner,
  .lfcc-has-demo-banner .lfcc-floating {
    bottom: 68px;
  }

  .lfcc-preset-complete .lfcc-banner {
    grid-template-columns: 1fr;
  }

  .lfcc-show-preferences .lfcc-preferences {
    grid-template-columns: 1fr;
  }

  .lfcc-cookie-list-grid {
    grid-template-columns: 1fr;
  }

  .lfcc-actions,
  .lfcc-pref-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .lfcc-btn {
    width: 100%;
  }

  .lfcc-category {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lfcc-btn,
  .lfcc-floating,
  .lfcc-category {
    transition: none;
  }
}
