/* Responsive layout refinements: compact phones, tablets and short viewports. */
body.dropos-workspace :is(.app, .main, .container, .view, .field, .row2 > *, .pg-fields > *) { min-width: 0; }
body.dropos-workspace :is(.table-wrap, .tbl) {
  max-width: 100%; overscroll-behavior-inline: contain;
  scrollbar-width: thin; scrollbar-color: #714253 #171a22;
}
body.dropos-workspace :is(.modal, .ms-modal, #rcPixModal) { min-width: 0; }
body.dropos-workspace :is(.modal, .ms-modal, #rcPixModal) :is(input, select, textarea, .field) { min-width: 0; max-width: 100%; }
body.dropos-workspace :is(.modal, .ms-modal, #rcPixModal) :is(p, small, label, .hint) { overflow-wrap: anywhere; }
body.dropos-workspace :is(.side-nav, #nav) { scroll-padding-block: 12px; }
@media (max-width: 1180px) {
  body.dropos-workspace #prodModal #pmPreviewToggle { position: static; margin: 0 0 14px; min-height: 44px; }
  body.dropos-workspace #prodModal #pmPreviewCol { position: static; width: 100%; max-width: 400px; margin: 0 auto 18px; }
  body.dropos-workspace #prodModal .pm-phone { width: 100%; max-width: 400px; height: min(640px, 70dvh); min-height: 260px; }
}
@media (max-width: 1024px) {
  /* Explicit columns prevent a lonely search button or overlapping header actions. */
  body.dropos-workspace .main-top {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    align-items: center; gap: 8px; padding: 16px 18px; min-height: 86px;
  }
  body.dropos-workspace .main-top #hambBtn { grid-area: 1 / 1; }
  body.dropos-workspace .main-top > div:first-of-type { grid-area: 1 / 2; min-width: 0; }
  body.dropos-workspace .main-top #btnAtualizar { grid-area: 1 / 3; margin: 0 !important; }
  body.dropos-workspace .main-top #cfgSearchBtn { grid-area: 1 / 4; margin: 0 !important; }
  body.dropos-workspace .main-top #vivoSelo { grid-area: 2 / 2 / 3 / 5; justify-self: start; padding: 4px 9px; }
  body.dropos-workspace .main-top #vivoTxt { display: inline; }
  body.dropos-workspace #pageTitle { font-size: clamp(18px, 2.8vw, 24px); overflow-wrap: anywhere; }
  body.dropos-workspace #pageSub { line-height: 1.45; overflow-wrap: anywhere; }
  body.dropos-workspace :is(.hamb, #btnAtualizar, #cfgSearchBtn, .dw-nav-close, .modal-close) { width: 44px; height: 44px; min-width: 44px; min-height: 44px; }
  body.dropos-workspace :is(.side-nav .tab-btn, #nav > button) { height: 44px !important; min-height: 44px !important; }
  body.dropos-workspace :is(input, select, textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]) { font-size: 16px !important; }
  body.dropos-workspace[data-panel=merchant] #storeView .cfg-shell,
  body.dropos-workspace[data-panel=merchant] #pxLista { grid-template-columns: minmax(0, 1fr); }
  body.dropos-workspace[data-panel=merchant] #storeView .cfg-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  body.dropos-workspace[data-panel=merchant] #storeView .cfg-navi { flex: 1 1 140px; padding: 10px; min-height: 44px; }
  body.dropos-workspace[data-panel=merchant] #storeView .cfg-navi i { display: none; }
  body.dropos-workspace[data-panel=merchant] #pxLista .pl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  body.dropos-workspace[data-panel=merchant] #pxLista .pl-row { min-width: 0; margin: 0; transform: none !important; }
  body.dropos-workspace[data-panel=platform] #v-pagamentos .pg-layout { grid-template-columns: minmax(0, 1fr); }
  body.dropos-workspace[data-panel=platform] #v-pagamentos .pg-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.dropos-workspace[data-panel=platform] .view .grid2 { grid-template-columns: minmax(0, 1fr); }
  body.dropos-workspace[data-panel=platform] #pgGateways { max-height: 340px; overflow: auto; }
}
@media (max-width: 600px) {
  body.dropos-workspace .main-top { padding: 12px; }
  body.dropos-workspace .container { padding-inline: 12px; }
  body.dropos-workspace #pageSub { font-size: 11px; }
  body.dropos-workspace #meSub { gap: 4px; }
  body.dropos-workspace #meSub button { min-width: 0; min-height: 44px; padding: 8px; white-space: normal; }
  body.dropos-workspace[data-panel=merchant] [id$=View] > .panel:not(.table-wrap):not(.push-card) { padding: 16px !important; }
  body.dropos-workspace[data-panel=merchant] #pxLista .pl-list,
  body.dropos-workspace[data-panel=platform] #v-pagamentos .pg-list { grid-template-columns: minmax(0, 1fr); }
  body.dropos-workspace[data-panel=merchant] #storeView .cfg-navi { flex-basis: calc(50% - 6px); }
  body.dropos-workspace[data-panel=merchant] :is(#presellsView .lk-main, #presellsView .lk-side, #configView .cfg-hero) { padding: 16px; }
  body.dropos-workspace[data-panel] :is(.toolbar, .row, .pg-actions, .cfg-savebar) { max-width: 100%; }
  body.dropos-workspace[data-panel] :is(.btn, .btn-primary, .btn-atualizar, .rc-act) { min-height: 44px; white-space: normal; }
  body.dropos-workspace[data-panel=merchant] #ordersBody :is(.status-select, .details-btn) { min-height: 44px; }
  body.dropos-workspace :is(.modal-bg, .ms-modal-bg) { padding: 12px; }
  body.dropos-workspace .modal { padding: 18px; margin-block: 0; }
  body.dropos-workspace #prodModal .row2 { grid-template-columns: minmax(0, 1fr); }
  body.dropos-workspace #prodModal .pm-tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: thin; }
  body.dropos-workspace #prodModal .pm-tab { flex: 0 0 auto; min-height: 44px; white-space: nowrap !important; }
  body.dropos-workspace #prodModal :is(button, .btn) { white-space: normal; }
  body.dropos-workspace .ms-modal-bg { overflow-y: auto; }
  body.dropos-workspace[data-panel=platform] .view > .top > .row { max-width: 100%; }
  body.dropos-workspace[data-panel=platform] .view > .top h1 { font-size: clamp(21px, 6vw, 25px); overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
  body.dropos-workspace[data-panel=merchant] #overviewContent .vg-kpis { grid-template-columns: minmax(0, 1fr) !important; }
  body.dropos-workspace[data-panel=merchant] #overviewContent .vg-kpi .k-val { white-space: normal; overflow-wrap: anywhere; font-size: 28px; }
  body.dropos-workspace[data-panel=merchant] #overviewContent .vg-kpi { padding: 16px !important; }
  body.dropos-workspace[data-panel=merchant] #ordResumo.resumo,
  body.dropos-workspace[data-panel=platform] .view .grid4 { grid-template-columns: minmax(0, 1fr); }
  body.dropos-workspace[data-panel=platform] .view .kpi { min-height: 110px; }
  body.dropos-workspace[data-panel=merchant] #overviewContent :is(.vg-tx, .vg-rank) { flex-wrap: wrap; }
  body.dropos-workspace[data-panel=merchant] #overviewContent .vg-rank .r-nome { white-space: normal; }
}
/* Keep a usable scrolling menu on phones in landscape and when browser UI takes height. */
@media (max-height: 600px) {
  body.dropos-workspace :is(.side-brand, #side > .brand) { min-height: 60px; padding: 10px 16px; }
  body.dropos-workspace .ms-switch { margin: 0 12px 8px; }
  body.dropos-workspace .ms-cap { display: none; }
  body.dropos-workspace :is(.side-foot, #side > .me) { padding: 8px 12px; }
  body.dropos-workspace .side-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  body.dropos-workspace .side-foot #spGreet { grid-column: 1 / -1; margin: 0 !important; }
  body.dropos-workspace .side-foot .store-pill { display: none; }
  body.dropos-workspace .side-foot :is(#btnPainelAdmin, #btnLogout) { width: 100%; margin: 0 !important; min-height: 40px; }
  body.dropos-workspace #side > #btnMinhaLoja { margin: 6px 12px 0 !important; min-height: 36px; padding: 6px 10px; }
  body.dropos-workspace #side > .me { margin-top: 6px !important; }
  body.dropos-workspace :is(.modal-bg, .ms-modal-bg) { padding-block: 8px; }
  body.dropos-workspace #rcPixModal { max-height: calc(100dvh - 16px); }
}
/* Notification settings and previews stay usable on narrow screens and short viewports. */
body.dropos-workspace :is(.push-option-copy,.push-row>span,.pp-opt>span,.pp-prev>div){min-width:0;overflow-wrap:anywhere}
body.dropos-workspace :is(.push-options,.pp-opts){grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
body.dropos-workspace :is(.push-actions,.pp-top){flex-wrap:wrap}
@media(max-width:700px){
 body.dropos-workspace :is(.push-actions button,#pPushCard button){min-height:44px;max-width:100%;white-space:normal}
 body.dropos-workspace :is(.push-actions,#pPushCard>.row){display:flex;flex-wrap:wrap}
 body.dropos-workspace :is(.push-actions,#pPushCard>.row)>button{flex:1 1 160px}
 body.dropos-workspace :is(.push-option,.pp-opt){gap:12px;align-items:flex-start}
 body.dropos-workspace :is(.push-toggle,.pp-tg){flex-shrink:0}
 body.dropos-workspace .cfg-pal{max-height:calc(100dvh - 32px)}
 body.dropos-workspace :is(.cfg-pal-list,.push-history){overscroll-behavior:contain}
}
