.contact-list {
    flex: 1;
    overflow-y: auto;
}

.contact {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    user-select: none;
}

.contact:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.profile-avatar-image {
    min-width: 152px;
    min-height: 152px;
    width: 152px;
    height: 152px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8A2BE2);
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
    cursor: pointer;
    object-fit: cover;
}

.profile-avatar {
    min-width: 152px;
    min-height: 152px;
    width: 152px;
    height: 152px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8A2BE2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 50px;
    color: white;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    user-select: none;
    cursor: pointer;
}

.avatar {
    min-width: 52px;
    min-height: 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8A2BE2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: white;
    margin-right: 16px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /*overflow: hidden;*/
}

.avatar-big {
    min-width: 92px;
    min-height: 92px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8A2BE2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: white;
    margin-right: 16px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /*overflow: hidden;*/
}

.avatar-big .avatar-image {
    min-width: 92px;
    min-height: 92px;
    width: 92px;
    height: 92px;
}

.avatar-image {
    min-width: 52px;
    min-height: 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    position: relative;
    object-fit: cover;
}

.stranger .avatar {
    background: linear-gradient(135deg, #444, #666); /* серый градиент вместо цветного */
    color: var(--text-muted);
}

.stranger .contact-name::after {
    content: " (НЕИЗВЕСТНЫЙ)";
    opacity: 0.7;
    font-size: 14px;
}

.stranger .contact-status {
    color: var(--text-muted);
    font-style: italic;
}

.blocked .avatar {
    background: linear-gradient(135deg, #444, #666); /* серый градиент вместо цветного */
    color: var(--text-muted);
}

.blocked .contact-name::after {
    content: " (ЗАБЛОКИРОВАН)";
    opacity: 0.7;
    font-size: 14px;
}

.blocked .contact-status {
    color: var(--text-muted);
    font-style: italic;
}

.status {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    bottom: 2px;
    right: 2px;
}

.status.online {
    background-color: var(--online);
}

.status.offline {
    background-color: var(--offline);
}

.contact-info {
    flex-grow: 1;
    min-width: 0;
    padding-right: 36px;
}

.contact-name {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 16px;
}

.contact-status {
    font-size: 14px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-preview {
    max-width: 100%;
}

.unread-badge {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 5px;
    top: 5px;
    flex-shrink: 0;
    background-color: var(--unread);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.read-badge {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0.4;
    background-color: transparent;
    color: var(--text-color);
    min-width: 22px;
    height: 22px;
    padding: 14px 18px;
    margin-left: 12px;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    /*min-height: 64px;*/
}

.chat-contact {
    display: flex;
    align-items: center;

    flex: 1;
    min-width: 0;

    padding: 0 5px;
}

.chat-avatar {
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #8A2BE2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-right: 14px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.chat-avatar .avatar-image{
    min-width: 34px;
    min-height: 34px;
    width: 34px;
    height: 34px;
}

.chat-info {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}

.chat-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    width: 100%;
    min-width: 0;
}

.chat-status {
    font-size: 13px;
    color: var(--text-secondary);
}

.chat-status.in-chat {
    color: var(--primary);
}

.chat-status.typing {
    color: var(--link);
}

.chat-status.voice {
    color: var(--link-hover);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 16px;
    display: flex;
    animation: messageAppear 0.3s ease;
}

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message.notify {
    align-self: center;
}

.message-content {
    padding: 22px 18px;
    border-radius: 20px;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    min-width: 120px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #00000000;
    transition: border-color 0.3s ease-out;
}

.message-sticker,
.message-video-note {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.message-content .message-code {
    display: inline-block;
    background: var(--bg-dark);
    color: var(--link);
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace;
    font-size: 0.7em;
    overflow: auto;
    max-height: 500px;
    max-width: 70vw;
    padding: 12px;
    border-radius: 12px;
    white-space: break-spaces;
}

.message-content video {
    position: relative;
}

.video-note-message {
    position: relative;
    width: 220px;
    height: 220px;
    overflow: hidden;
    border-radius: 50%;
    background: #111;
    cursor: pointer;
}

.video-note-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.video-note-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
}

.video-note-duration {
    position: absolute;
    left: 50%;
    bottom: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    transform: translateX(-50%);
    z-index: 1;
}

.video-note-message.playing .video-note-play,
.video-note-message.playing .video-note-duration {
    display: none;
}

.message-avatar {
    display: flex;
    align-items: end;
    margin-right: 4px;
}

.message-avatar .avatar {
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
    margin: 0;
}

.message-avatar .avatar-image {
    min-width: 32px;
    min-height: 32px;
    width: 32px;
    height: 32px;
}

.message.received .message-content {
    background-color: var(--message-received);
    border-bottom-left-radius: 6px;
    border: 1px solid var(--border-color);
}

.message.sent .message-content {
    background: linear-gradient(135deg, var(--message-sent), #1F5FAB);
    border-bottom-right-radius: 6px;
    color: white;
}

.message.notify .message-content {
    background-color: var(--tab-hover);
    border-radius: 15px;
    color: white;
}

.message.sent .message-avatar {
    display: none;
}

.message.notify.sent {
    display: none;
}

.message-info {
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.message-sender {
    font-size: 11px;
    text-align: left;
    padding-bottom: 8px;
}

.message.sent .message-sender {
    display: none;
}

.message-time {
    display: inline-block;
    position: absolute;
    right: 6px;
    bottom: 6px;
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.icon {
    position: relative;
    top: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-left: 4px;
    vertical-align: text-top;
    flex-shrink: 0;
    cursor: pointer;
}

.icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.react {
    display: inline-block;
    font-size: 18px;
    margin: 6px;
    padding: 6px;
    transition: transform 0.2s;
    flex-shrink: 0;
    border-radius: 50%;
}

.react.mr {
    background: linear-gradient(135deg, var(--primary), #8A2BE2);
    cursor: pointer;
}

.react.cr {
    background: linear-gradient(135deg, var(--offline), var(--bg-dark));
}

.text-reaction {
    padding: 8px 10px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 12px;
}

.read-status {
    top: 6px;
    right: 6px;
    position: absolute;
    opacity: 0.6;
    font-size: 11px;
}

.message.received .read-status {
    display: none;
}

.message.highlight .message-content {
    border-color: var(--link);
}

.message-font-bigest-x {
    font-size: 40px;
}

.message-font-bigest {
    font-size: 25px;
}

.message-font-big {
    font-size: 20px;
}

.message-link {
    background: var(--border-color);
    display: inline-block;
    max-width: 300px;
    word-break: break-all;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    border: none;
    border-radius: 4px;
    padding: 2px 8px 2px 24px;
    margin: 0 2px;
    font-size: 0.9em;
    line-height: 1.2;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.message-link.secure {
    color: white;
}

.message-link.insecure {
    color: var(--offline);
}

.message-link.secure::before {
    content: "🔗";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.message-link.insecure::before {
    content: "⚠️";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.who-answer {
    font-size: small;
    display: block;
    margin-bottom: 4px;
}

.sticker-title {
    display: block;
    text-align: center;
    flex: 1;
}

.sticker-pack {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    padding: 16px;
    justify-items: center;
}

.sticker-preview {
    width: 100%;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.sticker-ok {
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    padding: 6px;
    box-sizing: border-box;
}

.sticker-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.audio-message {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 220px;
    max-width: 380px;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 3px;
    border-radius: 16px;
    padding: 6px 10px;
    cursor: pointer;
    transition-duration: 200ms;
}

.audio-player.playing {
    background: rgba(0, 0, 0, 0.1);
}

.message-content .image {
    max-width: 250px;
    max-height: 250px;
    cursor: pointer;
    border-radius: 14px;
    border: 1px solid var(--bg-dark);
    position: relative;
}

.flex {
    display: flex;
}

.flex-vertical {
    display: flex;
    flex-direction: column;
}

.flex-vertical .tag-button {
    margin-bottom: 5px;
}

.play-button {
    width: 34px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 14px;
    user-select: none;
}

.timeline {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.timeline-fill {
    height: 100%;
    background: currentColor;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-duration {
    font-size: 12px;
    opacity: 0.8;
    min-width: 36px;
    text-align: right;
}

.info-panel {
    display: none;
    padding: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--link);
    border-bottom: 1px solid var(--link);
    background-color: var(--bg-card);
    scrollbar-width: none;
    user-select: none;
}

.info-panel.active {
    display: block;
}

.resend {
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid var(--text-muted);
    padding: 2px 6px;
    font-size: 12px;
    margin-bottom: 10px;
}

.message-content .play-btn-span {
    background: var(--bg-dark);
    border: 2px solid var(--text-secondary);
    color: var(--text-primary);
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 46px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}


.message-content .duration-span {
    position: absolute;
    bottom: 42px;
    right: 26px;
    background: var(--border-color);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 16px;
    font-family: monospace;
}

.games-tags-panel {
    display: flex;
    padding: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
    scrollbar-width: none;
    user-select: none;
    scroll-behavior: smooth;
}

.games-tags-panel::-webkit-scrollbar {
    display: none;
}

.game-tag {
    position: relative;
    margin-right: 6px;
    margin-left: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    background-color: var(--tab-hover);
    color: var(--text-secondary);
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 8px;
    transition-duration: 200ms;
}

.game-tag.active {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.game-tag .circle {
    position: absolute;
    background: var(--unread);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    right: -2px;
    top: -2px;
    display: none;
}

.game-tag .circle.active {
    display: inline-block;
}

.edit-game-zip-info {
    display: none;
    margin-left: 15px;
    transition: transform 0.2s;
    color: var(--text-primary);
    background-color: var(--success);
    border: 1px solid var(--link-hover);
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 8px;
    transition-duration: 200ms;
}

.edit-game-zip-info.active {
    display: inline-block;
}

.tags-list {

}

.select-file {
    margin: 2px;
    cursor: pointer;
    transition: transform 0.2s;
    color: var(--text-primary);
    background-color: var(--message-sent);
    border: 1px solid var(--primary-dark);
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 8px;
    transition-duration: 200ms;
}

.right {
    text-align: right;
}

.dev-game-container {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    margin: 2px;
    transition: all 0.2s ease;
    padding: 8px 14px;
    cursor: pointer;
}

.dev-game-container:hover {
    background-color: var(--tab-hover);
}

.dev-game {
    display: flex;
}

.dev-game-logo {
    min-width: 68px;
    min-height: 68px;
    width: 68px;
    height: 68px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dev-game-fields {
    flex: 1;
    padding-left: 15px;
}

.dev-game-title {
    display: block;
    padding-bottom: 5px;
    font-weight: bold;
}

.tag-button {
    margin: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    background-color: var(--tab-hover);
    color: var(--text-secondary);
    font-weight: bold;
    padding: 8px 14px;
    border-radius: 8px;
    transition-duration: 200ms;
}

.tag-button.active {
    color: var(--text-primary);
    background-color: var(--message-sent);
    border-color: var(--primary-dark);
}

.emoji-panel {
    display: flex;
    padding: 6px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-card);
    scrollbar-width: none;
    user-select: none;
    scroll-behavior: smooth;
}

.emoji-panel::-webkit-scrollbar {
    display: none;
}

.emoji {
    position: relative;
    top: 2px;
    text-align: center;
    font-size: 16px;
    margin-right: 6px;
    margin-left: 6px;
    padding: 0 2px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji:hover {
    transform: scale(1.2);
}

.input-area {
    display: flex;
    gap: 8px;
    padding: 8px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    align-items: end;
}

.my-page-connect {
    padding: 16px 16px 6px 16px;
    background-color: var(--bg-card);
}

.my-page-header {
    display: flex;
    gap: clamp(16px, 4vw, 40px);
    width: 100%;
    align-items: stretch;
}

.my-page-header-left {
    flex: 1;
    display: flex;
    gap: clamp(12px, 3vw, 20px);
    align-items: center;
}

.my-page-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.my-page-avatar .avatar-image {
    width: 100%;
    height: 100%;
}

.my-page-left-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(6px, 1.5vw, 12px);
}

.my-page-left-buttons .btn:nth-child(3) {
    grid-column: 1 / span 2;
    justify-self: center;
}

.my-page-bottom-block {
    grid-column: 1 / span 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.my-page-btn-top {
    height: 30px;
}

.my-page-btn-bottom {
    height: 30px;
}

.my-page-left-buttons .btn:nth-child(1),
.my-page-left-buttons .btn:nth-child(2) {
    grid-row: 1;
}

/* нижняя по центру */
.my-page-left-buttons .btn:nth-child(3) {
    grid-column: 1 / span 2;
    justify-self: center;
}

.my-page-btn-counter {
    margin-top: 4px;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 600;
    text-align: center;
}

.my-page-header-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(8px, 2vw, 12px);
    width: clamp(120px, 25vw, 220px);
}

.my-page-delm {
    border-left: 2px solid var(--offline);
}

.my-page-btn {
    width: clamp(40px, 6vw, 65px);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
    transform: scale(0.9);
}

.my-page-btn:hover {
    transform: scale(1);
}

.my-qr-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
}

.my-add-post-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 18px;
    margin: 12px 16px;
    animation: fadeIn 0.25s ease;
    transition: all 0.2s ease;
    /*border-left: 3px solid var(--primary);*/
}

.my-post-area {
    display: flex;
    background-color: var(--bg-card);
    align-items: stretch;
    gap: 12px;
}

.my-post-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 0 0 auto;
}

.my-post-actions #my-send-button:disabled {
    display: flex;
    visibility: hidden;
}

.my-add-images {
    display: flex;
    gap: 10px;
    overflow-y: auto;
    scrollbar-width: none;
    user-select: none;
    scroll-behavior: smooth;
}

.img-container {
    position: relative;
    display: flex;
    margin-bottom: 10px;
}

.my-add-images img {
    max-width: 200px;
    max-height: 200px;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    object-fit: contain;
}

.my-delete-image {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: rgba(13, 17, 23, 0.8);
    color: var(--text-primary);
    cursor: pointer;
}

.my-delete-image:hover {
    background: var(--danger);
}

.fill {
    width: 100%;
}

.message-input {
    min-width: auto;
    word-wrap: break-word;
    flex-grow: 1;
    padding: 14px 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    resize: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition-duration: 200ms;
    overflow: auto;
    white-space: pre-wrap;
}

.message-input:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none; /* чтобы не мешал клику */
    opacity: 1;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.15);
}

.message-input:focus::before {
    opacity: 0.5;
}

.auto-resize {
    max-height: 600px;
}

.send-button {
    margin-left: 2px;
    min-width: 48px;
    min-height: 48px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /*box-shadow: 0 4px 12px rgba(0, 175, 240, 0.3);*/
}

.send-button.record {
    background: linear-gradient(135deg, var(--unread), var(--success));
    /*box-shadow: 0 4px 12px rgba(88, 240, 0, 0.3);*/
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 175, 240, 0.4);
}

.send-button:active {
    transform: scale(0.95);
    display: inline-flex;
}

.send-button:disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    display: none;
}

.message-input.recording {
    background: var(--success);
    color: var(--text-primary);
    border-color: var(--link-hover);
    text-align: center;
    caret-color: transparent;
}

.spinner {
    animation: spin 1s linear infinite;
}

.message-pending .message-content {
	min-width: 14px;
	min-height: 14px;
	padding: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.message-pending {
	position: absolute;
	right: 16px;
	bottom: 8px;
	display: flex;
	width: 16px;
	height: 16px;
	z-index: 2;
	margin-bottom: 0;
	pointer-events: none;
	animation: messageAppear 0.22s ease both;
}

#chat-message-input-area {
	position: relative;
}

#chat-pending-message-layer {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 0;
	z-index: 2;
	pointer-events: none;
}

.message-pending.is-removing {
	animation: messageDisappear 0.18s ease forwards;
}

.message-pending .spinner {
	width: 7px;
	height: 7px;
}

@keyframes messageDisappear {
	from {
		opacity: 1;
		transform: translateY(0);
	}
	to {
		opacity: 0;
		transform: translateY(4px);
	}
}

.carousel-images {
    display: flex;
    overflow-y: auto;
    align-items: center;
    scrollbar-width: none;
    user-select: none;
    scroll-behavior: smooth;
    margin-bottom: 10px;
    gap: 10px;
}

.carousel-image {
    max-width: 100%;
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
}

.carousel-image-object {
    width: 400px;
    min-width: 100%;
    max-width: 100%;

    height: 450px;
    max-height: 450px;

    object-fit: cover;
    border-radius: 12px;
    background-color: var(--border-color);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.image-preview {
    min-width: 100px;
    min-height: 100px;
    max-width: 200px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: inline-block;
}

.editor-text {
    min-width: auto;
    word-wrap: break-word;
    flex-grow: 1;
    padding: 14px 18px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    resize: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition-duration: 200ms;
    overflow: auto;
    white-space: pre-wrap;
}

.editor-text:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
    pointer-events: none; /* чтобы не мешал клику */
    opacity: 1;
}

.editor-text:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 175, 240, 0.15);
}

.editor-text:focus::before {
    opacity: 0.5;
}
