
/* [START] = Flashcord Beta == Major General Modifications [00] ChatIn CSS = */

/* Message Slide Core */
[class^="messagesWrapper_"] [class^="scrollerContent_"] {
    container-name: var(--FlashCore-MessageSlide, FC-MessageSlide);
    container-type: inline-size;
}

@container FC-MessageSlide (min-width: 0px) {
    [class^="messageListItem_"]:last-of-type {
        animation: var(--Flashcord-AnimMult-XSlow, 1s) Flashcord-MSG_Uploaded;
    }
    [class^="messageListItem_"]:last-of-type:has([class*="isSending_"]) {
        opacity: 0.5;
        translate: 10vw;
        animation: var(--Flashcord-AnimMult-Normal, 250ms) Flashcord-MSG_Upload; 
    }
}

/* Jumbomojis Core */
[class^="contents_"] > [id^="message_content_"]:has([class^="emojiContainer_"]) {
    container-name: var(--Flashcord-Jumbomojis, FC-Jumbomojis);
    container-type: inline-size;
}

@container FC-Jumbomojis (min-width: 0) {
    [class^="emojiContainer_"] .jumboable {
        width: 8rem !important;
        height: 8rem !important;
    }
    [class^="emojiContainer_"] .emoji {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* Shadowed Images Core [Container-less] */
[class^="mediaAttachmentsContainer_"], [class^="clickableSticker_"], [class^="inlineMediaEmbed_"], [class^="emojiContainer_"] .emoji {
    filter: drop-shadow(0px 0px var(--FC-Shadowmage, 1px) var(--text-normal));  
}


/* Imagivid Zoom Core */
[class^="layer_"]:has([class^="focusLock_"] [class*="downloadLink_"]) {
    container-name: var(--FlashCore-ImagividZoom, FC-ImagividZoom);
    container-type: inline-size;
}

@container FC-ImagividZoom (min-width: 0px) {
    [class^="focusLock_"] [class^="imageWrapper_"]:hover { 
        width: 90vw !important;
        /*will-change: width, height;*/
    }
    [class^="focusLock_"] [class^="imageWrapper_"] { 
        height: auto !important;
        transition-property: width, height;
        transition-duration: var(--Flashcord-TransMult-Slow, 500ms) !important;
    }
    [class^="focusLock_"] [class^="imageWrapper_"] [class^="wrapper-"] { 
        width: auto !important;
        height: auto !important;
    }
    [class^="focusLock_"] > div { 
        display: flex;
        justify-content: center;
        align-items: flex-start;
        overflow: scroll;
        flex-direction: row;
    }
    [class^="carouselModal_"] {
        justify-content: flex-start !important;
    }
    [class^="focusLock_"] img, [class^="focusLock_"] video, [class^="imageWrapper_"] [class^="wrapper"] {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain;
        overflow: scroll;
    }
    [class^="anchor_"] {
        display: none;
    }
    [class*="modalCarouselWrapper_"] {
        -webkit-box-align: unset !important;
        align-items: unset !important;
        margin: auto;
        position: static;
    }
    [class*="modalCarouselWrapper_"] button {
        margin: 0;
    }
}

/* Menthrepin Core */
[class^="layerContainer_"]:has([class^="messagesPopoutWrap_"], [class^="threadIcon_"], [class*="recentMentionsPopout_"]) {
    container-name: var(--FlashCore-Menthrepin, FC-Menthrepin);
    container-type: inline-size;
}

@container FC-Menthrepin (min-width: 0px) {
    [id^="popout_"] {
        top: 0 !important;
        left: 0 !important;
        right: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;

        transition-property: backdrop_filter;
        transition-duration: var(--Flashcord-TransMult-Slow, 500ms);
        backdrop-filter: blur(0px);
    }
    [id^="popout_"]:has( > div > div:hover) {
        backdrop-filter: blur(var(--Flashcord-Blur-Light, 4px));
        /*will-change: backdrop_filter;*/
    }
    [id^="popout_"] > div > div {
        width: 90vw;
        height: 80vh;
        max-width: unset !important;
        min-width: unset !important;
        border-radius: var(--Flashcord-Border_Radius, 25px );
        padding: 0;
        transition-property: opacity;
        transition-duration: var(--Flashcord-TransMult-Fast, 125ms);
        animation: FlashCore-FadeIn_Top var(--Flashcord-AnimMult-XSlow, 1s) !important;
    }
    [id^="popout_"]:active > div > div {
        opacity: 0;
        /*will-change: opacity;*/
    }
}

/* Xearch Core */
[class^="content_"]:has([class^="searchResultsWrap_"]) {
    container-name: var(--FlashCore-Xearch, FC-Xearch);
    container-type: inline-size;
}

@container FC-Xearch (min-width: 0px) {
    [class^="searchResultsWrap_"] {
        width: 50vw;
        animation: Flashcord-SearchSlide var(--Flashcord-AnimMult-Normal, 250ms);
    }
}

/* Stimogi Core */
[class^="positionLayer_"] {
    container-name: var(--Flashcord-Stimogi, FC-Stimogi);
    container-type: inline-size;
}

@container FC-Stimogi (min-width: 0px) {
    [class^="drawerSizingWrapper_"]  {
        width: 69vw !important;
        animation: FlashCore-FadeIn var(--Flashcord-AnimMult-Normal, 250ms) !important;
    }
}

/* Focus Core */
[class^="appAsidePanelWrapper_"]:has([class^="backdrop_"]) {
    container-name: var(--Flashcord-Focus, FC-Focus);
    container-type: inline-size;
}
@container FC-Focus (min-width: 0px) {
    [class^="notAppAsidePanel_"]:has([class^="focusLock_"]:hover) .app_b1f720 { /* [!] FC-Wildcard_PerfNuker */
        filter: blur(var(--Flashcord-Blur-Medium, 8px)) brightness(var(--FlashCore-Brightness,0.5));
        /*will-change: filter;*/
    }
    [class^="notAppAsidePanel_"] > [class^="app_"] {
        transition-property: filter;
        transition-duration: var(--Flashcord-TransMult-Slow, 500ms);
        filter: blur(0px);
    }
    [class^="backdrop_"] {
        opacity: 0 !important;
    }
}

/* Chatype Bar */
[class^="chatContent_"] {
    container-name: var(--Flashcord-Chatype, FC-Chatype-L1);
    container-type: inline-size;
}

@container FC-Chatype-L1 (min-width: 0px) {
    [class^="form_"] {
        padding: 0 0px 0 8px;
        z-index: 1;
    }
    [class^="channelTextArea_"] {
        margin-bottom: 4px;
    }
    [class^="scrollableContainer_"] {
        border-radius: var(--Flashcord-Border_Radius, 25px);
        container-name: var(--Flashcord-Chatype, FC-Chatype-L2);
        container-type: inline-size;
    }
    [class^="typing_"] {
        top: -24px;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
        animation: FlashCore-FadeIn_Bottom var(--Flashcord-AnimMult-Normal, 250ms) !important;
    }
    [class^="typing_"]:has([class^="typingDots_"]) {
        margin-left: 0;
        margin-right: 0;
    }
    [class^="cooldownWrapper_"] {
        margin: auto !important;
    }
    @container FC-Chatype-L2 (min-width: 0px) {
        [class^="inner_"] {
            padding: 0 8px 0 8px;
            display: flex;
            align-items: center;
        }
        [class^="attachWrapper_"] {
            translate: 4px;
            margin: auto;
            width: min-content;
            height: min-content;
        }
        [class^="attachButton_"] {
            width: min-content;
            height: min-content;
        }
        [class^="placeholder_"] { display: none; }
        [class^="sprite_"], svg {
            opacity: 0.5;
            transition-property: opacity, scale;
            transition-duration: var(--Flashcord-TransMult-Fast, 125ms);
        }
        [class^="sprite_"]:hover, svg:hover {
            opacity: 0.8;
            scale: 1.1;
        }
        [class^="sprite_"]:active, svg:active {
            scale: 0.9;
        }
    }
}

[class^="messagesWrapper_"] {
    container-name: var(--Flashcord-JumpBars, FC-JumpBars);
    container-type: inline-size;
}

@container FC-JumpBars (min-width: 0px) {
    [class^="jumpToPresentBar_"] {
        width: fit-content;
        left: auto;
        right: 16px;
        animation: FlashCore-FadeIn_Bottom var(--Flashcord-AnimMult-Normal, 250ms) !important;
    }
    [class^="newMessagesBar_"] {
        width: fit-content;
        left: auto;
        right: 16px;
        animation: FlashCore-FadeIn_Top var(--Flashcord-AnimMult-Normal, 250ms) !important;
    }
    [class^="jumpToPresentBar_"] [class^="barButtonMain_"] {
        display: none;
    }
}


ol[class^="scrollerInner_"] {
    container-name: var(--FlashCore-ChatEdits, FC-ChatEdits);
    container-type: inline-size;
}
@container FC-ChatEdits (min-width: 0px) {
    /* Smooth Message Button Hover */
    [class^="message_"]:hover [class^="buttons_"] {
        opacity: 0.5 !important;
        animation: FlashCore-FadeIn 1s;
        transition-duration: var(--Flashcord-TransMult-Fast, 125ms) !important;
    }
    [class^="message_"] [class^="buttons_"]:hover {
        opacity: 1 !important;
    }

    /* Smooth MSG Hover */
    [class^="message_"] {
        transition-property: background-color;
        transition-duration: var(--Flashcord-TransMult-Normal, 250ms) !important;
    }

    /* Better Link Embeds */
    [id^="message-accessories-"]:has(article),
    [id^="message-accessories-"]:has([class^="inlineMediaEmbed_"]) {
        display: flex;
        flex-wrap: wrap;
    }
    [id^="message-accessories-"] [class^="inlineMediaEmbed_"] {
        flex: 1 1 0vw;
        align-self: center;
    }
    [id^="message-accessories-"] article {
        overflow: scroll;
        border-radius: var(--Flashcord-Border_Radius, 25px);
        align-self: unset;
        max-width: unset !important;
        flex: 1 1 25%;
        display: block;
        min-width: 256px;
        margin: 8px;
    }
    [class^="mediaAttachmentsContainer_"] {
        width: auto;
        height: auto;
        justify-content: center;
        margin-top: auto;
        margin-bottom: auto;
    }
    article:has([href^="https://sirio-network.com/flashcord/store"])::after { /* May cause Perf issues (?)*/
        content: var(--FlashLang-ChatEdits_StoreLink, "✅ Flashcord Store Link");
        display: block;
        white-space: pre-warp;
        width: 90%;
        background: rgba(0,155,255,0.25);
        border: 1px solid rgba(0,155,255,1);
        border-radius: var(--Flashcord-Border_Radius, 25px );
        padding: 1px;
        margin-left: 8px;
        margin-right: 8px;
        text-align: center;
        position: absolute;
        bottom: 1rem;
    }
    article:has([href^="https://sirio-network.com/flashcord/store"]) .grid_c7c4e6 { /* [!] FC-Wildcard_PerfNuker */
        margin-bottom: 2rem;
    }
    [id^="message-accessories-"]:has(article, [class^="inlineMediaEmbed_"]):has([class^="reactions_"]) {
        margin-bottom: 2rem;
    }
    [id^="message-accessories-"]:has(article, [class^="inlineMediaEmbed_"]) .reactions_b8dc93 { /* [!] FC-Wildcard_PerfNuker */
        position: absolute;
        translate: 0 1.75rem;
        bottom: 0;
    }
    [class^="gridContainer_"] {
        max-width: unset;
    }
    /*
    [class^="imageWrapper_"], [id^="message-accessories-"]:has(article) img {
        margin: auto;
        border-radius: var(--Flashcord-Border_Radius, 25px );
        max-width: unset !important;
        max-height: unset !important;
    }*/
}

/* [END] = Flashcord Beta == Major General Modifications [00] ChatIn CSS = */