/*
 * Omni 0.2.44 - liquid glass on the conversation lower toolbar.
 * The user-selected photo and color remain exclusive to Mini Central.
 * The editor crop reflects the actual Mini Central proportions.
 */

/* Independent frosted glass for text chat and voice controls.
   This does not reuse --nexo-bottom-image. */
#appShell .chat-column > .composer-wrap,
#appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  background:
    radial-gradient(ellipse 56% 190% at 6% -95%,rgba(250,255,253,.19),transparent 78%),
    linear-gradient(112deg,rgba(153,183,177,.20),rgba(62,78,80,.31) 52%,rgba(30,39,45,.39)) !important;
  border-top:1px solid rgba(229,250,242,.30) !important;
  border-left:1px solid rgba(229,250,242,.15) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 -8px 23px rgba(0,0,0,.10) !important;
  backdrop-filter:blur(28px) saturate(118%);
  -webkit-backdrop-filter:blur(28px) saturate(118%);
}
#appShell .chat-column > .composer-wrap .composer {
  background:
    radial-gradient(ellipse 64% 300% at 14% -115%,rgba(255,255,255,.15),transparent 85%),
    linear-gradient(110deg,rgba(189,220,211,.12),rgba(50,64,69,.20)) !important;
  border:1px solid rgba(234,251,246,.32) !important;
  border-radius:13px;
  box-shadow:inset 0 1px rgba(255,255,255,.15),0 6px 20px rgba(0,0,0,.10);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
#appShell .chat-column > .composer-wrap .composer:focus-within {
  border-color:rgba(222,255,240,.59) !important;
  box-shadow:inset 0 1px rgba(255,255,255,.19),0 0 0 1px rgba(191,233,213,.17);
}

/* Match the transparency already selected in Settings > Personalização,
   including the user's wallpaper. Never paint a solid color over it. */
html[data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap,
html[data-nexo-personalized="1"] #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  background:var(--nexo-surface-bg,rgba(30,43,46,.30)) !important;
  backdrop-filter:blur(28px) saturate(115%);
  -webkit-backdrop-filter:blur(28px) saturate(115%);
}
html[data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap .composer {
  background:color-mix(in srgb,var(--nexo-surface-bg,rgba(37,54,58,.27)) 68%,transparent) !important;
  border-color:rgba(233,252,246,.35) !important;
}

/* The original user's image belongs ONLY to the miniature profile card.
   Background remains 'cover', with a single crop and no stretching. */
#appShell .user-panel.mini-central {
  background-size:cover !important;
  background-position:center center !important;
  background-repeat:no-repeat !important;
}

/* Preview displays the EXACT same aspect ratio as the live Mini Central. */
#profileEditorDialog .mini-central-preview {
  box-sizing:border-box;
  width:min(100%,var(--nexo-mini-width,313px));
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:var(--nexo-mini-aspect,3.56);
  background-size:cover !important;
  background-position:center center !important;
}

/* New Mini Central crop editor is independent from the former panoramic
   bar crop. The rectangle fits fully inside the visible canvas. */
#imageCropDialog.is-mini-central-crop {
  width:min(965px,calc(100vw - 28px));
}
#imageCropDialog.is-mini-central-crop #imageCropCanvas {
  border:1px solid rgba(177,228,209,.43);
  background:#162022;
}

/* A stored legacy preference to extend the picture must not override the
   frosted composer, should an outdated client retain that class briefly. */
#appShell.nexo-bottom-extended .chat-column > .composer-wrap,
#appShell.nexo-bottom-extended .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  background-image:none !important;
}

/* Reduce bright edges when light mode is chosen without affecting layout. */
html[data-nexo-theme="light"] #appShell .chat-column > .composer-wrap,
html[data-nexo-theme="light"] #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  color:#274a4f;
  border-top-color:rgba(97,149,137,.32) !important;
  background:linear-gradient(107deg,rgba(255,255,255,.37),rgba(211,235,228,.27)) !important;
}
html[data-nexo-theme="light"][data-nexo-personalized="1"] #appShell .chat-column > .composer-wrap,
html[data-nexo-theme="light"][data-nexo-personalized="1"] #appShell .chat-column #voiceStage:not([hidden]) > .voice-stage-controls {
  background:var(--nexo-surface-bg,rgba(240,250,247,.35)) !important;
}
