/* =============================================================
   SG Embed Core – Consent UI
   ============================================================= */

/* ── Consent bar ──────────────────────────────────────────── */
.sg-cb {
  margin: 12px 0 4px;
  padding: 10px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Top row: identity + privacy link */
.sg-cb__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sg-cb__identity {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sg-cb__logo {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(255,255,255,.55);
}

.sg-cb__name {
  font-size: .76rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  line-height: 1.2;
  white-space: nowrap;
}

/* Privacy link */
.sg-cb__privacy {
  font-size: .68rem;
  color: rgba(255,255,255,.25) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,.12) !important;
  background: none !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s;
}
.sg-cb__privacy:hover { color: rgba(255,255,255,.55) !important; }

/* Bottom row: note + actions */
.sg-cb__bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.sg-cb__note {
  flex: 1;
  min-width: 180px;
  font-size: .68rem;
  color: rgba(255,255,255,.38);
  line-height: 1.4;
}

.sg-cb__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* „Einmalig laden" button */
.sg-cb-once {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  transition: background .15s, border-color .15s;
}
.sg-cb-once:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.35);
}
.sg-cb--page .sg-cb-once {
  border-color: rgba(255,255,255,.1);
  color: rgba(255,255,255,.35);
  cursor: default;
  pointer-events: none;
}
.sg-cb--page .sg-cb-once::before { content: '✓\00a0'; }
.sg-cb--global .sg-cb-once { display: none; }

/* „Dauerhaft erlauben" toggle */
.sg-cb__toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.sg-cb__toggle input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.sg-cb__label {
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  line-height: 1.3;
  white-space: nowrap;
}
.sg-cb__label-sub {
  font-weight: 400;
  color: rgba(255,255,255,.4);
}
.sg-cb--global .sg-cb__label { color: var(--text-main, #fff); }

/* Toggle switch */
.sg-toggle-switch {
  position: relative;
  flex-shrink: 0;
  width: 44px; height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  transition: background .2s;
}
.sg-toggle-switch::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.sg-toggle-switch--on,
input:checked ~ .sg-toggle-switch {
  background: var(--accent-color, #3CFFD0);
}
.sg-toggle-switch--on::after,
input:checked ~ .sg-toggle-switch::after {
  transform: translateX(18px);
}

@media (max-width: 600px) {
  .sg-cb__bottom     { flex-direction: column; align-items: flex-start; }
  .sg-cb__note       { min-width: 0; width: 100%; }
  .sg-cb__actions    { width: 100%; flex-wrap: wrap; }
}

/* ── Embed containers ─────────────────────────────────────── */
.sg-embed {
  position: relative;
  margin: 4px 0 24px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  box-sizing: border-box;
}

/* YouTube */
.sg-embed--youtube .sg-embed__preview {
  width: 100%; aspect-ratio: 16/9; overflow: hidden;
  position: relative;
}
.sg-embed--youtube .sg-embed__preview img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .3;
  filter: blur(3px) saturate(.5);
  display: block;
}
.sg-embed__preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}
.sg-embed__preview-label {
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: .01em;
}
.sg-embed--youtube iframe {
  display: block; width: 100%; border: 0; aspect-ratio: 16/9;
}

/* Spotify – neutral placeholder, no circle */
.sg-embed--spotify:not(.sg-loaded) {
  min-height: 80px;
}
.sg-embed__placeholder--spotify {
  display: none;
}
.sg-embed--spotify.sg-loaded {
  display: block;
  min-height: 0 !important;
  background: none;
  border: none;
  overflow: visible;
}
.sg-embed--spotify iframe {
  display: block; width: 100%; border: 0; border-radius: 10px;
}

/* Instagram */
.sg-embed--instagram {
  border: none;
  background: none;
  margin: 0;
}
.sg-ig-placeholder {
  position: relative;
  width: 100%;
  min-height: 200px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  overflow: hidden;
}
.sg-ig-placeholder__icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.sg-ig-placeholder__icon svg {
  width: 28px; height: 28px;
  color: rgba(255,255,255,.10);
}
.sg-ig-loaded { margin: 0; }

/* Google Maps */
.sg-embed--google-maps .sg-embed__placeholder--maps {
  height: 200px;
}
.sg-embed--google-maps iframe {
  display: block; width: 100%; border: 0; border-radius: 10px;
}
