/* ==========================================================================
   Adlesa – shared UI additions: header call-to-action menu, cookie consent
   (loaded after styles.css and pages.css on every page)
   ========================================================================== */

/* Header: "Jetzt starten" menu (publisher / advertiser) ---------------------- */
.cta-dd { position: relative; }
.cta-dd-btn { cursor: pointer; font-family: inherit; }
.cta-dd-btn svg { width: 10px; height: 10px; transition: transform .15s; }
.cta-dd.open .cta-dd-btn svg { transform: rotate(180deg); }
.cta-dd-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 360px; z-index: 60;
  background: #fff; border: 1px solid #e6e6ea; border-radius: 12px; padding: 8px;
  box-shadow: 0 18px 40px rgba(11, 20, 98, .16);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.cta-dd.open .cta-dd-menu { opacity: 1; visibility: visible; transform: none; }
.cta-dd-menu a { display: block; padding: 14px 16px; border-radius: 8px; }
.cta-dd-menu a:hover, .cta-dd-menu a:focus-visible { background: var(--lilac-bg); }
.cta-dd-menu a b { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--black); }
.cta-dd-menu a b em {
  font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 999px; background: var(--lime); color: var(--navy); font-weight: 500;
}
.cta-dd-menu a span { display: block; margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.cta-dd-menu a:hover b { color: var(--blue); }

@media (max-width: 980px) {
  /* inside the open mobile menu: two clear buttons instead of a dropdown */
  .cta-dd-btn { display: none; }
  .cta-dd-menu {
    position: static; width: auto; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 0; display: grid; gap: 8px; background: transparent;
  }
  .cta-dd-menu a { border: 1px solid #d5d6e6; padding: 12px 14px; }
  .cta-dd-menu a:first-child { background: var(--blue); border-color: var(--blue); }
  .cta-dd-menu a:first-child b, .cta-dd-menu a:first-child span { color: #fff; }
  .cta-dd-menu a:first-child b em { background: var(--lime); color: var(--navy); }
  .cta-dd { width: 100%; }
}

/* Cookie consent ------------------------------------------------------------- */
.cc-bar {
  position: fixed; left: 20px; bottom: 20px; z-index: 1000; width: min(460px, calc(100vw - 40px));
  background: #fff; color: var(--text); border: 1px solid #e3e4ee; border-radius: 16px; padding: 24px;
  box-shadow: 0 24px 64px rgba(11, 20, 98, .24); font-family: var(--sans);
  animation: cc-in .25s ease-out;
}
.cc-bar[hidden], .cc-modal[hidden] { display: none; }
@keyframes cc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cc-eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px; background: var(--lime); color: var(--navy);
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; font-weight: 500;
}
.cc-bar h2, .cc-modal h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; letter-spacing: -.02em; color: var(--navy); font-weight: 600; }
.cc-bar p, .cc-modal p { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--text); }
.cc-bar a, .cc-modal a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-btn {
  height: 46px; padding: 0 14px; border-radius: 6px; border: 1.5px solid var(--navy); background: #fff; color: var(--navy);
  font: 500 15px/1 var(--sans); cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.cc-btn:hover { background: var(--blue-light); }
.cc-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.cc-btn.primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.cc-btn:focus-visible, .cc-link:focus-visible, .cc-switch input:focus-visible + i { outline: 3px solid var(--lavender); outline-offset: 2px; }
.cc-link {
  grid-column: 1 / -1; height: 34px; background: none; border: 0; color: var(--navy); cursor: pointer;
  font: 500 14px/1 var(--sans); text-decoration: underline; text-underline-offset: 3px;
}
.cc-link:hover { color: var(--blue); }

.cc-modal {
  position: fixed; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 20px;
  background: rgba(11, 20, 98, .55); font-family: var(--sans);
}
.cc-card {
  width: min(580px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 16px; padding: 28px;
  box-shadow: 0 30px 80px rgba(11, 20, 98, .35); animation: cc-in .2s ease-out;
}
.cc-cats { display: grid; gap: 10px; margin: 4px 0 20px; }
.cc-cat { display: flex; align-items: flex-start; gap: 16px; padding: 16px; border: 1px solid #e3e4ee; border-radius: 12px; background: #fafaff; }
.cc-cat > div { flex: 1; min-width: 0; }
.cc-cat strong { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--navy); font-weight: 600; }
.cc-cat strong small {
  font-family: var(--mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; font-weight: 500;
  padding: 2px 7px; border-radius: 999px; background: var(--blue-light); color: var(--blue);
}
.cc-cat p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cc-switch { position: relative; flex: none; width: 46px; height: 26px; margin-top: 2px; }
.cc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cc-switch i { position: absolute; inset: 0; border-radius: 999px; background: #c9cadb; transition: background .15s; }
.cc-switch i::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s;
}
.cc-switch input:checked + i { background: var(--blue); }
.cc-switch input:checked + i::after { transform: translateX(20px); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + i { opacity: .55; }
.cc-modal .cc-actions { grid-template-columns: repeat(3, 1fr); }
.cc-modal .cc-actions .cc-btn { padding: 0 8px; font-size: 14px; }

@media (max-width: 560px) {
  .cc-bar { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 20px; }
  .cc-card { padding: 22px; }
  .cc-modal .cc-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .cc-bar, .cc-card { animation: none; } }
