/* StreamGrid Profile Surface P1
 * Shared bounded appearance layer for the rooms inside a member profile.
 */
.sg-profile-page-surface {
  position: relative;
  isolation: isolate;
}

.sg-profile-page-surface--custom {
  overflow: hidden;
  background: transparent !important;
  border-color: color-mix(in srgb, var(--sg-page-surface-border-color, var(--box-border)) var(--sg-page-surface-border-opacity, 100%), transparent) !important;
  border-radius: var(--sg-page-surface-radius, var(--border-radius, 10px)) !important;
  box-shadow: var(--sg-page-surface-shadow, 0 16px 42px rgba(0,0,0,.34)) !important;
}

.sg-profile-page-surface--custom::before,
.sg-profile-page-surface--custom::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sg-profile-page-surface--custom::before {
  z-index: -2;
  inset: calc(var(--sg-page-surface-bg-blur, 0px) * -1.5);
  background-color: var(--sg-page-surface-bg-color, transparent);
  background-image:
    linear-gradient(
      color-mix(in srgb, var(--sg-page-surface-overlay, #000) var(--sg-page-surface-overlay-opacity, 0%), transparent),
      color-mix(in srgb, var(--sg-page-surface-overlay, #000) var(--sg-page-surface-overlay-opacity, 0%), transparent)
    ),
    var(--sg-page-surface-bg-image, none);
  background-size: auto, var(--sg-page-surface-bg-size, cover);
  background-repeat: no-repeat, var(--sg-page-surface-bg-repeat, no-repeat);
  background-position: center, var(--sg-page-surface-bg-position, 50% 50%);
  filter: blur(var(--sg-page-surface-bg-blur, 0px));
  transform: scale(1.015);
}

.sg-profile-page-surface--custom::after {
  z-index: -1;
  background: color-mix(in srgb, var(--sg-page-surface-panel-color, var(--section-bg)) var(--sg-page-surface-panel-opacity, 94%), transparent);
}

.sg-profile-page-surface--custom > * {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .sg-profile-page-surface--custom::before { transform: none; }
}

/* P1.1 — standard profile rooms.
 * Single-panel destinations can apply the surface directly to their content
 * panel. Home uses the canvas variant so one room image sits behind all Home
 * sections instead of repeating once per card.
 */
.sg-public-profile-panel.sg-profile-page-surface--custom {
  border: 1px solid color-mix(in srgb, var(--sg-page-surface-border-color, var(--box-border)) var(--sg-page-surface-border-opacity, 100%), transparent) !important;
}

.sg-public-profile-panel.sg-profile-page-surface--custom > .profile-section,
.sg-public-profile-panel.sg-profile-page-surface--custom > .profile-public-posts,
.sg-public-profile-panel.sg-profile-page-surface--custom > .profile-gallery {
  background: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.sg-profile-page-surface--canvas.sg-profile-page-surface--custom {
  overflow: hidden;
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--sg-page-surface-radius, var(--border-radius, 10px)) !important;
  box-shadow: none !important;
}

.sg-profile-page-surface--canvas.sg-profile-page-surface--custom::after {
  display: none;
}

.sg-profile-page-surface--canvas.sg-profile-page-surface--custom > .sg-public-profile-panel {
  overflow: hidden;
  background: color-mix(in srgb, var(--sg-page-surface-panel-color, var(--section-bg)) var(--sg-page-surface-panel-opacity, 94%), transparent) !important;
  border: 1px solid color-mix(in srgb, var(--sg-page-surface-border-color, var(--box-border)) var(--sg-page-surface-border-opacity, 100%), transparent) !important;
  border-radius: var(--sg-page-surface-radius, var(--border-radius, 10px)) !important;
  box-shadow: var(--sg-page-surface-shadow, 0 16px 42px rgba(0,0,0,.34)) !important;
  backdrop-filter: blur(var(--blur-strength, 14px)) saturate(112%);
}

.sg-profile-page-surface--canvas.sg-profile-page-surface--custom > .sg-public-profile-panel > .profile-section,
.sg-profile-page-surface--canvas.sg-profile-page-surface--custom > .sg-public-profile-panel > .profile-public-posts,
.sg-profile-page-surface--canvas.sg-profile-page-surface--custom > .sg-public-profile-panel > .profile-gallery {
  background: transparent !important;
  border: 0 !important;
  border-radius: inherit !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
