.tool .container-right {
    max-width: 970px;
    width: 100%;
}

.grammar-tool-input-section {
    height: 360px;
}

.submit-btn-wrapper {
    display: flex;
    justify-content: center;
}

.upload_file_box_btn {
    border: 1px solid transparent;
    position: relative;
    border-radius: 4px;
    background: #fff;
}

.upload_file_box_btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;

    background: repeating-linear-gradient(138deg,
            var(--color-primary-purple) 0 3px,
            transparent 3px 7px);

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);

    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
}

.grammar-input-textarea {
    height: 300px !important;
}

.has-results .grammar-input-textarea {
    height: 430px !important;
}



.grammarCheck_new {
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    font-weight: 600 !important;
}

.grammarCheck_new.highlight-off {
    font-weight: unset !important;
}

.tool {
    row-gap: 10px;
}

.grammarCheck_new.spelling {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-bottom: 2px solid #10B981 !important;
    color: black !important;
    padding: 0px 4px;
    line-height: 22px;
    font-size: 16px;
}

.grammarCheck_new.modified {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-bottom: 2px solid #EF4444 !important;
    color: black !important;
    padding: 0px 4px;
    line-height: 22px;
    font-size: 16px;
}

.grammarCheck_new.addition,
.grammarCheck_new.deletion {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-bottom: 2px solid #F59E0B !important;
    color: black !important;
    padding: 0px 4px;
    line-height: 22px;
    font-size: 16px;
}

.spelling,
.modified,
.addition,
.deletion {
    font-weight: 400;
    font-size: 16px;
    line-height: 30px;
}

.grammar-section-container a {
    color: var(--color-light-purple);
}

.grammar-section-container a:hover {
    color: var(--color-light-green);
}

.grammar-section-container li {
    margin-left: 30px;
    line-height: 1.8;
    font-size: var(--font-size-default);
    overflow-wrap: break-word;
}

.result-box {
    overflow-y: scroll;
}

.tooltip_main {
    position: absolute;
    min-width: 150px;
    max-width: 250px;
    max-height: 200px;
    z-index: 6000;
    box-shadow: 0px 5px 30px -10px #999;
    background: #fff;
    padding: 5px;
    white-space: nowrap !important;
    border-radius: 5px;
    overflow-y: scroll;
}

.tooltip_main strong {
    font-size: var(--font-size-small);
    white-space: break-spaces;
}

.tooltip_main p {
    font-size: var(--font-size-small);
    line-height: 1;
    white-space: break-spaces;
    margin: 0;
}

.tooltip_main b {
    font-weight: 0;
    font-size: var(--font-size-small);
    cursor: pointer;
}

.tooltip_main::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    background-color: #F5F5F5;
}

.tooltip_main::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #FFF;
    background-image: -webkit-gradient(linear, 40% 0%, 75% 84%, from(#0bd2aa), to(#0bd2aa), color-stop(.6, #0bd2aa));
}

.tooltip_main>span {
    cursor: pointer;
    color: #8172d5 !important;
}

.tooltip_main span.green_corrected {
    background: #f7f7f7 !important;
    color: #08a751 !important;
    border-bottom: unset;
    padding: 2px 6px;
}

.tooltip_main>.line {
    float: left;
    width: 140px;
    height: 20px;
    margin-top: 12px;
    background-image: linear-gradient(90deg, #F4F4F4 0px, rgba(229, 229, 229, 0.8) 40px, #F4F4F4 80px);
    background-size: 600px;
}

.tooltip_main .line {
    width: 100%;
}

.tooltip_main .line~.line {
    background-color: #ddd;
}

.justify-center-btn {
    align-items: center !important;
}



/* Two-Column Layout styling for Results Sidebar */
.tool.has-results {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 20px;
}

.tool.has-results .grammar-tool-input-section {
    height: 100%;
    overflow: visible;
}

.tool.has-results .container-right {
    flex: 1;
    width: 66% !important;
    overflow: visible;
    height: 494px;
}

/* .tool.has-results .grammar-checker-submit {
    display: none !important;
} */

.grammar-results-sidebar {
    width: 32%;
    background: #ffffff;
    border: 1px solid #C7CBD7;
    border-radius: 6px;
    /* padding: 20px; */
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 494px;
}

.sidebar-header-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 16px;
}

/* .sidebar-header-badges button:nth-child(-n+3) {
    flex-grow: 1;
} */

.sidebar-badge {
    background: #F7F7F7;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 400;
    color: #171618;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.sidebar-badge:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.sidebar-badge.active {
    border-color: #000000;
}

.sidebar-badge .count {
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    color: #374151;
}


.red-count {
    color: #FF767A !important;
}

.green-count {
    color: #13C39C !important;
}

.orange-count {
    color: #F2B24C !important;
}

.sidebar-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-top: 1px solid #C7CBD7;
    border-bottom: 1px solid #C7CBD7;
    margin-bottom: 16px;
}

.sidebar-subtitle {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.sidebar-subtitle .text {
    color: #808080;
}

.sidebar-correct-all-btn {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.sidebar-correct-all-btn:hover {
    background: #1F2937;
}

.sidebar-cards-list {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 305px;
    margin-bottom: 20px;
}

.sidebar-cards-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-cards-list::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}

.sidebar-error-card {
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: left;
    cursor: pointer;
}

.sidebar-error-card:hover {
    background: #F3F4F6;
    border-color: #E5E7EB;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.sidebar-error-card .card-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-error-card .card-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.sidebar-error-card .card-label {
    font-size: 13px;
    color: #9CA3AF;
    font-weight: 500;
}

.sidebar-error-card .card-body-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 8px;
    background-color: #ffffff;
    border-radius: 4px;
}

.sidebar-error-card .card-original {
    font-size: 15px;
    color: #4B5563;
}

.sidebar-error-card .card-arrow {
    font-size: 14px;
    color: #9CA3AF;
}

.sidebar-error-card .card-suggestion-btn {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

/* .sidebar-error-card .card-suggestion-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    color: #000000;
} */



.grammar-input-textarea span {
    transition: ease;
}

.temp-corrected-highlight {
    border: 1px solid rgba(129, 114, 213, 0.4);
}

@media screen and (max-width: 786px) {
    .grammar-tool-footer {
        justify-content: start;
        flex-wrap: nowrap !important;
    }
}
@media screen and (max-width: 991px) {
    .tool.has-results {
        flex-direction: column;
    }

    .tool.has-results .grammar-tool-input-section {
        width: 100% !important;
    }

    .tool.has-results .grammar-results-sidebar {
        width: 100%;
        max-height: 100%;
    }
    .tool.has-results .container-right{
        width: 100% !important;
    }
}
@media (min-width:991px) {
    .tool.has-results{
        margin-bottom: 50px;
    }
}