/*
 * DOMINANTS.CO LIVE — visual polish v2
 * Loaded after wide-layout-live-v1.css on the LIVE vhost only.
 */

:root {
  --dom-wide-max: 1800px;
  --dom-wide-gutter: clamp(14px, 1.8vw, 30px);
}

/* Give the modern app a deliberate 96% canvas on large screens. */
body:has([data-testid="itemFeed"], [data-testid="blockStatusComposer"], [data-testid="itemViewItemUser"], [data-testid*="Story"], [data-testid*="story"]) [data-testid="container.main"] {
  width: min(96vw, var(--dom-wide-max)) !important;
  max-width: var(--dom-wide-max) !important;
  padding-inline: var(--dom-wide-gutter) !important;
}

body:has([data-testid="itemFeed"], [data-testid="blockStatusComposer"], [data-testid="itemViewItemUser"], [data-testid*="Story"], [data-testid*="story"]) [data-testid="container.main"] > * {
  min-width: 0 !important;
  max-width: none !important;
}

/* Profile pages: let the hero, identity row and content share one strong edge. */
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"],
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] {
  min-width: 0 !important;
}

body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"] {
  width: 100% !important;
  max-width: none !important;
}

body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] {
  flex: 0 1 clamp(280px, 19vw, 350px) !important;
  width: auto !important;
  max-width: 350px !important;
}

body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"] > div,
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] > div {
  max-width: none !important;
}

/* Better proportion between the cover/identity block and the feed below it. */
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"] > div:first-child {
  margin-bottom: clamp(18px, 2vw, 30px) !important;
}

body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"] h1,
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotMain"] h2 {
  color: #f3ead2 !important;
  letter-spacing: .035em !important;
}

/* Unified premium surfaces: quiet borders, warmer text, no heavy boxed-in look. */
body:has([data-testid="itemViewItemUser"]) [data-testid="blockContent"],
body:has([data-testid="itemViewItemUser"]) [data-testid="blockStatusComposer"],
body:has([data-testid="itemViewItemUser"]) [data-testid="itemViewItemFeed"] {
  border-color: rgba(255, 255, 255, .09) !important;
  border-radius: 12px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 14px 38px -28px rgba(0, 0, 0, .95) !important;
}

body:has([data-testid="itemViewItemUser"]) [data-testid="blockContent"]:hover,
body:has([data-testid="itemViewItemUser"]) [data-testid="itemViewItemFeed"]:hover {
  border-color: rgba(212, 175, 55, .22) !important;
}

/* Keep the right rail useful instead of letting cards collapse into a thin strip. */
body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] [data-testid="blockContent"] {
  min-width: 0 !important;
  padding-inline: clamp(16px, 1.5vw, 24px) !important;
}

/* Feed media should breathe inside the new wide canvas. */
body:has([data-testid="itemViewItemUser"]) [data-testid="itemViewItemFeed"] img,
body:has([data-testid="itemViewItemUser"]) [data-testid="itemViewItemFeed"] video {
  max-width: 100% !important;
  height: auto !important;
}

@media (max-width: 1100px) {
  body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] {
    flex-basis: 290px !important;
    max-width: 290px !important;
  }
}

@media (max-width: 860px) {
  body:has([data-testid="itemViewItemUser"]) [data-testid="container.main"] {
    width: 100% !important;
    padding-inline: 12px !important;
  }

  body:has([data-testid="itemViewItemUser"]) [data-testid="layoutSlotSide"] {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
  }
}

@media (max-width: 520px) {
  body:has([data-testid="itemViewItemUser"]) [data-testid="container.main"] {
    padding-inline: 8px !important;
  }

  body:has([data-testid="itemViewItemUser"]) [data-testid="blockContent"],
  body:has([data-testid="itemViewItemUser"]) [data-testid="blockStatusComposer"],
  body:has([data-testid="itemViewItemUser"]) [data-testid="itemViewItemFeed"] {
    border-radius: 9px !important;
  }
}
