/* Site kit base stylesheet. Injected by scripts/assemble_site.py into every page.
 *
 * Token defaults use :where(:root) (zero specificity) so the builder's own
 * :root declarations in /assets/styles.css always win, whatever the load order.
 * Derived tokens reference the core contract tokens, so they follow the
 * builder's palette automatically.
 */
:where(:root) {
  --color-primary: #1f2937;
  --color-secondary: #e5e7eb;
  --color-accent: #2563eb;
  --color-background: #ffffff;
  --color-text: #111827;
  --color-text-secondary: color-mix(in srgb, var(--color-text) 72%, var(--color-background));
  --color-text-light: color-mix(in srgb, var(--color-text) 60%, var(--color-background));
  --color-surface: color-mix(in srgb, var(--color-secondary) 35%, var(--color-background));
  --color-border: color-mix(in srgb, var(--color-text) 14%, var(--color-background));
  --color-primary-text: #ffffff;
  --font-heading: system-ui, sans-serif;
  --font-body: system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 8px;
  --radius-lg: 16px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 40px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --transition-fast: 0.15s;
}

/* ---- Contact form status messages (the builder styles the form itself) ---- */
.form-message:empty { display: none; }
.form-message {
  margin-top: var(--space-sm);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
.form-message--success {
  background: color-mix(in srgb, #16a34a 12%, var(--color-background));
  color: color-mix(in srgb, #16a34a 70%, var(--color-text));
}
.form-message--error {
  background: color-mix(in srgb, #dc2626 12%, var(--color-background));
  color: color-mix(in srgb, #dc2626 75%, var(--color-text));
}
.altcha-slot:empty { display: none; }
.altcha-slot { margin: var(--space-sm) 0; }

/* ---- Legal pages (polityka prywatności, regulamin) ---- */
/* The legal page shell writes its own skip link; keep it hidden until focused
   even if the builder named its own skip-link class differently. */
.sitekit-legal-page > .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sitekit-legal-page > .skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  padding: 12px 20px;
  background: var(--color-primary);
  color: var(--color-background);
  border-radius: var(--radius);
}

.legal-section {
  padding: var(--space-4xl, 96px) 0;
  background: var(--color-background);
}

.legal-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md, 24px);
}

.legal-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm, 16px);
}

.legal-effective {
  color: var(--color-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-3xl, 64px);
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl, 48px);
}

.legal-article h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md, 24px);
}

.legal-paragraph {
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md, 24px);
}

.legal-article ol {
  list-style: decimal;
  padding-left: 1.5em;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm, 16px);
}

.legal-article ul {
  list-style: disc;
  padding-left: 1.5em;
  margin-top: var(--space-xs, 8px);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs, 8px);
}

.legal-article li {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.legal-article a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-article a:hover {
  color: var(--color-primary);
}

.legal-article strong {
  color: var(--color-text);
  font-weight: 600;
}

.legal-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin-top: var(--space-sm, 16px);
}

.legal-table th,
.legal-table td {
  padding: var(--space-sm, 16px);
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.1);
  vertical-align: top;
}

.legal-table th {
  background: var(--color-surface, rgba(0, 0, 0, 0.03));
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.legal-table td {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .legal-table {
    font-size: 0.8125rem;
  }

  .legal-table th,
  .legal-table td {
    padding: var(--space-xs, 8px);
  }
}

/* ---- Cookie consent ---- */
.cookie-consent {
  position: fixed;
  z-index: 9999;
  display: none;
  font-family: var(--font-body, system-ui, sans-serif);
}

.cookie-consent[aria-hidden="false"] {
  display: block;
}

/* Overlay */
.cookie-consent__overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: -1;
}

.cookie-consent[aria-hidden="false"] .cookie-consent__overlay {
  display: block;
}

/* Center variant already has its own overlay background, hide the separate one */
.cookie-consent--center .cookie-consent__overlay {
  display: none !important;
}

/* Position variants */
.cookie-consent--bottom {
  bottom: 0;
  left: 0;
  right: 0;
}

.cookie-consent--bottom-left {
  bottom: var(--space-md, 24px);
  left: var(--space-md, 24px);
  max-width: 480px;
}

.cookie-consent--bottom-right {
  bottom: var(--space-md, 24px);
  right: var(--space-md, 24px);
  max-width: 480px;
}

.cookie-consent--center {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.cookie-consent--center[aria-hidden="false"] {
  display: flex;
}

.cookie-consent--center .cookie-consent__banner,
.cookie-consent--center .cookie-consent__preferences {
  max-width: 600px;
  margin: var(--space-md, 24px);
  border-radius: var(--radius, 8px);
}

/* Banner & Preferences panels */
.cookie-consent__banner,
.cookie-consent__preferences {
  background: var(--color-background, #fff);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.cookie-consent__preferences {
  display: none;
}

.cookie-consent__content {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-lg, 32px) var(--space-md, 24px);
}

.cookie-consent__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text, #1a1a1a);
  margin-bottom: var(--space-xs, 8px);
}

.cookie-consent__description {
  font-size: 0.9375rem;
  color: var(--color-text-secondary, #666);
  line-height: 1.6;
  margin-bottom: var(--space-md, 24px);
}

.cookie-consent__link {
  color: var(--color-accent, #0066cc);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__link:hover {
  color: var(--color-primary, #004499);
}

/* Actions */
.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs, 8px);
}

.cookie-consent__btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--radius, 8px);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s) ease;
  white-space: nowrap;
}

.cookie-consent__btn--accept {
  background: var(--color-primary, #1a1a1a);
  color: var(--color-primary-text, #fff);
  border-color: var(--color-primary, #1a1a1a);
}

.cookie-consent__btn--accept:hover {
  opacity: 0.9;
}

.cookie-consent__btn--reject {
  background: var(--color-primary, #1a1a1a);
  color: var(--color-primary-text, #fff);
  border-color: var(--color-primary, #1a1a1a);
}

.cookie-consent__btn--reject:hover {
  opacity: 0.9;
}

.cookie-consent__btn--manage {
  background: transparent;
  color: var(--color-text, #1a1a1a);
}

.cookie-consent__btn--manage:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Categories */
.cookie-consent__categories {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm, 16px);
  margin-bottom: var(--space-md, 24px);
}

.cookie-consent__category-wrapper {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius, 8px);
  overflow: hidden;
}

.cookie-consent__category-wrapper .cookie-consent__category {
  border: none;
  border-radius: 0;
}

.cookie-consent__category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md, 24px);
  padding: var(--space-sm, 16px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius, 8px);
  cursor: pointer;
  transition: border-color var(--transition-fast, 0.15s) ease;
}

.cookie-consent__category:hover {
  border-color: var(--color-accent, #0066cc);
}

.cookie-consent__category-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cookie-consent__category-name {
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  font-size: 0.9375rem;
}

.cookie-consent__category-desc {
  font-size: 0.8125rem;
  color: var(--color-text-secondary, #666);
  line-height: 1.5;
}

/* Cookie details & table */
.cookie-consent__cookie-details {
  padding: 0 var(--space-sm, 16px) var(--space-sm, 16px);
}

.cookie-consent__cookie-details summary {
  font-size: 0.8125rem;
  color: var(--color-accent, #0066cc);
  cursor: pointer;
  margin-bottom: var(--space-xs, 8px);
}

.cookie-consent__cookie-table {
  width: 100%;
  font-size: 0.75rem;
  border-collapse: collapse;
}

.cookie-consent__cookie-table th,
.cookie-consent__cookie-table td {
  padding: 4px 8px;
  text-align: left;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--color-text-secondary, #666);
}

.cookie-consent__cookie-table th {
  font-weight: 600;
  color: var(--color-text, #1a1a1a);
  background: var(--color-surface, rgba(0, 0, 0, 0.03));
}

/* Toggle switch */
.cookie-consent__toggle {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 26px;
}

.cookie-consent__toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-consent__toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 26px;
  transition: background var(--transition-fast, 0.15s) ease;
  cursor: pointer;
}

.cookie-consent__toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition-fast, 0.15s) ease;
}

.cookie-consent__toggle input:checked + .cookie-consent__toggle-slider {
  background: var(--color-primary, #1a1a1a);
}

.cookie-consent__toggle input:checked + .cookie-consent__toggle-slider::before {
  transform: translateX(22px);
}

.cookie-consent__toggle--disabled .cookie-consent__toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-consent__no-cookies {
  font-size: 0.8125rem;
  color: var(--color-text-secondary, #666);
  font-style: italic;
  padding: 4px 0;
}

/* Persistent cookie settings trigger */
.cookie-consent-trigger {
  position: fixed;
  bottom: var(--space-md, 24px);
  left: var(--space-md, 24px);
  z-index: 9998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary, #1a1a1a);
  color: var(--color-primary-text, #fff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: opacity var(--transition-fast, 0.15s) ease, transform var(--transition-fast, 0.15s) ease;
}

.cookie-consent-trigger:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .cookie-consent--bottom-left,
  .cookie-consent--bottom-right {
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
  }

  .cookie-consent__actions {
    flex-direction: column;
  }

  .cookie-consent__btn {
    width: 100%;
    text-align: center;
  }
}
