.fbanner {
  position: fixed;
  z-index: 1040;
  box-sizing: border-box;
  width: calc(100% - 30px);
  max-width: var(--fb-maxw, 320px);
  background: var(--fb-bg, #111);
  color: var(--fb-color, #fff);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.fbanner[hidden] { display: none; }
.fbanner.is-visible { opacity: 1; transform: none; pointer-events: auto; }

.fbanner--bottom-right { right: 15px; bottom: var(--fb-off, 15px); }
.fbanner--bottom-left  { left: 15px;  bottom: var(--fb-off, 15px); }
.fbanner--top-right    { right: 15px; top: var(--fb-off, 15px); transform: translateY(-12px); }
.fbanner--top-left     { left: 15px;  top: var(--fb-off, 15px); transform: translateY(-12px); }

/* ---- Desplegado ---- */
.fbanner__body {
  position: relative;
  padding: 12px 34px 12px 14px;
  animation: fbanner-in .25s ease;
}
.fbanner__tab { display: none; }

/* ---- Plegado (pestaña) ---- */
.fbanner.is-collapsed {
  width: auto;
  max-width: calc(100% - 30px);
  border-radius: 999px;
}
.fbanner.is-collapsed .fbanner__body { display: none; }
.fbanner.is-collapsed .fbanner__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  animation: fbanner-in .25s ease;
}
.fbanner__tablabel { overflow: hidden; text-overflow: ellipsis; }
.fbanner__dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fb-link, currentColor);
  animation: fbanner-pulse 2s ease-in-out infinite;
}
.fbanner__chev {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(2px) rotate(45deg);
  opacity: .8;
}
.fbanner--top-right .fbanner__chev,
.fbanner--top-left .fbanner__chev { transform: translateY(-2px) rotate(225deg); }

/* ---- Contenido ---- */
.fbanner__text,
.fbanner__text p,
.fbanner__text span,
.fbanner__text strong,
.fbanner__text em { color: inherit; font-size: inherit; }
.fbanner__text p { margin: 0; }
.fbanner__text p + p { margin-top: 4px; }

.fbanner .fbanner__text a,
.fbanner .fbanner__text a:visited {
  color: var(--fb-link, inherit);
  text-decoration: underline;
  font-weight: 600;
}
.fbanner .fbanner__text a:hover,
.fbanner .fbanner__text a:focus { color: var(--fb-link, inherit); opacity: .85; }

.fbanner__close {
  position: absolute;
  top: 4px;
  right: 6px;
  padding: 2px 6px;
  border: 0;
  background: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
}
.fbanner__close:hover,
.fbanner__close:focus { opacity: 1; }

.fbanner__body { padding-bottom: 30px; }
.fbanner__hide {
  position: absolute;
  right: 10px;
  bottom: 6px;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  text-decoration: underline;
  cursor: pointer;
  opacity: .65;
}
.fbanner__hide:hover,
.fbanner__hide:focus { opacity: 1; }

@keyframes fbanner-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fbanner-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

@media (max-width: 575px) {
  .fbanner { font-size: 13px; }
  .fbanner__body { padding: 10px 32px 28px 12px; }
  .fbanner--nomobile { display: none !important; }
  .fbanner--bottom-right  { left: 15px;  bottom: var(--fb-off, 15px); right:initial;}
}

@media (prefers-reduced-motion: reduce) {
  .fbanner, .fbanner__body, .fbanner__tab { transition: none; animation: none; }
  .fbanner__dot { animation: none; }
}
