/* ═══════════════════════════════════════════
   Darthost Consent 2026 — v4.0.0
   Public styles: compact mobile-first bar + modal
   ═══════════════════════════════════════════ */

.dhc25-hidden { display: none !important; }

/* ═══════════════════════════════════════════
   BAR MODE — neutral, compact, mobile-first
   ═══════════════════════════════════════════ */

#dhc25-root.dhc25-mode-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  line-height: 1.45;
  pointer-events: none; /* only the bar is clickable */
}

#dhc25-root.dhc25-mode-bar .dhc25-bar {
  pointer-events: auto;
  background: var(--dhc25-bar-bg, #ffffff);
  color: var(--dhc25-bar-text, #1f2937);
  border-top: 1px solid var(--dhc25-bar-border, #e5e7eb);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.06);
  animation: dhc25-slideUp 0.28s cubic-bezier(0.22,1,0.36,1) both;
  max-width: 1400px;
  margin: 0 auto;
}

/* Position variants */
#dhc25-root.dhc25-bar-pos-bottom-left .dhc25-bar,
#dhc25-root.dhc25-bar-pos-bottom-right .dhc25-bar {
  max-width: 480px;
  margin: 0 12px 12px;
  border: 1px solid var(--dhc25-bar-border, #e5e7eb);
  border-radius: 14px;
}
#dhc25-root.dhc25-bar-pos-bottom-left .dhc25-bar  { margin-right: auto; }
#dhc25-root.dhc25-bar-pos-bottom-right .dhc25-bar { margin-left: auto; }

/* Rounded variant (full-width) */
#dhc25-root.dhc25-bar-rounded.dhc25-bar-pos-bottom .dhc25-bar {
  margin: 0 12px 12px;
  border: 1px solid var(--dhc25-bar-border, #e5e7eb);
  border-radius: 14px;
}

@keyframes dhc25-slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Collapsed (compact) row */
.dhc25-mode-bar .dhc25-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
}

.dhc25-mode-bar .dhc25-bar-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dhc25-mode-bar .dhc25-bar-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.dhc25-mode-bar .dhc25-bar-msg {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.dhc25-mode-bar .dhc25-bar-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.dhc25-mode-bar .dhc25-bar-desc {
  font-size: 0.8rem;
  opacity: 0.75;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

/* Compact size: hide description on narrow, show on tablet+ */
.dhc25-mode-bar.dhc25-bar-size-compact .dhc25-bar-desc { display: none; }

.dhc25-mode-bar .dhc25-bar-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dhc25-mode-bar .dhc25-bar-btn {
  border: 1px solid var(--dhc25-bar-border, #d1d5db);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--dhc25-bar-text, #1f2937);
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.dhc25-mode-bar .dhc25-bar-btn:hover {
  background: rgba(0,0,0,0.04);
}

.dhc25-mode-bar .dhc25-bar-btn:active {
  transform: translateY(1px);
}

.dhc25-mode-bar .dhc25-bar-btn:focus-visible {
  outline: 2px solid var(--dhc25-bar-btn-bg, #2d3748);
  outline-offset: 2px;
}

.dhc25-mode-bar .dhc25-bar-btn-primary {
  background: var(--dhc25-bar-btn-bg, #2d3748);
  color: var(--dhc25-bar-btn-text, #ffffff);
  border-color: var(--dhc25-bar-btn-bg, #2d3748);
  font-weight: 600;
}

.dhc25-mode-bar .dhc25-bar-btn-primary:hover {
  filter: brightness(1.08);
  background: var(--dhc25-bar-btn-bg, #2d3748);
}

/* Expandable panel */
.dhc25-mode-bar .dhc25-bar-panel {
  padding: 4px 18px 16px;
  border-top: 1px solid var(--dhc25-bar-border, #e5e7eb);
  animation: dhc25-fadeIn 0.2s ease both;
}

@keyframes dhc25-fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dhc25-mode-bar .dhc25-bar-panel-desc {
  margin: 10px 0 12px;
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.5;
}

.dhc25-mode-bar .dhc25-bar-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.dhc25-mode-bar .dhc25-bar-cat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,0.03);
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--dhc25-bar-border, #e5e7eb);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dhc25-mode-bar .dhc25-bar-cat:hover {
  background: rgba(0,0,0,0.05);
}

.dhc25-mode-bar .dhc25-bar-cat span {
  font-weight: 500;
  order: 1;
}

/* Toggle switch — bar */
.dhc25-mode-bar .dhc25-bar-cat input[type="checkbox"] {
  order: 2;
  appearance: none;
  -webkit-appearance: none;
  width: 32px; height: 18px;
  border-radius: 999px;
  background: #cbd5e0;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.18s ease;
  flex-shrink: 0;
  margin: 0;
  border: none;
}

.dhc25-mode-bar .dhc25-bar-cat input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.dhc25-mode-bar .dhc25-bar-cat input[type="checkbox"]:checked {
  background: var(--dhc25-bar-btn-bg, #2d3748);
}

.dhc25-mode-bar .dhc25-bar-cat input[type="checkbox"]:checked::after {
  transform: translateX(14px);
}

.dhc25-mode-bar .dhc25-bar-cat input[type="checkbox"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.dhc25-mode-bar .dhc25-bar-cat input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--dhc25-bar-btn-bg, #2d3748);
  outline-offset: 2px;
}

.dhc25-mode-bar .dhc25-bar-links-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 6px 0 10px;
  font-size: 0.8rem;
}

.dhc25-mode-bar .dhc25-bar-links-panel a {
  color: inherit;
  opacity: 0.75;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity 0.15s;
}

.dhc25-mode-bar .dhc25-bar-links-panel a:hover {
  opacity: 1;
}

.dhc25-mode-bar .dhc25-bar-save-row {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.dhc25-mode-bar .dhc25-bar-save-row .dhc25-bar-btn {
  min-width: 140px;
}

/* ═══════════════════════════════════════════
   MODAL MODE
   ═══════════════════════════════════════════ */

#dhc25-root.dhc25-mode-modal {
  position: fixed; inset: 0; z-index: 99999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  line-height: 1.5;
}

.dhc25-mode-modal .dhc25-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: saturate(120%) blur(2px);
}

.dhc25-mode-modal .dhc25-box {
  position: absolute;
  max-width: var(--dhc25-maxw, 560px);
  width: min(92vw, var(--dhc25-maxw, 560px));
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--dhc25-bg, #ffffff);
  color: var(--dhc25-text, #1f2937);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.22);
  padding: 22px 22px;
  border: 1px solid rgba(0,0,0,0.06);
  animation: dhc25-modalIn 0.25s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes dhc25-modalIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.dhc25-mode-modal .dhc25-header { margin-bottom: 6px; }
.dhc25-mode-modal .dhc25-header h2 { margin: 0; font-size: 1.2rem; font-weight: 600; }
.dhc25-mode-modal .dhc25-desc { margin: 6px 0 0; opacity: 0.85; font-size: 0.9rem; }

.dhc25-mode-modal .dhc25-cats {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.dhc25-mode-modal .dhc25-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.03);
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.06);
}

.dhc25-mode-modal .dhc25-cat span {
  order: 1;
  font-weight: 500;
  font-size: 0.9rem;
}

.dhc25-mode-modal .dhc25-cat input[type="checkbox"] {
  order: 2;
  appearance: none;
  -webkit-appearance: none;
  width: 40px; height: 22px;
  border-radius: 999px;
  background: #cbd5e0;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.18s ease;
  margin: 0;
  border: none;
}

.dhc25-mode-modal .dhc25-cat input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}

.dhc25-mode-modal .dhc25-cat input[type="checkbox"]:checked {
  background: var(--dhc25-primary, #2d3748);
}

.dhc25-mode-modal .dhc25-cat input[type="checkbox"]:checked::after {
  transform: translateX(18px);
}

.dhc25-mode-modal .dhc25-cat input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.dhc25-mode-modal .dhc25-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.dhc25-mode-modal .dhc25-btn {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.88rem;
  transition: transform 0.08s, filter 0.15s;
  font-family: inherit;
}

.dhc25-mode-modal .dhc25-btn:active { transform: translateY(1px); }

.dhc25-mode-modal .dhc25-accept-all {
  background: var(--dhc25-primary, #2d3748);
  color: var(--dhc25-btn-text, #ffffff);
  font-weight: 600;
}
.dhc25-mode-modal .dhc25-accept-all:hover { filter: brightness(1.1); }

.dhc25-mode-modal .dhc25-reject-all {
  background: transparent;
  color: var(--dhc25-text, #1f2937);
  border-color: rgba(0,0,0,0.15);
}
.dhc25-mode-modal .dhc25-reject-all:hover { background: rgba(0,0,0,0.04); }

.dhc25-mode-modal .dhc25-customize {
  background: transparent;
  color: var(--dhc25-text, #1f2937);
  border-color: rgba(0,0,0,0.15);
}
.dhc25-mode-modal .dhc25-customize:hover { background: rgba(0,0,0,0.04); }

.dhc25-mode-modal .dhc25-save {
  background: var(--dhc25-primary, #2d3748);
  color: var(--dhc25-btn-text, #ffffff);
  width: 100%;
  margin-top: 8px;
  font-weight: 600;
}
.dhc25-mode-modal .dhc25-save:hover { filter: brightness(1.1); }

.dhc25-mode-modal .dhc25-links {
  margin-top: 14px;
  font-size: 0.82rem;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0.85;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.dhc25-mode-modal .dhc25-links ul {
  display: flex;
  gap: 14px;
  margin: 0; padding: 0;
  list-style: none;
}
.dhc25-mode-modal .dhc25-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.dhc25-mode-modal .dhc25-links-title { font-weight: 600; }

/* ═══════════════════════════════════════════
   Shared
   ═══════════════════════════════════════════ */

.dhc25-linklike {
  background: none;
  border: none;
  padding: 8px 0 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  color: inherit;
  font-weight: 500;
  font-size: 0.82rem;
  opacity: 0.75;
  transition: opacity 0.15s;
  font-family: inherit;
}

.dhc25-linklike:hover { opacity: 1; }

.dhc25-info { margin-top: 8px; }
.dhc25-subtitle { font-size: 0.95rem; margin: 0 0 8px; font-weight: 600; }

.dhc25-table-wrap {
  max-height: 240px;
  overflow: auto;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
}

.dhc25-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.dhc25-table thead th {
  position: sticky; top: 0;
  background: rgba(0,0,0,0.04);
  backdrop-filter: blur(2px);
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  font-weight: 600;
}

.dhc25-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: top;
}

.dhc25-table tbody tr:nth-child(odd) { background: rgba(0,0,0,0.02); }

/* ═══════════════════════════════════════════
   Footer manage link
   ═══════════════════════════════════════════ */

.dhc25-footer-link {
  position: fixed;
  right: 12px; bottom: 12px;
  z-index: 99998;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  font-weight: 500;
  font-size: 0.78rem;
  line-height: 1.2;
  opacity: 0.85;
  text-decoration: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Arial, sans-serif;
  transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
}

.dhc25-footer-link:hover,
.dhc25-footer-link:focus-visible {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  outline: none;
}

/* ═══════════════════════════════════════════
   Inherit mode
   ═══════════════════════════════════════════ */

#dhc25-root[data-inherit="1"].dhc25-mode-bar .dhc25-bar {
  background: var(--dhc25-inherit-bg, #fff);
  color: var(--dhc25-inherit-text, #1f2937);
  border-color: var(--dhc25-inherit-border, #e5e7eb);
}

#dhc25-root[data-inherit="1"].dhc25-mode-bar .dhc25-bar-btn {
  border-color: var(--dhc25-inherit-border, #e5e7eb);
  color: var(--dhc25-inherit-text, #1f2937);
}

#dhc25-root[data-inherit="1"].dhc25-mode-bar .dhc25-bar-btn-primary {
  background: var(--dhc25-inherit-accent, var(--dhc25-bar-btn-bg));
  color: var(--dhc25-inherit-accent-text, var(--dhc25-bar-btn-text));
  border-color: transparent;
}

#dhc25-root[data-inherit="1"].dhc25-mode-bar .dhc25-bar-cat {
  background: var(--dhc25-inherit-card, rgba(0,0,0,0.03));
  border-color: var(--dhc25-inherit-border, #e5e7eb);
}

/* ═══════════════════════════════════════════
   Legal docs
   ═══════════════════════════════════════════ */

.dhc25-legal-doc {
  max-width: 820px;
  line-height: 1.75;
  color: var(--dhc25-legal-text, #374151);
}

.dhc25-legal-doc h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--dhc25-legal-heading, #111827);
}

.dhc25-legal-doc h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--dhc25-legal-border, #e5e7eb);
  color: var(--dhc25-legal-heading, #111827);
}

.dhc25-legal-doc h3 { color: var(--dhc25-legal-heading, #111827); }

.dhc25-legal-doc a {
  color: var(--dhc25-legal-link, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dhc25-legal-doc a:hover { opacity: 0.8; }
.dhc25-legal-doc ul { padding-left: 1.5rem; }
.dhc25-legal-doc li { margin-bottom: 0.4rem; color: var(--dhc25-legal-text, #374151); }
.dhc25-legal-doc p { color: var(--dhc25-legal-text, #374151); }
.dhc25-legal-doc strong { color: var(--dhc25-legal-heading, #111827); }
.dhc25-legal-doc em { color: var(--dhc25-legal-text, #6b7280); }

/* ═══════════════════════════════════════════
   Responsive — mobile first
   Compact bar is the star here
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Bar: single-line on mobile, 2 buttons visible, customize hidden behind the "more" flow */
  .dhc25-mode-bar .dhc25-bar-inner {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }

  .dhc25-mode-bar .dhc25-bar-title { font-size: 0.85rem; }
  .dhc25-mode-bar .dhc25-bar-desc { display: none !important; }

  /* Stack actions full width below content */
  .dhc25-mode-bar .dhc25-bar-actions {
    width: 100%;
    gap: 6px;
  }

  .dhc25-mode-bar .dhc25-bar-btn {
    flex: 1;
    padding: 8px 6px;
    font-size: 0.78rem;
    text-align: center;
    min-width: 0; /* allow shrink */
  }

  /* Side-positioned bar: drop rounded on mobile for more room */
  #dhc25-root.dhc25-bar-pos-bottom-left .dhc25-bar,
  #dhc25-root.dhc25-bar-pos-bottom-right .dhc25-bar,
  #dhc25-root.dhc25-bar-rounded.dhc25-bar-pos-bottom .dhc25-bar {
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    max-width: 100%;
  }

  .dhc25-mode-bar .dhc25-bar-panel { padding: 8px 12px 14px; }
  .dhc25-mode-bar .dhc25-bar-cats { flex-direction: column; gap: 6px; }
  .dhc25-mode-bar .dhc25-bar-cat { width: 100%; justify-content: space-between; }

  .dhc25-mode-bar .dhc25-bar-save-row .dhc25-bar-btn {
    width: 100%;
  }

  /* Modal: single column */
  .dhc25-mode-modal .dhc25-actions { grid-template-columns: 1fr; gap: 6px; }
  .dhc25-mode-modal .dhc25-box { padding: 18px 16px; }

  .dhc25-table th, .dhc25-table td { padding: 7px 8px; font-size: 0.78rem; }

  .dhc25-footer-link {
    font-size: 0.74rem;
    padding: 5px 10px;
    right: 8px; bottom: 8px;
  }
}

@media (max-width: 380px) {
  /* Ultra-narrow: drop the icon, tighten further */
  .dhc25-mode-bar .dhc25-bar-icon { display: none; }
  .dhc25-mode-bar .dhc25-bar-btn { font-size: 0.76rem; padding: 7px 4px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  #dhc25-root.dhc25-mode-bar .dhc25-bar,
  .dhc25-mode-modal .dhc25-box,
  .dhc25-mode-bar .dhc25-bar-panel {
    animation: none !important;
  }
  .dhc25-bar-btn, .dhc25-btn, .dhc25-footer-link {
    transition: none !important;
  }
}
