/* Residual light-mode corrections found during the screenshot audit.
   This is presentation-only and deliberately limited to surfaces that still inherit dark literals
   from older component layers. */

html[data-rift-effective-theme='light'] {
  --rift-light-friends-side:#f8f9fa;
  --rift-light-avatar-cutout:#eef0f3;
}

/* Friends header tabs: active states should not become a dark-mode pill. */
html[data-rift-effective-theme='light'] .r021-home-title {
  color:var(--rift-light-text,#161a20) !important;
  border-color:#d2d7dd !important;
}
html[data-rift-effective-theme='light'] .r021-home-title svg {
  color:#4c5662 !important;
}
html[data-rift-effective-theme='light'] .r021-home-tab:not(.add) {
  background:transparent !important;
  color:#626c78 !important;
}
html[data-rift-effective-theme='light'] .r021-home-tab:not(.add):hover {
  background:#e7ebef !important;
  color:#20262d !important;
}
html[data-rift-effective-theme='light'] .r021-home-tab.active:not(.add) {
  background:#dfe4e9 !important;
  color:#171b21 !important;
  box-shadow:inset 0 0 0 1px #cfd5dc !important;
}

/* Friends / Active Now rail. The old desktop layer hard-coded #101216 here. */
html[data-rift-effective-theme='light'] .r021-friends-shell,
html[data-rift-effective-theme='light'] .r021-friends-main {
  background:#f5f6f8 !important;
  color:var(--rift-light-text,#161a20) !important;
}
html[data-rift-effective-theme='light'] .r021-friends-side {
  background:var(--rift-light-friends-side) !important;
  color:var(--rift-light-text,#161a20) !important;
  border-left-color:#d3d8de !important;
}
html[data-rift-effective-theme='light'] .r021-friends-side h3 {
  color:#20262d !important;
}
html[data-rift-effective-theme='light'] .r021-active-empty {
  color:#66717d !important;
}
html[data-rift-effective-theme='light'] .r021-active-empty strong {
  color:#2a313a !important;
}
html[data-rift-effective-theme='light'] .r021-active-card {
  background:#ffffff !important;
  color:#2e353e !important;
  border-color:#d3d8de !important;
  box-shadow:0 1px 3px rgba(31,36,43,.05) !important;
}
html[data-rift-effective-theme='light'] .r021-active-user span {
  color:#626c78 !important;
}

/* Add Friend is a full Friends view; none of its form surfaces should retain
   the dark literals from the original desktop stylesheet. */
html[data-rift-effective-theme='light'] .rift-add-friend-view {
  color:#171b21 !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-view > header h2,
html[data-rift-effective-theme='light'] .rift-add-friend-discover h3 {
  color:#171b21 !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-view > header p,
html[data-rift-effective-theme='light'] .rift-add-friend-discover p,
html[data-rift-effective-theme='light'] .rift-add-friend-note-copy,
html[data-rift-effective-theme='light'] .rift-add-friend-feedback,
html[data-rift-effective-theme='light'] .rift-add-friend-count {
  color:#64707c !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-request,
html[data-rift-effective-theme='light'] .rift-add-friend-note-wrap {
  background:#ffffff !important;
  border-color:#cbd2d9 !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-request input,
html[data-rift-effective-theme='light'] .rift-add-friend-note-wrap textarea {
  background:transparent !important;
  color:#171b21 !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-request input::placeholder,
html[data-rift-effective-theme='light'] .rift-add-friend-note-wrap textarea::placeholder {
  color:#747e89 !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-request button {
  background:var(--accent) !important;
  color:#ffffff !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-request button:disabled {
  background:color-mix(in srgb,var(--accent),#ffffff 58%) !important;
  color:#ffffff !important;
  opacity:.72 !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-discover {
  border-top-color:#cfd5dc !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-discover button {
  background:#ffffff !important;
  color:#222831 !important;
  border-color:#cbd2d9 !important;
  box-shadow:0 1px 3px rgba(31,36,43,.05) !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-discover button:hover {
  background:#e8ecf0 !important;
  border-color:#bcc4cd !important;
}
html[data-rift-effective-theme='light'] .rift-add-friend-discover button b {
  color:#596470 !important;
}

/* Conversation intro icon. This is the round @ block at the start of a DM. */
html[data-rift-effective-theme='light'] .channel-intro-icon {
  background:#e2e6ea !important;
  color:#3e4854 !important;
  border:1px solid #cfd5dc !important;
  box-shadow:none !important;
}
html[data-rift-effective-theme='light'] .channel-intro h2 {
  color:#171b21 !important;
}
html[data-rift-effective-theme='light'] .channel-intro p {
  color:#626c78 !important;
}

/* Presence cut-outs. Shared presence geometry uses --rift-presence-cutout, not only
   --status-cutout, so both variables need to follow the light surface. */
html[data-rift-effective-theme='light'] .ui0212-dm-avatar>.ui0212-presence,
html[data-rift-effective-theme='light'] .parity-dm-avatar>.parity-presence {
  --rift-presence-cutout:var(--rift-light-avatar-cutout) !important;
  --status-cutout:var(--rift-light-avatar-cutout) !important;
  border-color:var(--rift-light-avatar-cutout) !important;
}
html[data-rift-effective-theme='light'] .ui0212-dm-avatar>.ui0212-presence:is(.ui0212-offline,.ui0212-invisible,.offline,.invisible,.presence-offline,.presence-invisible),
html[data-rift-effective-theme='light'] .parity-dm-avatar>.parity-presence:is(.parity-offline,.parity-invisible,.offline,.invisible,.presence-offline,.presence-invisible) {
  background:var(--rift-light-avatar-cutout) !important;
  box-shadow:inset 0 0 0 2px #737d89 !important;
}
html[data-rift-effective-theme='light'] .member-avatar-wrap>.presence-dot,
html[data-rift-effective-theme='light'] .social-row .member-avatar-wrap>.presence-dot,
html[data-rift-effective-theme='light'] .dm-avatar-wrap>.dm-presence-dot {
  --rift-presence-cutout:#eceef1 !important;
  --status-cutout:#eceef1 !important;
  border-color:#eceef1 !important;
}
html[data-rift-effective-theme='light'] .ui0213-dm-head-avatar>.ui0213-head-presence {
  --rift-presence-cutout:#f5f6f8 !important;
  --status-cutout:#f5f6f8 !important;
  border-color:#f5f6f8 !important;
}
html[data-rift-effective-theme='light'] .current-user-panel>.self-presence-dot {
  --rift-presence-cutout:#e6e9ed !important;
  --status-cutout:#e6e9ed !important;
  border-color:#e6e9ed !important;
}
html[data-rift-effective-theme='light'] .current-user-panel>.self-presence-dot:is(.presence-offline,.presence-invisible,.offline,.invisible) {
  background:#e6e9ed !important;
  box-shadow:inset 0 0 0 2px #737d89 !important;
}
html[data-rift-effective-theme='light'] :is(.ui0212-self-avatar>.ui0212-presence,.parity-self-avatar>.parity-presence) {
  --rift-presence-cutout:#ffffff !important;
  --status-cutout:#ffffff !important;
  border-color:#ffffff !important;
}

/* Voice activity strip/cards. Older call UI left these nearly black in light mode. */
html[data-rift-effective-theme='light'] .ui0212-activity-strip {
  background:#eef0f3 !important;
  color:#20262d !important;
  border-top-color:#ccd2d9 !important;
}
html[data-rift-effective-theme='light'] .ui0212-activity-strip strong {
  color:#20262d !important;
}
html[data-rift-effective-theme='light'] .ui0212-activity-card {
  background:#ffffff !important;
  color:#4f5965 !important;
  border-color:#cbd1d8 !important;
  box-shadow:0 1px 3px rgba(31,36,43,.05) !important;
}
html[data-rift-effective-theme='light'] .r021-activity-tile {
  background:#ffffff !important;
  color:#303842 !important;
  border-color:#cbd1d8 !important;
}
html[data-rift-effective-theme='light'] .r021-activity-actions button {
  background:#e7ebef !important;
  color:#303842 !important;
  border-color:#cbd1d8 !important;
}

/* A few inherited dark fills adjacent to the audited screenshots. */
html[data-rift-effective-theme='light'] .r021-friend-search {
  background:#ffffff !important;
  color:#171b21 !important;
  border-color:#c8ced6 !important;
}
html[data-rift-effective-theme='light'] .r021-friend-search::placeholder {
  color:#7a838e !important;
}
html[data-rift-effective-theme='light'] .social-actions .small-button,
html[data-rift-effective-theme='light'] .social-actions .small-button.primary {
  background:#e5e9ed !important;
  color:#4b5561 !important;
}
html[data-rift-effective-theme='light'] .social-actions .small-button:hover:not(:disabled),
html[data-rift-effective-theme='light'] .social-actions .small-button.primary:hover:not(:disabled) {
  background:#d7dde3 !important;
  color:#171b21 !important;
}
