/**
 * Ubezpieczymycie – baner GDPR
 * Kolory: #fff, #342D79, #FFC400 | Czcionka: Instrument Sans (Google Fonts)
 */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --ubz-bg: #ffffff;
  --ubz-fg: #342d79;
  --ubz-brand: #342d79;
  --ubz-accent: #ffc400;
  --ubz-accent-hover: #e6b000;
  --ubz-border: rgba(52, 45, 121, 0.14);
  --ubz-muted: rgba(52, 45, 121, 0.7);
  --ubz-shadow: 0 14px 44px rgba(52, 45, 121, 0.12);
  --ubz-radius: 14px;
  --ubz-font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ubezpieczymycie-gdpr-root,
.ubezpieczymycie-gdpr-root * {
  box-sizing: border-box;
  font-family: var(--ubz-font);
}

.ubezpieczymycie-gdpr-root {
  position: relative;
  z-index: 999998;
}

/* Baner dolny */
.ubz-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  padding: 1rem 1rem 1.25rem;
  background: var(--ubz-bg);
  color: var(--ubz-fg);
  border-top: 1px solid var(--ubz-border);
  box-shadow: var(--ubz-shadow);
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.ubz-banner.ubz-banner--visible {
  transform: translateY(0);
  opacity: 1;
}

.ubz-banner__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .ubz-banner__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.ubz-banner__title {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ubz-brand);
}

.ubz-banner__lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ubz-muted);
  max-width: 62ch;
}

.ubz-banner__lead a {
  color: var(--ubz-brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ubz-banner__lead a:hover {
  color: var(--ubz-accent-hover);
}

.ubz-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-start;
}

@media (min-width: 900px) {
  .ubz-banner__actions {
    justify-content: flex-end;
  }
}

.ubz-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ubz-btn:focus-visible {
  outline: 3px solid var(--ubz-accent);
  outline-offset: 2px;
}

/* Główny CTA: żółty akcent, tekst w kolorze marki */
.ubz-btn--primary {
  background: var(--ubz-accent);
  color: var(--ubz-brand);
}

.ubz-btn--primary:hover {
  background: var(--ubz-accent-hover);
  color: var(--ubz-brand);
}

.ubz-btn--ghost {
  background: transparent;
  color: var(--ubz-brand);
  border-color: var(--ubz-brand);
}

.ubz-btn--ghost:hover {
  background: var(--ubz-brand);
  color: #fff;
  border-color: var(--ubz-brand);
}

.ubz-btn--text {
  background: transparent;
  color: var(--ubz-brand);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: auto;
  padding: 0.35rem 0.5rem;
}

.ubz-btn--text:hover {
  color: #2a2460;
}

/* Overlay + modal */
.ubz-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(52, 45, 121, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.ubz-overlay.ubz-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

.ubz-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1000001;
  width: min(640px, calc(100vw - 2rem));
  max-height: min(88vh, 900px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--ubz-bg);
  color: var(--ubz-fg);
  border-radius: var(--ubz-radius);
  border: 1px solid var(--ubz-border);
  box-shadow: var(--ubz-shadow);
  transform: translate(-50%, -48%) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.ubz-modal.ubz-modal--open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.ubz-modal__header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--ubz-border);
}

.ubz-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ubz-brand);
}

.ubz-modal__body {
  padding: 1rem 1.25rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.ubz-modal__footer {
  padding: 0.75rem 1.25rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  border-top: 1px solid var(--ubz-border);
}

.ubz-legal {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ubz-muted);
  margin: 0 0 1rem;
}

.ubz-cat {
  border: 1px solid var(--ubz-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.ubz-cat__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.ubz-cat__name {
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
  color: var(--ubz-brand);
}

.ubz-cat__desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ubz-muted);
  line-height: 1.5;
}

/* Toggle */
.ubz-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.ubz-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.ubz-switch__track {
  position: absolute;
  inset: 0;
  background: #e8e6f2;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.ubz-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(52, 45, 121, 0.2);
  transition: transform 0.2s ease;
}

.ubz-switch input:checked + .ubz-switch__track {
  background: var(--ubz-brand);
}

.ubz-switch input:checked + .ubz-switch__track .ubz-switch__thumb {
  transform: translateX(20px);
}

.ubz-switch input:disabled + .ubz-switch__track {
  opacity: 0.55;
  cursor: not-allowed;
}

.ubz-switch input:focus-visible + .ubz-switch__track {
  outline: 3px solid var(--ubz-accent);
  outline-offset: 2px;
}

.ubz-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid var(--ubz-border);
  border-radius: 10px;
}

.ubz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.ubz-table th,
.ubz-table td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--ubz-border);
  vertical-align: top;
}

.ubz-table th {
  background: #f5f4fb;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ubz-brand);
}

.ubz-table tr:last-child td {
  border-bottom: none;
}

.ubz-table-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem;
  color: var(--ubz-brand);
}

.ubz-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.ubz-links a {
  color: var(--ubz-brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ubz-links a:hover {
  color: #2a2460;
}

.ubz-controller {
  font-size: 0.8125rem;
  color: var(--ubz-muted);
  margin-top: 0.5rem;
}

@media (max-width: 480px) {
  .ubz-banner__actions {
    flex-direction: column;
  }

  .ubz-btn {
    width: 100%;
  }
}

body.ubz-no-scroll {
  overflow: hidden;
}
