/* Formulário de demonstração (iframe do Rubeus): popup e versão inline */
html.rbs-demo-open { overflow: hidden; }
.rbs-demo { margin: auto; inset: 0; padding: 0; border: 0; background: transparent; width: min(46rem, 94vw); max-width: none; max-height: none; overflow: visible; }
.rbs-demo::backdrop { background: rgba(26,26,26,0.72); backdrop-filter: blur(3px); }
.rbs-demo[open] { animation: rbsDemoIn 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.rbs-demo__box { position: relative; display: flex; flex-direction: column; height: min(52rem, 92vh); border-radius: 1.25rem; background: #fff; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.35); }
.rbs-demo__close { position: absolute; top: 0.9rem; right: 0.9rem; z-index: 2; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0; border: 0; border-radius: 50%; background: var(--slate-100, #EDEDED); color: var(--gray-900, #1A1A1A); cursor: pointer; transition: background-color 0.2s; }
.rbs-demo__close:hover { background: var(--slate-200, #D4D4D4); }
.rbs-demo__close svg { width: 1.1rem; height: 1.1rem; }
.rbs-demo__intro { flex: 0 0 auto; padding: 1.75rem 4rem 0.5rem 1.75rem; }
.rbs-demo__title { margin: 0 0 0.5rem; font: 800 1.5rem/1.2 'Outfit', sans-serif !important; letter-spacing: -0.02em; color: var(--gray-900, #1A1A1A); }
.rbs-demo__text { margin: 0; max-width: 34rem; font-size: 0.9375rem; line-height: 1.55; color: var(--gray-700, #4D4D4D); }
.rbs-demo__body { position: relative; flex: 1 1 auto; min-height: 0; }
.rbs-demo__body .rbs-form__frame { position: absolute; inset: 0; }

.rbs-form__frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
[data-rbs-form] { position: relative; }
[data-rbs-form]:not(.rbs-demo__body) { min-height: 46rem; border-radius: 1.25rem; overflow: hidden; background: #fff; }
[data-rbs-form]:not(.rbs-demo__body) .rbs-form__frame { height: 46rem; }
[data-rbs-form].is-loading::before { content: ""; position: absolute; top: 50%; left: 50%; width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem; border: 3px solid var(--slate-100, #EDEDED); border-top-color: var(--teal, #0DA6A6); border-radius: 50%; animation: rbsDemoSpin 0.8s linear infinite; }
/* Esqueleto do formulário (aparece até o iframe do Rubeus terminar de carregar) */
.rbs-skel { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 1.15rem 1rem; padding: 1.5rem 1.75rem; background: #fff; pointer-events: none; }
.rbs-skel i { display: block; border-radius: 14px; background: linear-gradient(100deg, #F1F1F0 30%, #F8F8F7 50%, #F1F1F0 70%) 0 0 / 220% 100%; animation: rbsShimmer 1.4s linear infinite; }
.rbs-skel__bar { grid-column: 1 / -1; height: 5px; border-radius: 5px !important; margin-bottom: 0.9rem; }
.rbs-skel__f { height: 3.25rem; }
.rbs-skel__f--full { grid-column: 1 / -1; }
.rbs-skel__btn { grid-column: 1 / -1; height: 3.5rem; margin-top: 0.8rem; }
.rbs-demo__body.is-loading::before { display: none; }
@keyframes rbsShimmer { to { background-position: -220% 0; } }
@keyframes rbsDemoIn { from { opacity: 0; transform: translateY(12px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes rbsDemoSpin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .rbs-demo { width: 100vw; height: 100dvh; max-height: none; margin: 0; }
  .rbs-demo__box { height: 100dvh; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .rbs-skel i { animation: none; } .rbs-demo[open] { animation: none; } [data-rbs-form].is-loading::before { animation-duration: 2s; } }
