/* pass107-message-edit-composer-callbar */
.composer-edit-banner {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    margin: 0 0 6px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.25);
    background: rgba(37, 99, 235, 0.08);
    color: var(--text-primary, #0f172a);
    font-size: 0.82rem;
    font-weight: 700;
}

.composer-edit-banner[hidden] {
    display: none !important;
}

.composer-edit-banner span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.composer-edit-banner button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.message-edited-label {
    opacity: 0.74;
    font-size: 0.72rem;
    font-weight: 700;
}

.message-composer .send-button[hidden],
.message-composer #voiceNoteButton[hidden] {
    display: none !important;
}

.message-composer.has-composer-text #voiceNoteButton,
.message-composer.is-editing-message #voiceNoteButton {
    display: none !important;
}

.message-composer:not(.has-composer-text):not(.is-editing-message) .send-button {
    display: none !important;
}

html[data-stellar-theme^="terminal-"] .composer-edit-banner,
body[data-stellar-theme^="terminal-"] .composer-edit-banner,
html[data-stellar-theme^="terminal-"] .composer-edit-banner button,
body[data-stellar-theme^="terminal-"] .composer-edit-banner button {
    border-radius: 0 !important;
    background: var(--terminal-bg, #000) !important;
    color: var(--terminal-fg, #00ff66) !important;
    border-color: var(--terminal-border, #00ff66) !important;
    box-shadow: none !important;
    font-family: "Courier New", "Liberation Mono", monospace !important;
}

html[data-stellar-theme^="terminal-"] .message-edited-label,
body[data-stellar-theme^="terminal-"] .message-edited-label {
    color: var(--terminal-fg, #00ff66) !important;
    opacity: 0.86 !important;
}

/* Stable minimized call bar: use normal app flow, not fake top padding/height games. */
body.has-minimized-call {
    --ongoing-call-bar-height: 0px !important;
}

body.has-minimized-call #appShell {
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    padding-top: 0 !important;
    overflow: hidden !important;
}

body.has-minimized-call #appShell > #ongoingCallBar.ongoing-call-bar,
body.has-minimized-call #appShell > .ongoing-call-bar.is-integrated {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    inset: auto !important;
    z-index: 120 !important;
    width: auto !important;
    min-height: 42px !important;
    flex: 0 0 auto !important;
    margin: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)) !important;
    transform: none !important;
}

body.has-minimized-call #appShell > .app-screen.is-active {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    padding-top: 8px !important;
}

body.has-minimized-call:not(.call-overlay-restored) #appShell > .app-screen,
body.has-minimized-call:not(.call-overlay-restored) .app-screen.is-active,
body.has-minimized-call #chatThreadView.chat-thread {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

body.has-minimized-call .chat-media-viewer,
body.has-minimized-call .media-viewer,
body.has-minimized-call .image-viewer,
body.has-minimized-call .lightbox,
body.has-minimized-call [data-media-viewer],
body.has-minimized-call [data-image-viewer] {
    z-index: 2147482000 !important;
}
