:root {
    --radius-md: 8px;
    --radius-lg: 16px;
    --color-primary: #FFBE3C;
    --font-sm: 14px;
    --font-md: 16px;
    --font-lg: 18px;
}

.main-container {
    max-width: 1280px;
    margin: 80px auto;
    padding: 10px;
}

.loader__wrapper {
    position: fixed !important;
    inset: 0;
    background-color: #fff6;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1000;
    border-radius: inherit;
    height: 100% !important;
}

/* =================
tool style (START)
==================== */

.js-tool-container {
    min-height: 498px;
    height: 100%;
    box-shadow: 0px 2px 4px 0px #00000014;
    display: flex;
    flex-direction: column;
    border-radius: 0 0 16px 16px;
    width: 100%;

    /* tool header start */
    .js-tool-header {
        background-color: #313249;
        padding: 10px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        min-height: 50px;
        height: 100%;
        border-radius: 16px 16px 0px 0px;

        @media screen and (max-width:650px) {
            align-items: flex-start;
            flex-direction: column;
            padding: 12px;
        }

        /* input heading before result start */
        .js-input-heading {
            color: #FFFFFF;
            font-size: var(--font-lg);
            font-weight: 700;
            line-height: 22px;
            letter-spacing: 0%;
        }

        /* input heading before result end */

        /* after result start */
        .js-after-result {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;

            @media screen and (max-width:360px) {
                flex-wrap: wrap;
            }

            .js-spelling-mistake,
            .js-grammar-mistake,
            .js-punctuation-mistake {
                display: flex;
                align-items: center;
                gap: 4px;
                color: #FFFFFF;
                font-size: var(--font-md);
                font-weight: 400;
                line-height: 24px;
                position: relative;

                @media screen and (max-width:650px) {
                    font-size: 12px;
                }

                .rounded-cirlce {
                    height: 8px;
                    width: 8px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                }

                span {
                    font-size: var(--font-lg);
                    line-height: 27px;
                    font-weight: 700;

                    @media screen and (max-width:650px) {
                        font-size: var(--font-sm);
                        line-height: 18px;
                        font-weight: 600;
                    }
                }
            }
        }

        .js-after-mistake {
            @media screen and (max-width:650px) {
                min-width: 100%;
                width: 100%;
            }

            button {
                display: flex;
                align-items: center;
                justify-content: center;
                min-width: 162px;
                width: 100%;
                border-radius: var(--radius-md);
                border: 1px solid var(--color-primary);
                padding: 5px 12px;
                gap: 8px;
                background: #FFFFFF;

                span {
                    color: #262A2E;
                    font-size: var(--font-sm);
                    line-height: 24px;
                    font-weight: 400;
                }

                @media screen and (max-width:650px) {
                    min-width: 100%;
                    width: 100%;
                }
            }
        }

        /* after result end */
    }

    /* tool header end */

    /* tool body start */
    .js-tool-body {
        min-height: 378px;
        height: 100%;
        border-bottom: 1px solid #EBEBEB;
        padding: 20px;
        width: 100%;
        position: relative;

        .js-absolute-upload {
            position: absolute;
            z-index: 5;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            gap: 12px;
            justify-content: center;
            align-items: center;

            span {
                color: #656577;
                line-height: 26px;
                font-size: var(--font-lg);
                font-weight: 400;
                text-align: center;
            }

            .js-group-buttons {
                display: flex;
                align-items: center;
                gap: 12px;

                @media(max-width:370px) {
                    flex-wrap: wrap;
                }
            }

            label,
            button {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 6px;
                border: 1px solid #EBEBEB;
                color: #262A2E;
                font-size: var(--font-md);
                line-height: 24px;
                font-weight: 400;
                padding: 8px 14px;
                min-width: 152px;
                width: 100%;
                min-height: 40px;
                height: 100%;
                white-space: nowrap;
                border-radius: var(--radius-md);

                img {
                    min-width: 24px;
                    width: 24px;
                    height: 24px;
                }
            }

            p {
                font-size: var(--font-lg);
                line-height: 22px;
                font-weight: 400;
                color: #656577;
            }
        }

        .js-absolute-wordcounter {
            position: absolute;
            background-color: white;
            bottom: 0;
            left: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;

            /* word counter start */
            .js-word-counter {
                display: flex;
                flex-direction: column;
                align-items: start;
                gap: 2px;
                flex: 1;

                .js-counter-number {
                    color: #262A2E;
                    line-height: 20px;
                    font-size: var(--font-lg);
                    font-weight: 700;
                }

                .word-count-type {
                    margin: unset !important;

                    .word-count-circle {
                        display: flex !important;
                    }

                    span:nth-child(2) {
                        font-size: var(--font-md);
                        color: #656577;
                        line-height: 20px;
                        font-weight: 400;
                    }
                }
            }

            /* word counter end */

            /* clear btn start */
            .js-clear-btn {
                flex: 1;
                text-align: end;
            }

            /* clear btn end */
        }

        /* input textarea start */
        textarea,
        .js-output-result {
            overflow-y: auto;
            height: 338px;
            width: 100%;
            color: #262A2E;
            font-size: var(--font-lg);
            line-height: 28px;
            font-weight: 400;
            resize: none;
            border: 0px;
            outline: unset;
            white-space: pre-wrap;
            word-wrap: break-word;
            position: relative;

            .grammarCheck_new  {
                cursor: pointer;
            }

            .add,
            .delete,
            .remove,
            .deletion {
                color: #FFBE3C;
            }

            .spelling {
                color: #FF5858;
            }

            .addition,
            .modified {
                color: #4CB0F2;
            }

            @media screen and (max-width:768px) {
                padding-bottom: 48px;
            }
        }

        .js-suggestion-popup {
            box-shadow: 0px 0px 60px 0px #0000001A;
            background: #FFFFFF;
            display: flex;
            flex-direction: column;
            padding: 12px;
            border-radius: 12px;
            min-height: 118px;
            width: 224px;
            gap: 8px;

            span {
                color: #B3B7BC;
                font-size: 12px;
                line-height: 14px;
                font-weight: 400;
            }

            .js-mistakes-result {
                display: flex;
                align-items: center;
                gap: 6px;

                .js-correct-mistake,
                .js-mistake-response {
                    font-size: 16px;
                    line-height: 20px;
                    font-weight: 400;
                }

                span:nth-child(1) {
                    color: #FF5858;
                    text-decoration: line-through;
                }

                span:nth-child(3) {
                    color: #30B500;
                }
            }

            .js-btn-group {
                button {
                    padding: 6px 12px;
                    border-radius: 8px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    gap: 4px;
                    font-size: var(--font-sm);
                    line-height: 20px;
                    font-weight: 500;
                }

                button:nth-child(1) {
                    background: #313249;
                    color: #FFFFFF;
                }

                button:nth-child(2) {
                    border: 1px solid #EBEBEB;
                    background: #F9F9F9;
                    color: #262A2E;
                }
            }
        }

        /* input textarea end */
    }

    /* tool body end */

    /* js-tool-footer */
    .js-tool-footer {
        display: flex;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        height: 100%;

        @media screen and (max-width:768px) {
            flex-direction: column;

            .js-clear-btn {
                display: none;
            }

            &:has(.output-btn-container:not(.d-none)) {
                gap: 16px;
            }
        }

        /* word counter start */
        .js-word-counter {
            display: flex;
            flex-direction: column;
            align-items: start;
            gap: 2px;
            flex: 1;

            .js-counter-number {
                color: #262A2E;
                line-height: 20px;
                font-size: var(--font-lg);
                font-weight: 700;
            }

            .word-count-type {
                margin: unset !important;

                .word-count-circle {
                    display: flex !important;
                }

                span:nth-child(2) {
                    font-size: var(--font-md);
                    color: #656577;
                    line-height: 20px;
                    font-weight: 400;
                }
            }
        }

        /* word counter end */

        /* submit start */
        .submit-btn-wrapper {
            flex: 1;

            @media screen and (max-width:768px) {
                width: 100%;
            }

            .js-submit-btn {
                background: var(--color-primary);
                display: flex;
                align-items: center;
                justify-content: center;
                margin: 0 auto;
                border: 0px;
                border-radius: var(--radius-md);
                gap: 6px;
                padding: 8px 14px;
                min-height: 40px;
                cursor: pointer;
                height: 100%;
                font-size: var(--font-md);
                line-height: 24px;
                font-weight: 500;
                color: #262A2E;
                white-space: nowrap;
                transition: all ease-in 100ms;

                &:hover {
                    background: #F7B42D;
                }

                @media screen and (max-width:768px) {
                    width: 100%;
                }
            }
        }

        /* submit end */

        .js-actions-btn {
            flex: 1;
            display: flex;
            justify-content: flex-end;
            align-items: center;

            @media screen and (max-width:768px) {
                width: 100%;
            }

            button {
                background: transparent;
                border: 0px;
            }

            .output-btn-container {
                @media screen and (max-width:768px) {
                    width: 100%;
                }

                .js-btn-group button {
                    img {
                        height: 24px;
                        width: 24px;
                    }

                    @media screen and (max-width:768px) {
                        width: 100%;
                    }
                }
            }

            .output-btn-container .js-btn-group button {
                border-right: 1px solid #EBEBEB;
                padding-right: 12px;
            }

            .output-btn-container .js-btn-group button:nth-last-child(1) {
                border-right: 0px;
                padding-right: 0px;
            }
        }
    }
}

/* ========================
    tooltip css (START)
========================== */
[data-tooltip] {
    position: relative;

    &::before,
    &.initial::before {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 40%;
        transform: translateX(-40%) translateY(0) scale(0);
        width: max-content;
        font-size: 12px;
        font-weight: 400;
        line-height: 16px;
        text-align: center;
        border-radius: 6px;
        background-color: #555;
        color: #fff;
        padding: 5px 8px;
        min-width: 54px;
        transition: all 100ms;
        z-index: 10;
    }

    &::after,
    &.initial::after {
        content: '';
        position: absolute;
        bottom: 100%;
        left: 40%;
        transform: translateX(-40%) translateY(-200%) scale(0);
        border: 5px solid transparent;
        border-top-color: var(--dark);
        transition: all 100ms;
    }

    &:hover::before,
    &.initial::before,
    &:hover::after,
    &.initial::after {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* ========================
    tooltip css (END)
========================== */

/* =================
tool style (END )
==================== */

button {
    background: transparent;
    border: 0px;
}

.js-btn-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.leading-0 {
    line-height: 0;
}

.pointer-events-none {
    pointer-events: none;
    opacity: 0.7;
}

/* =========================================
media query + custom responsive classes (START)
========================================= */
@media only screen and (max-width: 800px) {
    .word-count-circle {
        display: flex !important;
    }
}

@media screen and (min-width:769px) {
    .d-lg-none {
        display: none !important;
    }
}

@media screen and (max-width:768px) {
    .d-md-none {
        display: none !important;
    }
}

/* =========================================
media query + custom responsive classes (END)
=========================================== */