.cfu-banner, .cfu-backdrop, .cfu-reopen {
  --cfu-primary: #1a73e8; --cfu-bg: #ffffff; --cfu-text: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5; color: var(--cfu-text);
}
.cfu-banner *, .cfu-backdrop * { box-sizing: border-box; }

/* Banner */
.cfu-banner {
  position: fixed; z-index: 2147483000; background: var(--cfu-bg);
  box-shadow: 0 -2px 24px rgba(0, 0, 0, .18); border: 1px solid rgba(0, 0, 0, .08);
}
.cfu-pos-bottom { left: 0; right: 0; bottom: 0; }
.cfu-pos-bottom .cfu-inner { max-width: 1200px; margin: 0 auto; padding: 18px 24px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.cfu-pos-bottom .cfu-body { flex: 1 1 420px; }
.cfu-pos-bottom-left, .cfu-pos-bottom-right { bottom: 16px; width: min(420px, calc(100vw - 32px)); border-radius: 12px; }
.cfu-pos-bottom-left { left: 16px; }
.cfu-pos-bottom-right { right: 16px; }
.cfu-pos-bottom-left .cfu-inner, .cfu-pos-bottom-right .cfu-inner, .cfu-pos-center .cfu-inner { padding: 20px; }
.cfu-pos-center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .45), 0 10px 40px rgba(0, 0, 0, .3); }

.cfu-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.cfu-text { margin: 0 0 4px; }
.cfu-link { color: var(--cfu-primary); text-decoration: underline; }
.cfu-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cfu-pos-bottom-left .cfu-actions, .cfu-pos-bottom-right .cfu-actions, .cfu-pos-center .cfu-actions { margin-top: 14px; }
.cfu-pos-bottom-left .cfu-btn, .cfu-pos-bottom-right .cfu-btn, .cfu-pos-center .cfu-btn { flex: 1 1 auto; }

.cfu-btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; padding: 10px 16px; border-radius: 8px;
  border: 2px solid var(--cfu-primary); background: transparent; color: var(--cfu-primary); min-height: 42px;
}
.cfu-btn-primary { background: var(--cfu-primary); color: #fff; }
.cfu-btn-ghost { border-color: transparent; color: var(--cfu-text); text-decoration: underline; }
.cfu-btn:hover { filter: brightness(.93); }
.cfu-btn:focus-visible, .cfu-close:focus-visible, .cfu-reopen:focus-visible { outline: 3px solid rgba(26, 115, 232, .5); outline-offset: 2px; }

/* Beállítások ablak */
.cfu-backdrop { position: fixed; inset: 0; z-index: 2147483100; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cfu-modal { background: var(--cfu-bg); color: var(--cfu-text); border-radius: 12px; width: 100%; max-width: 640px; max-height: 100%; display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
.cfu-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(0, 0, 0, .1); }
.cfu-modal-head .cfu-title { margin: 0; font-size: 18px; }
.cfu-close { appearance: none; border: 0; background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--cfu-text); padding: 0 6px; }
.cfu-modal-body { padding: 16px 20px; overflow-y: auto; }
.cfu-modal-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid rgba(0, 0, 0, .1); }
.cfu-cat { border: 1px solid rgba(0, 0, 0, .12); border-radius: 8px; padding: 12px 14px; margin-top: 10px; }
.cfu-cat-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cfu-cat-desc { margin: 6px 0 0; opacity: .85; }
.cfu-details { margin-top: 8px; }
.cfu-details summary { cursor: pointer; color: var(--cfu-primary); font-weight: 600; }
.cfu-details table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.cfu-details td { padding: 6px 0; border-top: 1px solid rgba(0, 0, 0, .08); vertical-align: top; }
.cfu-details small { opacity: .75; }
.cfu-table-wrap { overflow-x: auto; }

/* Kapcsoló */
.cfu-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.cfu-switch input { opacity: 0; width: 100%; height: 100%; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.cfu-slider { position: absolute; inset: 0; background: #b0b5bd; border-radius: 26px; transition: background .2s; }
.cfu-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; }
.cfu-switch input:checked + .cfu-slider { background: var(--cfu-primary); }
.cfu-switch input:checked + .cfu-slider::before { transform: translateX(20px); }
.cfu-switch input:disabled { cursor: not-allowed; }
.cfu-switch input:disabled + .cfu-slider { opacity: .55; }
.cfu-switch input:focus-visible + .cfu-slider { outline: 3px solid rgba(26, 115, 232, .5); outline-offset: 2px; }

/* Újranyitó gomb */
.cfu-reopen {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147482000; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--cfu-reopen-bg, var(--cfu-primary)); color: var(--cfu-reopen-icon, #fff); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

/* Letiltott beágyazás helyettesítője */
.cfu-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  background: #f1f3f5; color: #1f2937; border: 1px dashed #adb5bd; border-radius: 8px; padding: 24px; margin: 10px 0; min-height: 160px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; --cfu-primary: #1a73e8;
}
.cfu-placeholder p { margin: 0; }

/* Shortcode */
.cfu-declaration table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; }
.cfu-declaration th, .cfu-declaration td { text-align: left; padding: 8px 10px; border: 1px solid rgba(0, 0, 0, .12); vertical-align: top; }
.cfu-sc-button { cursor: pointer; padding: 10px 18px; border-radius: 8px; border: 2px solid #1a73e8; background: #1a73e8; color: #fff; font-weight: 600; }

@media (max-width: 600px) {
  .cfu-actions { width: 100%; }
  .cfu-actions .cfu-btn { flex: 1 1 100%; }
  .cfu-modal-foot .cfu-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .cfu-slider, .cfu-slider::before { transition: none; } }

.cfu-reopen svg { display: block; width: 26px; height: 26px; fill: var(--cfu-reopen-icon, #fff); color: var(--cfu-reopen-icon, #fff); }
.cfu-reopen svg path { fill: var(--cfu-reopen-icon, #fff); }
.cfu-reopen:hover { filter: brightness(.9); }
