* {
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

body:before {
    content: "";
}

button,
input,
textarea {
    font: inherit;
    letter-spacing: 0;
}

button {
    cursor: pointer;
}

.messenger-shell {
    --composer-clearance: 150px;
    min-height: 100svh;
    display: block;
    place-items: initial;
    padding: 0;
    height: 100svh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scroll-padding-bottom: var(--composer-clearance);
}

.messenger-shell section {
    min-height: 100svh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

body.messenger-mode .messenger-shell {
    scroll-snap-type: none;
    scroll-padding-bottom: var(--composer-clearance);
}

body.messenger-mode .messenger-shell section {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
}

.messenger-panel {
    position: relative;
    min-height: 100svh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border: 0;
    padding: 0 24px 24px;
    justify-content: flex-start;
}

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

.messenger-panel::after {
    content: "";
    position: absolute;
    left: 31px;
    right: 31px;
    bottom: -7px;
    height: 8px;
    border-radius: 999px;

    filter: blur(4px);
    pointer-events: none;
}

textarea {
    width: 100%;
    border: 1px solid var(--messenger-line);
    outline: none;
}

textarea {
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 8px;
    padding-right: 8px;

    resize: none;

    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

textarea::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

textarea::placeholder {
    color: rgb(var(--black-rgb) / 30%);
}

textarea:focus {
    border-color: red;
}

.messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 44px;
    padding: 24px 0px var(--composer-clearance);
    scrollbar-width: none;
    width: 100%;
}

body.messenger-mode .messenger-panel {
    padding-bottom: var(--composer-clearance);
}

body.messenger-landing .messages {
    display: none;
}

body.messenger-mode .messenger-seo-hero {
    min-height: auto;
    /* align-content: start; */
    padding: 48px 0 8px;
    /* flex: 0 0 auto; */
    transform: scale(1);
    transition: all 0.3s;
}

.messenger-seo-hero {
    width: 100%;
    min-height: 100svh;
    display: grid;
    align-content: center;
    justify-items: center;
    /* padding: 120px 0 210px; */
    text-align: center;
    align-items: center;
}

body.messenger-mode .messenger-seo-hero .start-intro-brand {
    margin-bottom: 20px;
}

body.messenger-mode .messenger-seo-hero .start-intro-title {
    margin-bottom: 12px;
    font-size: 24px;
    line-height: 1.08;
}

body.messenger-mode .messenger-seo-hero .start-intro-description {
    max-width: 28rem;
    font-size: 14px;
    line-height: 1.35;
}

.messenger-seo-about {
    width: 100%;
    min-height: 100svh;
    display: grid;
    align-content: center;
    justify-items: center;
    /* padding: 96px 0 180px; */
    padding: 24px;
}

.messenger-landing .messenger-seo-about .service-sheet-handle {
    display: none;
}

.messages::-webkit-scrollbar {
    display: none;
}

.message {
    width: fit-content;
    max-width: calc(var(--page-width) / 1.5);
    padding: 16px 16px;
    border: 0;
    border-radius: 16px 16px 6px 16px;

    box-shadow: none;
    white-space: normal;
    overflow-wrap: anywhere;

    width: 100%;
}

.message.bot {
    align-self: flex-start;

    padding: 0;
    max-width: 80%;
    width: max-content;
    margin-bottom: 16px;
}

.message.user {
    align-self: flex-end;
    background: var(--user-messege);
    max-width: calc(var(--page-width) * 0.5);
    max-width: 80%;
    width: max-content;
}

.message.system {
    align-self: center;
    max-width: 280px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--messenger-muted);

    font-size: 12px;
    line-height: 1.3;
    text-align: center;
}

.message.bot.is-processing {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: min(80%, 360px);
    padding: 12px 14px;
    border-radius: 18px 18px 18px 6px;
    background: var(--hover-soft);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-soft);
}

.processing-spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 2px solid rgb(var(--text-link-rgb) / 20%);
    border-top-color: var(--text-link);
    border-radius: 999px;
    animation: processing-spin 0.85s linear infinite;
}

.processing-text {
    font-size: 15px;
    line-height: 1.2;
    font-weight: 600;
}

.processing-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.processing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: var(--text-link);
    animation: processing-dot 1.05s ease-in-out infinite;
}

.processing-dots span:nth-child(2) {
    animation-delay: 0.14s;
}

.processing-dots span:nth-child(3) {
    animation-delay: 0.28s;
}

.bot-meta {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    margin: 1px 0 9px;
    white-space: normal;
}

.bot-meta-logo {
    width: 34px;
    height: 34px;
    display: block;
    color: var(--text-primary);
}

.bot-meta strong,
.bot-meta span {
    display: block;
}

.bot-meta strong {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.05;
}

.bot-meta span {
    margin-top: 3px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.message a {
    color: var(--text-link);
    text-decoration: none;
}

.message-text:empty {
    display: none;
}

.message-text {
    white-space: pre-wrap;
}

.message.bot .message-text {
    padding: 16px 0px 0px 0px;
}

.message.bot.is-cancelled .message-text {
    color: var(--diffRemoved, rgb(186 38 35));
}

.telegram-qr-card {
    position: relative;
    width: 216px;
    height: 216px;
    margin: 18px auto 10px;
    border-radius: 24px;
    background: var(--background-primary);
}

.telegram-qr-code,
.telegram-qr-code svg {
    display: block;
    width: 216px;
    height: 216px;
}

.telegram-qr-logo-animated {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-image: url("/assets/telegram-animated.svg");
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: auto 42px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: telegram-logo-frames 0.75s steps(30) 1 both;
}

@keyframes telegram-logo-frames {
    to {
        background-position-x: -1260px;
    }
}

.media-preview {
    width: 96px;
    height: 96px;
    display: inline-block;
    margin: 0 4px 0px 0;
    object-fit: cover;
    vertical-align: top;
    border-radius: 24px;
    background: var(--hover-soft);
    border: 1px solid var(--border-soft);
}

.media-album {
    position: relative;
    width: min(100%, 526px);
    height: 360px;
    margin: 0 0 0px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--hover-soft);
    display: flex;
    gap: 10px;
}

.message.user .media-album {
    margin-left: auto;
    margin-left: -16px;
    margin-right: 16px;
    margin-top: -16px;
    width: calc(100% + 32px);
    margin-bottom: 16px;
}

.media-album-2 {
    height: 420px;
}

.media-album-3,
.media-album-4 {
    height: 410px;
}

.media-album-5,
.media-album-6 {
    height: 500px;
}

.album-item {
    position: absolute;
    overflow: hidden;
    background: var(--hover-soft);
}

.album-media.media-preview {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.media-album-2 .album-item:nth-child(1) {
    inset: 0 0 calc(50% + 1px) 0;
    border-radius: 16px 16px 0 0;
}

.media-album-2 .album-item:nth-child(2) {
    inset: calc(50% + 1px) 0 0 0;
    border-radius: 0 0 16px 16px;
}

.media-album-3 .album-item:nth-child(1) {
    inset: 0 0 33.5% 0;
    border-radius: 16px 16px 0 0;
}

.media-album-3 .album-item:nth-child(2) {
    inset: calc(66.5% + 1px) calc(50% + 1px) 0 0;
    border-radius: 0 0 0 16px;
}

.media-album-3 .album-item:nth-child(3) {
    inset: calc(66.5% + 1px) 0 0 50%;
    border-radius: 0 0 16px 0;
}

.media-album-4 .album-item:nth-child(1),
.media-album-5 .album-item:nth-child(1) {
    inset: 0 0 25% 0;
    border-radius: 16px 16px 0 0;
}

.media-album-4 .album-item:nth-child(2),
.media-album-5 .album-item:nth-child(2) {
    inset: calc(75% + 1px) calc(66.666% + 1px) 0 0;
    border-radius: 0 0 0 16px;
}

.media-album-4 .album-item:nth-child(3),
.media-album-5 .album-item:nth-child(3) {
    inset: calc(75% + 1px) calc(33.333% + 1px) 0 33.333%;
}

.media-album-4 .album-item:nth-child(4),
.media-album-5 .album-item:nth-child(4) {
    inset: calc(75% + 1px) 0 0 66.666%;
    border-radius: 0 0 16px 0;
}

.media-album-5 .album-item:nth-child(1) {
    inset: 0 0 45.4% 0;
}

.media-album-5 .album-item:nth-child(2) {
    inset: calc(54.6% + 1px) calc(50% + 1px) 18.2% 0;
    border-radius: 0;
}

.media-album-5 .album-item:nth-child(3) {
    inset: calc(54.6% + 1px) 0 18.2% 50%;
}

.media-album-5 .album-item:nth-child(4) {
    inset: calc(81.8% + 1px) calc(50% + 1px) 0 0;
    border-radius: 0 0 0 16px;
}

.media-album-5 .album-item:nth-child(5) {
    inset: calc(81.8% + 1px) 0 0 50%;
    border-radius: 0 0 16px 0;
}

.media-album-6 .album-item:nth-child(1) {
    inset: 0 0 45.6% 0;
    border-radius: 16px 16px 0 0;
}

.media-album-6 .album-item:nth-child(2) {
    inset: calc(54.4% + 1px) calc(50% + 1px) 18.2% 0;
}

.media-album-6 .album-item:nth-child(3) {
    inset: calc(54.4% + 1px) 0 18.2% 50%;
}

.media-album-6 .album-item:nth-child(4) {
    inset: calc(81.8% + 1px) calc(66.666% + 1px) 0 0;
    border-radius: 0 0 0 16px;
}

.media-album-6 .album-item:nth-child(5) {
    inset: calc(81.8% + 1px) calc(33.333% + 1px) 0 33.333%;
}

.media-album-6 .album-item:nth-child(6) {
    inset: calc(81.8% + 1px) 0 0 66.666%;
    border-radius: 0 0 16px 0;
}

.media-album[data-count="7"],
.media-album[data-count="8"],
.media-album[data-count="9"],
.media-album[data-count="10"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 116px;
    gap: 2px;
    height: auto;
}

.media-album[data-count="7"] .album-item,
.media-album[data-count="8"] .album-item,
.media-album[data-count="9"] .album-item,
.media-album[data-count="10"] .album-item {
    position: relative;
    inset: auto;
    border-radius: 0;
}

.media-album[data-count="7"] .album-item:nth-child(1),
.media-album[data-count="8"] .album-item:nth-child(1),
.media-album[data-count="9"] .album-item:nth-child(1),
.media-album[data-count="10"] .album-item:nth-child(1) {
    grid-column: span 3;
    grid-row: span 2;
    border-radius: 16px 16px 0 0;
}

.media-album[data-count="7"] .album-item:last-child,
.media-album[data-count="8"] .album-item:last-child,
.media-album[data-count="9"] .album-item:last-child,
.media-album[data-count="10"] .album-item:last-child {
    border-radius: 0 0 16px 0;
}

.media-album[data-count="7"] .album-item:nth-child(5),
.media-album[data-count="8"] .album-item:nth-child(8),
.media-album[data-count="9"] .album-item:nth-child(8),
.media-album[data-count="10"] .album-item:nth-child(8) {
    border-radius: 0 0 0 16px;
}

.message.user .media-preview {
    border-radius: 8px;
}

.page-preview-card {
    display: block;
    width: min(100%, 526px);
    margin: 0 0 10px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: var(--hover-soft);
    color: var(--text-primary);
}

.page-preview-image {
    display: block;
    width: 100%;
    aspect-ratio: 1.91 / 1;
    object-fit: cover;
    background: var(--hover-soft);
}

.page-preview-body {
    display: grid;
    gap: 5px;
    padding: 10px 12px 12px;
}

.page-preview-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.page-preview-description {
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 1.35;
}

.message-media-list {
    display: grid;
    gap: 8px;
    width: min(100%, 380px);
    margin: 10px 0;
}

.message-media-list-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--hover-soft);
}

.message-media-list-thumb {
    width: 56px;
    height: 56px;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    background: var(--border-soft);
}

.message-media-list-thumb-empty {
    display: inline-grid;
    place-items: center;
    color: var(--text-tertiary);
    font-size: 10px;
    font-weight: 700;
}

.message-media-list-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.message-media-list-body strong,
.message-media-list-body span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-media-list-body strong {
    font-size: 14px;
    line-height: 1.2;
}

.message-media-list-body span {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.2;
}

.message-media-list-item button {
    min-height: 36px;
    border: 0;
    border-radius: 9px;
    padding: 0 8px;
    color: var(--text-link);
    background: var(--text-link-rgb-10);
    font-size: 14px;
}

video.media-preview {
}

.file-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0 4px 6px 0;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--messenger-ink);
    background: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.inline-keyboard {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-direction: column;
}

.message.has-page-preview .inline-keyboard {
    width: min(100%, 526px);
}

.inline-keyboard-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    width: 100%;
}

.inline-keyboard button {
    position: relative;
    min-height: 44px;
    flex: 1 1 0;
    min-width: 0;
    border: 0;
    border-radius: 6px;
    padding: 0 10px;
    color: var(--accent);
    background: #ffffff;
    line-height: 1.15;
    background: var(--border-soft);
    background: var(--ink-02);

    padding: 9px 24px;
    font-size: 14px;
    font-weight: 500;
}

.inline-keyboard button:hover {
    background: var(--ink-04);
}

.inline-keyboard button.has-support-unread-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex-direction: column;
}

.button-unread-note {
    display: block;
    color: var(--diffAdded);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    line-height: 1;
    text-align: center;
}

.support-unread-badge {
    display: inline-grid;
    min-width: 16px;
    height: 16px;
    margin-left: 6px;
    padding: 0 4px;
    place-items: center;
    border-radius: 999px;
    background: var(--diffAdded);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    vertical-align: middle;
}

.inline-keyboard button.is-copied {
    color: #078a32;
    background: rgba(16, 185, 76, 0.12);
}

.inline-keyboard .inline-keyboard-row:last-child button {
    border-radius: 6px 6px 16px 16px;
}

.inline-keyboard-row.inline-keyboard-row-horizontal button:first-child {
    border-radius: 6px 6px 6px 16px;
}

.inline-keyboard-row.inline-keyboard-row-horizontal button:last-child {
    border-radius: 6px 6px 16px 6px;
}

.composer-wrap {
    position: fixed;
    left: 50%;
    bottom: 32px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0px;
    width: min(40rem, calc(100% - 32px));
    transform: translateX(-50%);
}

.composer {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    padding: 0px 14px 0 14px;
    border: 0;
    border-radius: 36px;
    background: var(--background-primary);
    width: 100%;
    -webkit-backdrop-filter: blur(44px);
    backdrop-filter: blur(44px);
    transition:
        opacity 0.18s ease,
        filter 0.18s ease,
        box-shadow 0.18s ease;
    box-shadow:
        rgba(0, 0, 0, 0) 0px 0px 0px 0px,
        rgba(0, 0, 0, 0) 0px 0px 0px 0px,
        rgba(0, 0, 0, 0) 0px 0px 0px 0px,
        rgba(0, 0, 0, 0) 0px 0px 0px 0px,
        rgba(0, 0, 0, 0.04) 0px 3px 6px 0px,
        rgba(0, 0, 0, 0.04) 0px 4px 80px 8px,
        rgba(0, 0, 0, 0.62) 0px 0px 1px 0px;
}

.composer.is-drag-over {
    box-shadow:
        rgb(var(--text-link-rgb) / 34%) 0 0 0 2px,
        rgb(var(--text-link-rgb) / 12%) 0 12px 42px 6px,
        rgba(0, 0, 0, 0.04) 0px 4px 80px 8px,
        rgba(0, 0, 0, 0.62) 0px 0px 1px 0px;
}

.busy-status {
    align-self: center;
    min-height: 28px;
    margin: 0 0 8px;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--text-primary);
    background: var(--background-primary);
    box-shadow:
        rgb(var(--text-link-rgb) / 22%) 0 0 0 1px,
        rgb(var(--text-link-rgb) / 12%) 0 8px 30px 3px;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 650;
}

.busy-status::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 999px;
    background: var(--text-link);
    box-shadow: 0 0 0 0 rgb(var(--text-link-rgb) / 34%);
    animation: busy-pulse 1.25s ease-in-out infinite;
}

.composer-note {
    position: static;
    width: 100%;
    margin: 0;
    color: var(--text-tertiary);
    font-size: 14px;
    line-height: 1.25;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
    display: none;
}

.composer-note button {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--text-link);
    background: transparent;
    font: inherit;
    line-height: inherit;
    text-decoration: none;
    cursor: pointer;
}

.composer-note button:hover {
    text-decoration: underline;
}

.slash-hint {
    align-self: stretch;
    padding: 0 48px;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.2;
    pointer-events: none;
    display: none;
}

.slash-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    border-radius: 36px;
    -webkit-backdrop-filter: blur(44px);
    backdrop-filter: blur(44px);
    overflow: hidden;
    padding: 16px 0px 8px 0px;
}

.slash-panel button {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 13px 20px;
    border: 0;
    border-radius: 24px;
    color: #8f8f8f;
    background: transparent;
    text-align: left;
    justify-content: start;
}

.slash-command-separator {
    height: 1px;
    margin: 8px 20px;
    background: rgb(0 0 0 / 7%);
}

.slash-panel button:hover {
    color: var(--ink);
}

.slash-command-icon {
    width: 24px;
    height: 24px;
    color: #8f8f8f;
    fill: currentColor;
}

.slash-panel button:hover .slash-command-icon {
    color: var(--ink);
}

.slash-command-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    justify-content: start;
}

.slash-command-copy strong {
    overflow: hidden;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slash-command-copy small {
    overflow: hidden;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

body.messenger-mode .messenger-seo-about {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 0 24px;
    background: rgb(0 0 0 / 0%);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 260ms ease,
        background 260ms ease;
}

body.messenger-mode .messenger-seo-about.is-open {
    background: var(--overlay);
    opacity: 1;
    pointer-events: auto;
    display: flex;
    max-width: none;
    -webkit-backdrop-filter: blur(44px);
    backdrop-filter: blur(44px);
    padding-bottom: 10svh;
}

body.messenger-mode .messenger-seo-about .messenger-seo-about-inner {
    /* width: min(720px, 100%); */
    /* max-height: 90svh; */
    /* min-height: min(560px, 90svh); */
    overflow: auto;
    /* border: 1px solid rgb(0 0 0 / 8%); */
    /* border-bottom: 0; */
    /* border-radius: 32px 32px 0 0; */
    /* background: rgb(255 255 255 / 94%); */
    /* padding: 56px clamp(24px, 5vw, 56px) 48px; */
    /* box-shadow:
        0 18px 60px rgb(15 23 42 / 16%),
        0 0 1px rgb(15 23 42 / 34%); */
    transform: translateY(100%);
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
    scrollbar-width: none;
    max-width: var(--page-width);
}

body.messenger-mode
    .messenger-seo-about
    .messenger-seo-about-inner::-webkit-scrollbar {
    display: none;
}

body.messenger-mode .messenger-seo-about.is-open .messenger-seo-about-inner {
    transform: translateY(0);
}

.service-sheet-handle {
    width: 44px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: rgb(0 0 0 / 14%);
    display: none;
}

.service-sheet-link {
    /* display: inline-flex; */
    /* align-items: center; */
    /* justify-content: center; */
    /* min-height: 48px; */
    /* padding: 0 18px; */
    /* border-radius: 999px; */
    /* color: var(--text-link); */
    /* background: var(--text-link-rgb-10); */
    /* font-size: 17px; */
    /* line-height: 1.2; */
    /* text-decoration: none; */
}

.composer > * {
    position: relative;
    z-index: 1;
}

.composer.is-loading {
    opacity: 0.94;
    filter: saturate(0.98);
    box-shadow:
        rgb(var(--text-link-rgb) / 30%) 0 0 0 2px,
        rgb(var(--text-link-rgb) / 12%) 0px 4px 80px 8px,
        rgba(0, 0, 0, 0.62) 0px 0px 1px 0px;
}

.composer.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 30%,
        rgba(255, 255, 255, 0.72) 48%,
        rgba(255, 255, 255, 0.18) 58%,
        transparent 78%
    );
    transform: translateX(-120%);
    animation: composer-shimmer 2.15s ease-in-out infinite;
}

body.messenger-busy .inline-keyboard button,
body.messenger-busy .slash-panel button {
    pointer-events: none;
    opacity: 0.52;
}

@keyframes composer-shimmer {
    to {
        transform: translateX(120%);
    }
}

@keyframes processing-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes processing-dot {
    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }

    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

@keyframes busy-pulse {
    70% {
        box-shadow: 0 0 0 8px rgb(var(--text-link-rgb) / 0%);
    }

    100% {
        box-shadow: 0 0 0 0 rgb(var(--text-link-rgb) / 0%);
    }
}

@keyframes plus-attention-ring {
    0% {
        opacity: 1;
        transform: rotate(-90deg) scale(1);
        filter: blur(0);
    }

    72% {
        opacity: 1;
        transform: rotate(-90deg) scale(1);
        filter: blur(0);
    }

    88% {
        opacity: 0.44;
        transform: rotate(-90deg) scale(1.12);
        filter: blur(0.6px);
    }

    100% {
        opacity: 0;
        transform: rotate(-90deg) scale(1.2);
        filter: blur(1.4px);
    }
}

@keyframes plus-attention-ring-stroke {
    0% {
        stroke-dashoffset: 106.82;
    }

    72%,
    100% {
        stroke-dashoffset: 0;
    }
}

.bubble-text {
    position: relative;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 0;
    min-width: 0;

    gap: 4px;
}

.composer-icon {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: currentColor;
    fill: currentColor;
}

.textarea-placeholder {
    position: absolute;
    left: 48px;
    top: 50%;
    right: 42px;
    z-index: 2;
    height: 24px;
    overflow: hidden;
    color: #727272;
    font-size: 17px;
    line-height: 24px;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%);
    transition:
        opacity 220ms ease,
        visibility 0s linear 0s;
}

.textarea-placeholder.is-hidden {
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 180ms ease,
        visibility 0s linear 180ms;
}

.placeholder-item {
    position: absolute;
    left: 0;
    top: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    transform: translateY(-100%);
    transition:
        opacity 320ms ease,
        transform 320ms ease;
}

.placeholder-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.placeholder-item.is-exiting {
    opacity: 0;
    transform: translateY(100%);
}

.composer.has-send .bubble-text {
    /* grid-template-columns: 36px minmax(0, 1fr) 36px; */
    grid-template-columns: 36px minmax(0, 1fr) max-content;
}

.bubble-text.is-expanded {
    padding-bottom: 14px;
}

.composer.has-start-example .bubble-text {
    grid-template-columns: 36px minmax(0, 1fr) auto;
}

.composer.has-start-example.has-send .bubble-text {
    grid-template-columns: 36px minmax(0, 1fr) auto 36px;
}

.composer.has-start-example .textarea-placeholder {
}

.message-media-list-item button:hover {
    background: rgb(var(--text-link-rgb) / 14%);
}

.composer.has-selected-media {
    align-items: end;
    padding-top: 12px;
}

.selected-media-strip {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 44px 0 5px;
    scrollbar-width: none;
    justify-content: flex-start;
    display: none;
}

.composer.has-selected-media .selected-media-strip {
    display: flex;
}

.selected-media-strip::-webkit-scrollbar {
    display: none;
}

.selected-media-item {
    position: relative;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    overflow: visible;
    border-radius: 12px;
    background: var(--border-soft);
    overflow: hidden;
}

.selected-media-item.is-entering {
    animation: selected-media-enter 320ms ease both;
}

@keyframes selected-media-enter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.94);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.selected-media-strip .selected-media-item:first-child video,
.selected-media-strip .selected-media-item:first-child,
.selected-media-strip .selected-media-item:first-child img {
    border-radius: 18px 12px 12px 12px;
}

button.selected-media-remove:after,
button.selected-media-remove:before {
    content: "";
    width: 12px;
    height: 1.5px;
    background: var(--icon-tertiary);
    position: absolute;
    border-radius: 2px;
    transform: rotate(-45deg);
    right: 8px;
    top: 12px;
}

button.selected-media-remove:before {
    transform: rotate(45deg);
}

.selected-media-item img,
.selected-media-item video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 12px;
}

.selected-media-file {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 6px;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

.selected-media-remove {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;
    border: 0px solid var(--icon-tertiary);

    padding: 0;

    font-size: 18px;
    line-height: 1;
    font-size: 0;
    align-items: start;
    justify-content: end;
    background: transparent;
}

.selected-media-remove:hover:after,
.selected-media-remove:hover:before {
    background: var(--text-primary);
}

.selected-media-remove:hover {
}

.attach-button {
    position: relative;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #9ca3af;
    cursor: pointer;
}

.composer.has-support-unread-indicator:not(.has-action-panel)
    .attach-button::before {
    content: attr(data-unread-count);
    position: absolute;
    top: -2px;
    right: -1px;
    z-index: 4;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--diffAdded);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--background-primary);
    pointer-events: none;
}

.attach-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.attach-button span {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-soft);
    border-color: transparent;
    border-radius: 50%;

    font-weight: 400;
    line-height: 1;
    font-size: 0;

    color: #727272;
    transition:
        color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.attach-attention-ring {
    position: absolute;
    inset: 0;
    width: 36px;
    height: 36px;
    overflow: visible;
    opacity: 0;
    transform: rotate(-90deg) scale(1);
    transform-origin: center;
    pointer-events: none;
    /* border: 1px solid red; */
    left: -1px;
    top: -1px;
}

.attach-attention-ring circle {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 106.82;
    stroke-dashoffset: 106.82;
}

.attach-button.is-attention-ring .attach-attention-ring {
    animation: plus-attention-ring 1.4s ease-out forwards;
}

.attach-button.is-attention-ring .attach-attention-ring circle {
    animation: plus-attention-ring-stroke 1.4s ease-out forwards;
}

.composer.is-support-unread .attach-button span {
    color: var(--text-tertiary);
    background: transparent;
}

.composer.has-action-panel .attach-button span {
    transform: rotate(45deg);
}

.attach-button span:hover {
    background: var(--ink-04);
}

.attach-button span:hover {
    color: var(--text-primary);
}

.composer button[type="submit"] {
    width: 36px;
    height: 36px;
    min-height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    padding: 0;
    color: #ffffff;
    background: var(--accent);
    align-items: center;
    justify-content: center;
}

.composer button[type="submit"] span {
    display: none;
}

.composer button[type="submit"] .send-icon {
    width: 20px;
    height: 20px;
}

input::placeholder,
textarea::placeholder {
    color: #727272;
    opacity: 1;
}

.message.bot.bot-intro {
    width: fit-content;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
}

.message.bot.bot-intro.start-intro {
    position: relative;
    z-index: 4;
    display: grid;
    justify-items: center;
    gap: 0;
    width: min(760px, 100%);
    max-width: 100%;
    text-align: center;
    transition: all 0.3s;
}

.start-intro-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 70px;
    color: var(--text-primary);
}

.start-intro-logo {
    width: 24px;
    height: 24px;
}

.start-intro-brand strong {
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
}

.start-intro-title {
    margin: 0 0 28px;
    color: var(--ink);

    letter-spacing: 0;
    white-space: pre-line;
    font-size: 30px;
    text-align: center;
    font-weight: 400;
    line-height: 30px;

    letter-spacing: -0.04em;
    line-height: 1.08;
}

.start-intro-description {
    max-width: 820px;
    margin: 0;
    color: var(--text-tertiary);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.45;
    white-space: pre-line;

    font-weight: 400;

    line-height: 30px;
    margin-top: 0px;
}

.start-intro-example-button {
    --example-icon-color: var(--text-tertiary);
    z-index: 4;
    display: inline-flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 8px 8px;
    border: 0;
    border-radius: 999px;
    color: var(--text-tertiary);
    background: var(--border-soft);
    background: transparent;

    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    white-space: nowrap;
    backdrop-filter: blur(8px);
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition:
        opacity 280ms ease,
        transform 280ms ease,
        visibility 0s linear 0s,
        background 160ms ease;
}

.start-intro-example-button.is-intro-hidden {
    display: none;
}

.start-intro-example-button.is-user-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition:
        opacity 280ms ease,
        transform 280ms ease,
        visibility 0s linear 280ms,
        background 160ms ease;
}

.start-intro-example-button:hover {
    background: rgb(0 0 0 / 7%);
    color: var(--ink);
}

.start-intro-example-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #8f8f8f;
}

.start-intro-example-button:hover .start-intro-example-icon {
    color: var(--ink);
}

.message.bot.bot-intro:only-child {
    margin-top: auto;
    margin-bottom: auto;
    transition: transform 0.3s;
    transform: scale(1);
}

@media (max-width: 430px) {
    .composer.has-start-example.has-send .bubble-text {
        grid-template-columns: 36px minmax(0, 1fr) max-content 36px;
        grid-template-areas:
            "text text text text"
            "attach . example send";
    }

    .start-intro-example-button span {
        display: none;
    }
}

@media (min-width: 768px) {
    .messenger-shell {
        --composer-clearance: 210px;
    }

    .messenger-seo-hero.start-intro {
        transform: scale(1.45);
        /* padding-top: 20svh; */
    }

    .message.bot.bot-intro.start-intro:only-child
        button.start-intro-example-button {
        transform: scale(0.65);
    }

    .composer-wrap {
        bottom: 62px;
    }
}

@media (prefers-color-scheme: dark) {
    input::placeholder,
    textarea::placeholder {
        color: #afafaf;
        opacity: 1;
    }

    .textarea-placeholder {
        color: #afafaf;
    }

    .start-intro-example-button {
        --example-icon-color: rgb(255 255 255 / 38%);
        color: rgb(255 255 255 / 72%);
        background: rgb(255 255 255 / 8%);
    }

    .start-intro-example-button:hover {
        background: rgb(255 255 255 / 12%);
    }

    .composer.is-loading::after {
        background: linear-gradient(
            110deg,
            transparent 0%,
            rgb(130 130 130 / 0%) 30%,
            rgb(130 130 130 / 30%) 48%,
            rgb(130 130 130 / 8%) 58%,
            transparent 78%
        );
    }

    .slash-panel {
        background: #353535;
        box-shadow:
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0.06) 0px 3px 6px 0px,
            rgba(255, 255, 255, 0.2) 0px 0px 1px 0px inset;
    }

    .slash-panel button + button {
        border-top-color: rgb(255 255 255 / 10%);
    }

    .slash-panel button:hover {
        /* background: rgb(255 255 255 / 8%); */
    }

    body.messenger-mode .messenger-seo-about.is-open {
        background: rgb(0 0 0 / 42%);
    }

    body.messenger-mode .messenger-seo-about .messenger-seo-about-inner {
        border-color: rgb(255 255 255 / 10%);
        background: rgb(33 33 33 / 92%);
        box-shadow:
            0 18px 60px rgb(0 0 0 / 44%),
            0 0 1px rgb(255 255 255 / 22%) inset;
    }

    .service-sheet-handle {
        background: rgb(255 255 255 / 18%);
    }

    .composer {
        box-shadow:
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0) 0px 0px 0px 0px,
            rgba(0, 0, 0, 0.06) 0px 3px 6px 0px,
            rgba(255, 255, 255, 0.2) 0px 0px 1px 0px inset;
        background: #212121;
    }
}

.bubble-text.is-expanded {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
        "text text"
        "attach .";
    align-items: center;
}

.composer.has-send .bubble-text.is-expanded {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    grid-template-areas:
        "text text text"
        "attach . send";
}

.composer.has-start-example .bubble-text.is-expanded {
    grid-template-columns: 36px minmax(0, 1fr) max-content;
    grid-template-areas:
        "text text text"
        "attach . example";
}

.composer.has-start-example.has-send .bubble-text.is-expanded {
    grid-template-columns: 36px minmax(0, 1fr) max-content 36px;
    grid-template-areas:
        "text text text text"
        "attach . example send";
}

.bubble-text.is-expanded textarea {
    grid-area: text;
    width: 100%;
}

.bubble-text.is-expanded .attach-button {
    grid-area: attach;
}

.bubble-text.is-expanded [data-submit-button] {
    grid-area: send;
}

.bubble-text.is-expanded [data-action="try-example"] {
    grid-area: example;
}

[aria-disabled="true"] {
    pointer-events: none;
    opacity: 0.35;
}

.slash-panel button[data-slash-action="example"] {
    display: none;
}

.slash-panel button[data-slash-action="example"] + div {
    display: none;
}
