:root {
  --wp-consent-bg: #111111;
  --wp-consent-surface: #181818;
  --wp-consent-border: #343434;
  --wp-consent-text: #f5f5f5;
  --wp-consent-muted: #c2c2c2;
  --wp-consent-primary: #d52b2b;
  --wp-consent-primary-hover: #ef3b3b;
  --wp-consent-focus: #ffffff;
}

.wp-consent-hidden {
  display: none !important;
}

.wp-consent-lock {
  overflow: hidden !important;
}

.wp-consent-banner,
.wp-consent-modal,
.wp-consent-settings-button {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--wp-consent-text);
}

.wp-consent-banner {
  position: fixed;
  z-index: 2147483000;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  margin: 0 auto;
  max-width: 1120px;
  border: 1px solid var(--wp-consent-border);
  border-radius: 1rem;
  background: rgba(17, 17, 17, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 1.25rem;
}

.wp-consent-banner__grid {
  display: grid;
  gap: 1rem;
}

.wp-consent-banner h2,
.wp-consent-modal h2,
.wp-consent-modal h3 {
  margin: 0;
  color: var(--wp-consent-text);
  line-height: 1.25;
}

.wp-consent-banner h2,
.wp-consent-modal h2 {
  font-size: 1.2rem;
}

.wp-consent-banner p,
.wp-consent-modal p {
  margin: 0.55rem 0 0;
  color: var(--wp-consent-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.wp-consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.75rem;
  font-size: 0.84rem;
}

.wp-consent-links a {
  color: #ff6969;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.wp-consent-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.wp-consent-btn {
  min-height: 44px;
  border: 1px solid var(--wp-consent-border);
  border-radius: 0.65rem;
  background: #232323;
  color: var(--wp-consent-text);
  cursor: pointer;
  padding: 0.72rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.wp-consent-btn:hover {
  border-color: #777;
  background: #2b2b2b;
}

.wp-consent-btn:active {
  transform: translateY(1px);
}

.wp-consent-btn--primary {
  border-color: var(--wp-consent-primary);
  background: var(--wp-consent-primary);
  color: #fff;
}

.wp-consent-btn--primary:hover {
  border-color: var(--wp-consent-primary-hover);
  background: var(--wp-consent-primary-hover);
}

.wp-consent-btn:focus-visible,
.wp-consent-close:focus-visible,
.wp-consent-toggle input:focus-visible + span,
.wp-consent-settings-button:focus-visible,
.wp-cookie-footer-button:focus-visible {
  outline: 3px solid var(--wp-consent-focus);
  outline-offset: 3px;
}

.wp-consent-backdrop {
  position: fixed;
  z-index: 2147483001;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.74);
}

.wp-consent-modal {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid var(--wp-consent-border);
  border-radius: 1rem;
  background: var(--wp-consent-bg);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.7);
}

.wp-consent-modal__head,
.wp-consent-modal__body,
.wp-consent-modal__foot {
  padding: 1.2rem;
}

.wp-consent-modal__head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--wp-consent-border);
  background: var(--wp-consent-bg);
}

.wp-consent-close {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--wp-consent-border);
  border-radius: 0.6rem;
  background: #202020;
  color: #fff;
  cursor: pointer;
  font-size: 1.35rem;
}

.wp-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  border: 1px solid var(--wp-consent-border);
  border-radius: 0.8rem;
  background: var(--wp-consent-surface);
  padding: 1rem;
}

.wp-consent-category + .wp-consent-category {
  margin-top: 0.8rem;
}

.wp-consent-category h3 {
  font-size: 1rem;
}

.wp-consent-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #4a4a4a;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: #d6d6d6;
  font-size: 0.75rem;
  white-space: nowrap;
}

.wp-consent-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wp-consent-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wp-consent-toggle span {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
  border: 1px solid #575757;
  border-radius: 999px;
  background: #292929;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.wp-consent-toggle span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 0.16s ease;
}

.wp-consent-toggle input:checked + span {
  border-color: var(--wp-consent-primary);
  background: var(--wp-consent-primary);
}

.wp-consent-toggle input:checked + span::after {
  transform: translateX(22px);
}

.wp-consent-toggle input:disabled + span {
  cursor: not-allowed;
  opacity: 0.72;
}

.wp-consent-modal__foot {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: grid;
  gap: 0.65rem;
  border-top: 1px solid var(--wp-consent-border);
  background: var(--wp-consent-bg);
}

.wp-consent-settings-button {
  position: fixed;
  z-index: 2147482990;
  left: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  min-height: 42px;
  border: 1px solid var(--wp-consent-border);
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.96);
  color: #fff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.wp-cookie-footer-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  padding: 0;
}

.wp-cookie-footer-button:hover {
  color: var(--primary, #e03b3b);
}

@media (min-width: 760px) {
  .wp-consent-banner {
    padding: 1.35rem 1.5rem;
  }

  .wp-consent-banner__grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .wp-consent-actions {
    grid-template-columns: repeat(3, auto);
  }

  .wp-consent-modal__foot {
    grid-template-columns: 1fr auto auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wp-consent-btn,
  .wp-consent-toggle span,
  .wp-consent-toggle span::after {
    transition: none !important;
  }
}


/* Mobilon a lebegő beállításgomb ne takarja a tartalmi CTA-kat. */
@media (max-width: 759px) {
  .wp-consent-settings-button {
    display: none !important;
  }

  .wp-consent-banner {
    left: 0.5rem;
    right: 0.5rem;
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    max-height: calc(100vh - 1rem);
    overflow: auto;
    padding: 1rem;
  }

  .wp-consent-modal__head,
  .wp-consent-modal__body,
  .wp-consent-modal__foot {
    padding: 1rem;
  }
}

/* Telefonon a lebegő gomb helyett a láblécben marad elérhető a beállítás. */
@media (max-width: 900px) {
  .wp-consent-settings-button { display: none !important; }
  .wp-consent-banner { left: 0.75rem !important; right: 0.75rem !important; bottom: 0.75rem !important; width: auto !important; max-height: calc(100vh - 1.5rem); overflow-y: auto; }
  .wp-consent-actions { width: 100%; }
  .wp-consent-actions .wp-consent-btn { flex: 1 1 100%; min-height: 44px; }
}
