/* One painel — studio compacto + cabeçalho banco + tipografia */

.rgc-top--bank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 14px;
  min-height: 64px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: #fff;
  border-bottom: 1px solid #eee8e2;
}

.rgc-top--bank .rgc-topMain::before {
  display: none;
}

.rgc-top--bank .rgc-topTitle {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.rgc-top--bank .rgc-topMeta {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: #6b635c;
  gap: 0 8px;
}

.rgc-top--bank .rgc-topWallet {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  padding: 6px 6px 6px 12px;
  border-radius: 14px;
  background: #f7f5f3;
  border: 1px solid #ebe6e1;
}

.rgc-top--bank .rgc-topWalletSaldo {
  text-align: left;
  min-width: 0;
  gap: 0;
  padding-right: 4px;
}

.rgc-top--bank .rgc-topWalletLabel {
  font-size: 9px;
  font-weight: 700;
  color: #8a8178;
}

.rgc-top--bank .rgc-topWalletSaldo strong {
  font-size: 16px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.rgc-top--bank .rgc-topSaque {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 10px;
}

.rgc-iconBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #5c534c;
  cursor: pointer;
}

.rgc-iconBtn:hover {
  background: #efeae5;
  color: #1a1412;
}

.rgc-top--bank .rgc-planBadge {
  grid-column: 1 / -1;
  margin: 0;
  justify-self: start;
  max-width: 100%;
  font-size: 11px;
  padding: 4px 10px;
}

/* Domínio no final do Cartão — não compete com o editor */
#pane-cards .rgc-domainBanner {
  margin: 14px 0 0;
  order: 99;
}

#pane-cards .rgc-domainCard {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
}

/* Editor + prévia: formulário primeiro no mobile; prévia compacta */
.rgc-cardEditor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rgc-cardEditor > .rgc-previewHost {
  order: 0;
  position: sticky;
  top: 0;
  z-index: 6;
}

.rgc-cardEditor > .rgc-cardMain {
  order: 1;
  min-width: 0;
}

#pane-cards .rgc-cardEditor {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#pane-cards .rgc-editorHero {
  margin: 0 0 8px;
  gap: 8px;
}

#pane-cards .rgc-editorTitle {
  font-size: 18px;
}

#pane-cards .rgc-editorEyebrow,
#pane-cards .rgc-editorLead {
  display: none;
}

#pane-cards .rgc-adjustBlock {
  margin-top: 0;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(33, 25, 21, 0.06);
}

#pane-cards .rgc-editorTabs {
  padding: 8px 8px 0;
  background: #fff;
}

#pane-cards .rgc-editorTab {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

#pane-cards .rgc-editorPane {
  padding: 12px 14px 8px;
}

#pane-cards .rgc-adjustTitle {
  font-size: 15px;
  margin-bottom: 8px;
}

#pane-cards .rgc-previewHost {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  background: #f6f3f0;
  border: 1px solid #e6ddd6;
  box-shadow: none;
}

#pane-cards .rgc-previewLeadRow {
  grid-column: 1;
  margin: 0;
  min-width: 0;
}

#pane-cards .rgc-previewLead {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #3d2a1f;
}

#pane-cards .rgc-previewBrand {
  font-weight: 600;
  color: #6b635c;
}

#pane-cards .rgc-previewOpen {
  font-size: 11px;
  padding: 5px 10px;
  background: #ff6a00;
  border-color: #ff6a00;
  color: #fff;
  border-radius: 999px;
}

.rgc-previewScreenTabs {
  grid-column: 1;
  display: flex;
  gap: 4px;
  margin: 0;
}

.rgc-previewScreenTab {
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid #e0d6ce;
  border-radius: 999px;
  background: #fff;
  color: #5c534c;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.rgc-previewScreenTab.is-active {
  background: #ff6a00;
  border-color: #ff6a00;
  color: #fff;
}

#pane-cards .rgc-previews {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: block !important;
  margin: 0;
  padding: 0 !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
  gap: 0 !important;
  align-self: center;
}

#pane-cards .rgc-previewPane {
  display: none;
  flex: none !important;
  width: auto !important;
}

#pane-cards .rgc-previewPane.is-active {
  display: block;
}

#pane-cards .rgc-previewFrame {
  width: 88px !important;
  height: 190px !important;
  margin: 0;
  aspect-ratio: auto !important;
  border-radius: 14px;
  border: 1px solid #d9cfc7;
  background: #fff;
  box-shadow: 0 8px 20px rgba(61, 42, 31, 0.1);
  overflow: hidden;
}

#pane-cards .rgc-previewIframe {
  width: 430px !important;
  height: 932px !important;
  transform: scale(calc(88 / 430)) !important;
  transform-origin: top left;
}

#pane-cards .rgc-previewLabel {
  display: none;
}

.rgc-checklist--compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.rgc-checklist--compact ol {
  display: none;
}

.rgc-fontPicker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rgc-fontChoice {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 8px;
  border: 1.5px solid #e4c9b6;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.rgc-fontChoice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rgc-fontChoice__sample {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #1a1412;
  color: #f7ebe2;
  font-family: var(--font-sample-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
}

.rgc-fontChoice__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rgc-fontChoice__meta strong {
  font-size: 13px;
  font-weight: 800;
  color: #1a1412;
}

.rgc-fontChoice__meta small {
  font-size: 11px;
  color: #6b5b53;
  font-family: var(--font-sample-body);
}

.rgc-fontChoice.is-on,
.rgc-fontChoice:has(input:checked) {
  border-color: #ff6a00;
  box-shadow: 0 0 0 2px rgba(255, 106, 0, 0.18);
}

/* Lado a lado: editar à esquerda, prévia à direita */
@media (min-width: 480px) {
  .rgc-cardEditor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 12px;
    align-items: start;
  }

  .rgc-cardEditor > .rgc-previewHost {
    order: initial;
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 8px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: calc(100vh - 88px);
    overflow: auto;
    padding: 12px;
  }

  .rgc-cardEditor > .rgc-cardMain {
    order: initial;
    grid-column: 1;
  }

  #pane-cards .rgc-previewLeadRow,
  #pane-cards .rgc-previewScreenTabs,
  #pane-cards .rgc-previews {
    grid-column: auto;
    grid-row: auto;
  }

  #pane-cards .rgc-previews {
    align-self: stretch;
  }

  #pane-cards .rgc-previewFrame {
    width: 120px !important;
    height: 260px !important;
    margin: 0 auto;
  }

  #pane-cards .rgc-previewIframe {
    transform: scale(calc(120 / 430)) !important;
  }
}

@media (min-width: 720px) {
  .rgc-cardEditor {
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 14px;
  }

  #pane-cards .rgc-previewFrame {
    width: 148px !important;
    height: 320px !important;
  }

  #pane-cards .rgc-previewIframe {
    transform: scale(calc(148 / 430)) !important;
  }

  .rgc-fontPicker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .rgc-cardEditor {
    grid-template-columns: minmax(0, 1fr) 188px;
  }

  #pane-cards .rgc-previewFrame {
    width: 168px !important;
    height: 364px !important;
  }

  #pane-cards .rgc-previewIframe {
    transform: scale(calc(168 / 430)) !important;
  }
}
.rgc-storeBuilder { display: grid; gap: 15px; }
.rgc-storeBuilder h2, .rgc-storeBuilder h3 { margin: 0; }
.rgc-storeBuilder .rgc-muted { max-width: 72ch; }
#store-products { display: grid; gap: 14px; }
.rgc-storeProduct { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 16px; border: 1px solid #f0dfd5; border-radius: 14px; background: #fffaf6; }
.rgc-storeProduct label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 700; }
.rgc-storeProduct input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid #dbcac0; border-radius: 8px; }
.rgc-storeProduct [data-store-remove] { justify-self: start; }
.rgc-storeShare { display: grid; justify-items: start; gap: 8px; padding: 16px; border-radius: 14px; background: #fff0e7; overflow-wrap: anywhere; }
.rgc-storeShare a { color: #ad3a09; }
@media (max-width: 600px) { .rgc-storeProduct { grid-template-columns: 1fr; } }
