/* Hide relocated feature settings from normal user settings. They are opened from their own pages now. */
body.settings-page:not(.entity-settings-embed) #shop-settings,
body.settings-page:not(.entity-settings-embed) #blog-settings,
body.settings-page:not(.entity-settings-embed) #calendar-settings,
body.settings-page:not(.entity-settings-embed) #page-settings {
  display: none !important;
}

.entity-settings-modal.hidden { display: none !important; }
.entity-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 260000;
  display: grid;
  place-items: center;
  padding: 18px;
}
.entity-settings-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(8px);
}
.entity-settings-modal-panel {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100vw - 24px));
  height: min(860px, calc(100dvh - 24px));
  background: #fff;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 36px 100px rgba(15, 23, 42, .34);
}
.entity-settings-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .24);
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.entity-settings-modal-head h2 { margin: 2px 0 4px; color: #0f172a; }
.entity-settings-modal-head p { margin: 0; color: #64748b; font-weight: 650; }
.entity-settings-modal-head button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #0f172a;
  font-size: 26px;
  cursor: pointer;
}
.entity-settings-frame { width: 100%; flex: 1; border: 0; background: #f8fafc; }
.entity-settings-modal-open { overflow: hidden !important; }

body.entity-settings-embed {
  background: #f8fafc !important;
}
body.entity-settings-embed .topbar,
body.entity-settings-embed .left-sidebar,
body.entity-settings-embed .right-sidebar,
body.entity-settings-embed .footer-bar,
body.entity-settings-embed .wallpaper-floating-btn,
body.entity-settings-embed .mobile-footer-nav,
body.entity-settings-embed .mobile-drawer-menu,
body.entity-settings-embed .announcement-marquee {
  display: none !important;
}
body.entity-settings-embed .app-shell,
body.entity-settings-embed .layout-grid {
  display: block !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.entity-settings-embed .main-content {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 14px !important;
  margin: 0 !important;
}
body.entity-settings-embed .main-content > .card,
body.entity-settings-embed #profile-settings,
body.entity-settings-embed #stories-settings,
body.entity-settings-embed #wallpaper-settings,
body.entity-settings-embed #video-channel-settings,
body.entity-settings-embed #gift-settings,
body.entity-settings-embed #poll-settings,
body.entity-settings-embed #mobile-drawer-admin {
  display: none !important;
}
body.entity-settings-embed.entity-panel-shop #shop-settings,
body.entity-settings-embed.entity-panel-blog #blog-settings,
body.entity-settings-embed.entity-panel-calendar #calendar-settings,
body.entity-settings-embed.entity-panel-page #page-settings {
  display: block !important;
  margin: 0 !important;
  box-shadow: none !important;
}
body.entity-settings-embed.entity-panel-shop #shop-settings ~ *,
body.entity-settings-embed.entity-panel-blog #blog-settings ~ *,
body.entity-settings-embed.entity-panel-calendar #calendar-settings ~ *,
body.entity-settings-embed.entity-panel-page #page-settings ~ * { }
body.entity-settings-embed .settings-header,
body.entity-settings-embed .settings-nav,
body.entity-settings-embed .settings-tabs { display:none!important; }

body.business-page.entity-settings-embed .topbar,
body.business-page.entity-settings-embed .left-sidebar,
body.business-page.entity-settings-embed .right-sidebar,
body.business-page.entity-settings-embed .footer-bar,
body.business-page.entity-settings-embed .wallpaper-floating-btn,
body.business-page.entity-settings-embed .mobile-footer-nav { display:none!important; }
body.business-page.entity-settings-embed .app-shell,
body.business-page.entity-settings-embed .layout-grid { display:block!important; padding:0!important; margin:0!important; }
body.business-page.entity-settings-embed .main-content { width:100%!important; max-width:none!important; padding:12px!important; margin:0!important; }

@media (max-width: 720px) {
  .entity-settings-modal { padding: 0; }
  .entity-settings-modal-panel { width: 100%; height: 100dvh; border-radius: 0; }
  .entity-settings-modal-head { padding: 14px 16px 10px; }
}
