/* Selvstendige CMP-stiler for sider som ikke laster styles.css
   (index.html, kalkulator.html). Fargene matcher det mørke temaet. */

.cmp-banner[hidden] { display: none !important; }

.cmp-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding: 18px 20px;
  border: 1px solid #1e3855; border-radius: 14px;
  background: #0d1f35; color: #dce8f4;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  font-size: 14px;
}
.cmp-copy p { margin: 6px 0 0; color: #6b8fab; font-size: 13px; }
.cmp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }

.cmp-banner .button, .cmp-dialog .button {
  min-height: 38px; padding: 0 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid #1e3855;
  background: transparent; color: #dce8f4;
  font-family: inherit;
}
.cmp-banner .button.primary, .cmp-dialog .button.primary {
  background: #00d4aa; border-color: #00d4aa; color: #000;
}
.cmp-banner .button.primary:hover, .cmp-dialog .button.primary:hover { background: #00a887; }
.cmp-banner .button.secondary:hover, .cmp-dialog .button.secondary:hover { border-color: #00d4aa; }

.cmp-manage {
  position: fixed; right: 16px; bottom: 16px; z-index: 69;
  min-height: 34px; padding: 0 14px;
  border: 1px solid #1e3855; border-radius: 999px;
  background: #0d1f35; color: #6b8fab;
  font-size: 13px; cursor: pointer; font-family: inherit;
}

.cmp-dialog {
  width: min(500px, calc(100vw - 32px));
  border: 1px solid #1e3855; border-radius: 14px; padding: 0;
  background: #0d1f35; color: #dce8f4;
}
.cmp-dialog::backdrop { background: rgba(1,8,16,.75); }
.cmp-dialog-inner { padding: 24px; }
.cmp-dialog-inner h3 { margin: 0 0 8px; font-size: 22px; line-height: 1.1; }
.cmp-intro { margin: 0 0 14px; color: #6b8fab; font-size: 14px; }
.cmp-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 12px; padding: 14px 0; border-top: 1px solid #1e3855; }
.cmp-toggle-row strong { font-size: 15px; }
.cmp-help { margin: 4px 0 0; color: #6b8fab; font-size: 12px; }
.cmp-switch-control { position: relative; display: inline-flex; width: 44px; height: 26px; align-items: center; justify-content: center; }
.cmp-switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cmp-switch-slider { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #1e3855; transition: background .2s; }
.cmp-switch-slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); transition: transform .2s; }
.cmp-switch-control input:checked + .cmp-switch-slider { background: #00d4aa; }
.cmp-switch-control input:checked + .cmp-switch-slider::after { transform: translateX(18px); }
.cmp-switch-control input:disabled + .cmp-switch-slider { opacity: .5; }
.cmp-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

@media (max-width: 640px) {
  .cmp-banner { grid-template-columns: 1fr; }
}
