/* ==========================================================================
   DM Tech Labs — Cookie Consent
   Every choice (Accept All / Reject Non-Essential / Customize) is rendered
   with equal visual weight on purpose — no dark patterns.
   ========================================================================== */

#dmtl-cookie-banner,
#dmtl-cookie-modal {
  --dmtl-ink: #0f1222;
  --dmtl-ink-soft: #4a4e5c;
  --dmtl-line: #e2e4ea;
  --dmtl-bg: #ffffff;
  --dmtl-bg-raised: #f7f7fa;
  --dmtl-accent: #3d3568;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-sizing: border-box;
}
#dmtl-cookie-banner *,
#dmtl-cookie-modal * { box-sizing: border-box; }

/* ---------- Banner ---------- */
#dmtl-cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999999;
  background: var(--dmtl-bg);
  border-top: 1px solid var(--dmtl-line);
  box-shadow: 0 -6px 28px rgba(15, 18, 34, 0.12);
  padding: 22px 24px;
  transform: translateY(110%);
  transition: transform .35s ease;
}
#dmtl-cookie-banner.dmtl-visible { transform: translateY(0); }

.dmtl-banner-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.dmtl-banner-text { flex: 1 1 420px; min-width: 260px; }
.dmtl-banner-text h2 {
  font-size: 16px; font-weight: 700; margin: 0 0 6px; color: var(--dmtl-ink);
}
.dmtl-banner-text p {
  font-size: 13.5px; line-height: 1.55; margin: 0; color: var(--dmtl-ink-soft); max-width: 68ch;
}
.dmtl-banner-text a { color: var(--dmtl-accent); text-decoration: underline; font-weight: 600; }

.dmtl-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

/* All three actions share the same size/padding/border-radius so no single
   choice is visually louder than the others. */
.dmtl-btn {
  appearance: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.dmtl-btn:hover { transform: translateY(-1px); }
.dmtl-btn:focus-visible { outline: 2.5px solid var(--dmtl-accent); outline-offset: 2px; }

/* Accept and Reject use the same neutral-dark treatment — same weight,
   same color family — only the label differs. */
.dmtl-btn-accept,
.dmtl-btn-reject {
  background: var(--dmtl-ink);
  color: #fff;
  border-color: var(--dmtl-ink);
}
.dmtl-btn-accept:hover,
.dmtl-btn-reject:hover { background: #23263a; border-color: #23263a; }

.dmtl-btn-customize {
  background: #fff;
  color: var(--dmtl-ink);
  border-color: var(--dmtl-line);
}
.dmtl-btn-customize:hover { border-color: var(--dmtl-ink); }

/* ---------- Modal ---------- */
#dmtl-cookie-modal {
  position: fixed; inset: 0; z-index: 1000000;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(15, 18, 34, 0.55);
}
#dmtl-cookie-modal.dmtl-open { display: flex; }

.dmtl-modal-card {
  background: var(--dmtl-bg);
  border-radius: 14px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px 30px 24px;
  box-shadow: 0 24px 64px rgba(15, 18, 34, 0.28);
}
.dmtl-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 6px;
}
.dmtl-modal-head h2 { font-size: 19px; font-weight: 700; margin: 0; color: var(--dmtl-ink); }
.dmtl-modal-close {
  background: none; border: none; cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--dmtl-ink-soft); padding: 4px 6px; border-radius: 6px;
}
.dmtl-modal-close:hover { background: var(--dmtl-bg-raised); color: var(--dmtl-ink); }
.dmtl-modal-intro { font-size: 13.5px; color: var(--dmtl-ink-soft); line-height: 1.55; margin: 0 0 20px; }

.dmtl-cat {
  border: 1px solid var(--dmtl-line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.dmtl-cat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px;
}
.dmtl-cat-head strong { font-size: 14px; color: var(--dmtl-ink); }
.dmtl-cat p { font-size: 12.8px; line-height: 1.5; color: var(--dmtl-ink-soft); margin: 0; }
.dmtl-cat-locked {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--dmtl-ink-soft); background: var(--dmtl-bg-raised); padding: 3px 9px; border-radius: 20px;
}

/* Toggle switch */
.dmtl-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.dmtl-switch input { opacity: 0; width: 0; height: 0; }
.dmtl-switch .dmtl-slider {
  position: absolute; inset: 0; background: #cfd2dc; border-radius: 22px; cursor: pointer; transition: background .15s;
}
.dmtl-switch .dmtl-slider::before {
  content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.dmtl-switch input:checked + .dmtl-slider { background: var(--dmtl-accent); }
.dmtl-switch input:checked + .dmtl-slider::before { transform: translateX(18px); }
.dmtl-switch input:disabled + .dmtl-slider { background: #b9bccb; cursor: not-allowed; }
.dmtl-switch input:focus-visible + .dmtl-slider { outline: 2.5px solid var(--dmtl-accent); outline-offset: 2px; }

.dmtl-modal-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--dmtl-line);
}
.dmtl-modal-actions .dmtl-btn { flex: 1 1 auto; text-align: center; }

@media (max-width: 640px) {
  .dmtl-banner-inner { flex-direction: column; align-items: stretch; }
  .dmtl-banner-actions { flex-direction: column; }
  .dmtl-banner-actions .dmtl-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #dmtl-cookie-banner { transition: none; }
  .dmtl-btn:hover { transform: none; }
}
