/* ==========================================================
   AZ Campaign Popup System v2.5.2
   AZ Skadedyrsservice
   ----------------------------------------------------------
   Standard:
   - Desktop: sidepanel fra venstre
   - Mobil: topbar under sticky header
   - Mobil topbar bruger samme card-indhold som desktop

   Hensyn:
   - Sticky header/menu
   - Sticky bund-CTA
   - Cookie-ikon
   - TOC i højre side
   - Hero/øverste layoutflow
========================================================== */

:root {
  --azcp-z: 999999;
  --azcp-overlay: rgba(8, 18, 32, 0.14);
  --azcp-bg: #ffffff;
  --azcp-text: #1d1d1d;
  --azcp-muted: #5e6875;
  --azcp-blue: #1D3F72;
  --azcp-red: #C62828;
  --azcp-border: rgba(29, 63, 114, 0.12);
  --azcp-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  --azcp-radius: 18px;
  --azcp-btn-radius: 999px;

  --azcp-safe-top: 84px;
  --azcp-safe-bottom: 118px;
  --azcp-cookie-extra: 18px;
  --azcp-mobile-mini-lift: calc(var(--azcp-safe-bottom) + var(--azcp-cookie-extra));
  --azcp-desktop-panel-top: 120px;
}

body.azcp-open {
  overflow: hidden;
}

/* ==========================================================
   GENERIC CARD CONTENT
========================================================== */
.azcp-top {
  padding: 18px 22px 10px;
  background: linear-gradient(135deg, rgba(29,63,114,.05) 0%, rgba(198,40,40,.035) 100%);
}

.azcp-label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(29, 63, 114, 0.08);
  color: var(--azcp-blue);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.azcp-title {
  margin: 0;
  color: var(--azcp-blue);
  font-family: "Merriweather", Georgia, serif;
  font-size: 26px;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: manual;
}

.azcp-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f2f5f8;
  color: #263241;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease, opacity .18s ease;
  z-index: 3;
}

.azcp-close:hover {
  background: #e8edf3;
  transform: scale(1.04);
}

.azcp-body {
  padding: 8px 22px 22px;
}

.azcp-lead {
  display: block;
  width: 100%;
  clear: both;
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--azcp-text);
}

.azcp-pricebox {
  display: block;
  width: 100%;
  clear: both;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(29,63,114,.10);
  border-radius: 16px;
  background: #f8fafc;
}

.azcp-price {
  display: block;
  width: 100%;
  clear: both;
  margin: 0 0 6px;
  color: var(--azcp-red);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.azcp-sub {
  display: block;
  width: 100%;
  margin: 0;
  color: var(--azcp-muted);
  font-size: 14px;
  line-height: 1.5;
}

.azcp-bullets {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.azcp-bullets li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 24px;
  font-size: 14px;
  line-height: 1.5;
}

.azcp-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--azcp-red);
  font-weight: 700;
}

.azcp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.azcp-btn {
  min-height: 46px;
  padding: 13px 18px;
  border: 0;
  border-radius: var(--azcp-btn-radius);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.azcp-btn:hover {
  transform: translateY(-1px);
  opacity: .97;
}

.azcp-btn--primary {
  background: var(--azcp-red);
  color: #fff;
  box-shadow: 0 10px 24px rgba(198, 40, 40, 0.18);
}

.azcp-btn--secondary {
  background: var(--azcp-blue);
  color: #fff;
}

.azcp-fineprint {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  color: var(--azcp-muted);
  font-size: 12px;
  line-height: 1.5;
}

.azcp-meta {
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #7a8491;
}

/* ==========================================================
   DESKTOP SIDEPANEL FRA VENSTRE
========================================================== */
.azcp-sidepanel {
  position: fixed;
  top: var(--azcp-desktop-panel-top, 120px);
  left: 18px;
  z-index: var(--azcp-z);

  width: min(92vw, 360px);
  max-height: calc(100vh - var(--azcp-desktop-panel-top, 120px) - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  background: #fff;
  color: var(--azcp-text);
  border: 1px solid var(--azcp-border);
  border-radius: 18px;
  box-shadow: var(--azcp-shadow);
  font-family: "Open Sans", Arial, sans-serif;

  transform: translateX(-110%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    transform .42s cubic-bezier(.22,.8,.22,1),
    opacity .30s ease,
    visibility .30s ease;
}

.azcp-sidepanel.is-visible {
  transform: translateX(0) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.azcp-sidepanel .azcp-title {
  font-size: 23px;
  padding-right: 44px;
}

.azcp-sidepanel .azcp-price {
  font-size: 24px;
}

.azcp-sidepanel .azcp-actions {
  flex-direction: column;
}

.azcp-sidepanel .azcp-btn {
  width: 100%;
}

/* ==========================================================
   TOPBAR
   Mobil topbar bruger nu samme card-indhold som desktop
========================================================== */
.azcp-topbar {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--azcp-safe-top);
  z-index: var(--azcp-z);
  font-family: "Open Sans", Arial, sans-serif;

  transform: translateY(-120%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    transform .36s cubic-bezier(.22,.8,.22,1),
    opacity .26s ease,
    visibility .26s ease;
}

.azcp-topbar.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================
   MINI
========================================================== */
.azcp-mini {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: var(--azcp-z);
  width: min(92vw, 360px);
  background: #fff;
  color: var(--azcp-text);
  border: 1px solid var(--azcp-border);
  border-radius: 18px;
  box-shadow: var(--azcp-shadow);
  font-family: "Open Sans", Arial, sans-serif;

  transform: translateY(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity .28s ease,
    visibility .28s ease,
    transform .34s cubic-bezier(.22,.8,.22,1);
}

.azcp-mini.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.azcp-mini .azcp-title {
  font-size: 22px;
  padding-right: 44px;
}

.azcp-mini .azcp-price {
  font-size: 24px;
}

.azcp-mini .azcp-actions {
  flex-direction: column;
}

.azcp-mini .azcp-btn {
  width: 100%;
}

/* ==========================================================
   LEGACY OVERLAY LAYOUTS
========================================================== */
.azcp-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--azcp-z);
  background: var(--azcp-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(20px, var(--azcp-safe-top))
    20px
    max(20px, calc(var(--azcp-safe-bottom) + var(--azcp-cookie-extra)))
    20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
  box-sizing: border-box;
}

.azcp-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.azcp-modal,
.azcp-sheet {
  width: min(100%, 560px);
  max-height: calc(100vh - var(--azcp-safe-top) - var(--azcp-safe-bottom) - var(--azcp-cookie-extra) - 28px);
  background: var(--azcp-bg);
  color: var(--azcp-text);
  border-radius: var(--azcp-radius);
  border: 1px solid var(--azcp-border);
  box-shadow: var(--azcp-shadow);
  overflow: auto;
  position: relative;
  transform: translateY(12px) scale(.985);
  transition: transform .34s cubic-bezier(.22,.8,.22,1);
  font-family: "Open Sans", Arial, sans-serif;
  -webkit-overflow-scrolling: touch;
}

.azcp-overlay.is-visible .azcp-modal,
.azcp-overlay.is-visible .azcp-sheet {
  transform: translateY(0) scale(1);
}

/* ==========================================================
   DESKTOP / TABLET
========================================================== */
@media (min-width: 768px) {
  .azcp-topbar {
    top: 0;
  }

  .azcp-overlay {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .azcp-modal,
  .azcp-sheet {
    max-height: min(86vh, 900px);
  }
}

/* ==========================================================
   MOBILE
========================================================== */
@media (max-width: 767px) {
  .azcp-sidepanel {
    display: none;
  }

  .azcp-overlay {
    align-items: flex-end;
    padding:
      max(12px, var(--azcp-safe-top))
      12px
      max(12px, calc(var(--azcp-safe-bottom) + var(--azcp-cookie-extra)))
      12px;
  }

  .azcp-modal,
  .azcp-sheet {
    width: 100%;
    max-width: none;
    border-radius: 22px;
    transform: translateY(100%);
    max-height: calc(100vh - var(--azcp-safe-top) - var(--azcp-safe-bottom) - var(--azcp-cookie-extra) - 12px);
  }

  .azcp-overlay.is-visible .azcp-modal,
  .azcp-overlay.is-visible .azcp-sheet {
    transform: translateY(0);
  }

  .azcp-sheet {
    border-radius: 22px 22px 0 0;
  }

  .azcp-top {
    padding: 16px 18px 10px;
  }

  .azcp-body {
    padding: 8px 18px 20px;
  }

  .azcp-title {
    display: block;
    width: 100%;
    margin: 0 0 8px !important;
    padding-right: 42px !important;
    font-size: 23px;
    line-height: 1.2;
  }

  .azcp-label,
  .azcp-lead,
  .azcp-pricebox,
  .azcp-price,
  .azcp-sub,
  .azcp-fineprint,
  .azcp-bullets,
  .azcp-bullets li,
  .azcp-actions {
    display: block !important;
    width: 100% !important;
    clear: both !important;
  }

  .azcp-label {
    margin: 0 0 10px !important;
  }

  .azcp-lead,
  .azcp-bullets li {
    font-size: 15px;
  }

  .azcp-lead {
    margin: 0 0 12px !important;
    line-height: 1.5;
  }

  .azcp-pricebox {
    margin: 0 0 14px !important;
    padding: 14px 16px;
  }

  .azcp-price {
    margin: 0 0 6px !important;
    font-size: 24px;
    line-height: 1.1;
  }

  .azcp-sub {
    margin: 0 !important;
    font-size: 14px;
    line-height: 1.45;
  }

  .azcp-actions {
    flex-direction: column;
  }

  .azcp-btn {
    width: 100%;
  }

  .azcp-mini {
    left: 12px;
    right: 12px;
    bottom: var(--azcp-mobile-mini-lift);
    width: auto;
  }

  /* Mobil topbar skal ligne desktop-card */
  .azcp-topbar {
    left: 12px !important;
    right: 12px !important;
    top: var(--azcp-safe-top) !important;
    background: #ffffff !important;
    color: var(--azcp-text) !important;
    border: 1px solid var(--azcp-border) !important;
    border-radius: 18px !important;
    box-shadow: var(--azcp-shadow) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - var(--azcp-safe-top) - var(--azcp-safe-bottom) - var(--azcp-cookie-extra) - 12px);
  }

  .azcp-topbar .azcp-actions {
    flex-direction: column;
  }

  .azcp-topbar .azcp-btn {
    width: 100%;
  }

  .azcp-topbar .azcp-close {
    top: 10px;
    right: 10px;
  }
}

/* ==========================================================
   AZ Popup CTA state lock
   Sikrer at popup-knapper ikke skifter farve efter klik
========================================================== */
.azcp-btn--primary,
.azcp-btn--primary:link,
.azcp-btn--primary:visited,
.azcp-btn--primary:hover,
.azcp-btn--primary:focus,
.azcp-btn--primary:active {
  background: #C62828 !important;
  color: #fff !important;
}

.azcp-btn--secondary,
.azcp-btn--secondary:link,
.azcp-btn--secondary:visited,
.azcp-btn--secondary:hover,
.azcp-btn--secondary:focus,
.azcp-btn--secondary:active {
  background: #1D3F72 !important;
  color: #fff !important;
}

/* ==========================================================
   AZ Popup desktop hard-fix
   Holder sidepanel stabilt i venstre top
========================================================== */
body .azcp-sidepanel {
  position: fixed !important;
  top: 120px !important;
  left: 18px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 999999 !important;
  transform: translateX(-110%) translateY(8px);
}

body .azcp-sidepanel.is-visible {
  transform: translateX(0) translateY(0);
}