/**
 * Circle Settings — scroll + layout inside Circles shell.
 */

body.circle-settings-page .footer,
body.circle-settings-page .footer--slim,
body.circle-settings-active .footer {
  display: none !important;
}

#circle-settings-mount {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  background: var(--navy, #0a1628);
}

#circle-settings-mount .sf-circle-settings {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}

.sf-page--circle-settings {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-width: none !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}

body.circle-settings-page .circles-main,
body.circle-settings-active .circles-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 767px) {
  body.circle-settings-page,
  body.circle-settings-active {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
  }

  html.has-mobile-bottom-nav body.circle-settings-page .app-main,
  html.has-mobile-bottom-nav body.circle-settings-active .app-main,
  body.circle-settings-page .app-main,
  body.circle-settings-active .app-main {
    overflow: hidden !important;
    min-height: 0;
    flex: 1 1 auto;
    max-height: 100dvh;
  }

  #circle-settings-mount .sf-circle-settings {
    padding-bottom: calc(28px + var(--mobile-bottom-dock-h, 50px) + env(safe-area-inset-bottom, 0px));
  }
}

#circle-settings-mount .sf-circle-settings-photo {
  flex-wrap: wrap;
}

#circle-settings-mount .sf-circle-settings-avatar-label {
  display: inline-block;
  cursor: pointer;
  border-radius: 50%;
}

#circle-settings-mount .sf-circle-settings-photo-hint {
  margin: 0;
  width: 100%;
  font-size: 11px;
  color: rgba(160, 174, 192, 0.85);
}

/* Desktop: settings uses 2 columns (inbox + form), not cramped 3-column chat layout */
@media (min-width: 1024px) {
  body.circles-settings-shell-active.circles-has-active .circles-app {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  body.circles-settings-shell-active .circles-main.circles-panel-card {
    border-right: none;
  }

  body.circles-settings-shell-active #circle-settings-mount .sf-circle-settings {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 32px 40px;
  }
}
