/* Grammar checker panels — equal-height boxes */
.grammar-tool-row {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.grammar-tool-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.grammar-panel {
    text-align: left;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
}

.grammar-panel-label,
.grammar-panel-head {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #121212;
    text-align: center;
    padding: 10px 14px;
    margin: 0;
    background: #f4f6f7;
    border: 1px solid #ced4da;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    flex-shrink: 0;
}

.grammar-panel .grammar-input,
.grammar-panel .grammar-output {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    flex: 1 1 auto;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
    overflow-y: auto;
    box-sizing: border-box;
}

#words.grammar-input,
.grammar-input {
    text-align: left !important;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 24px;
    resize: none;
    display: block;
    width: 100%;
}

#rewords.grammar-output,
.grammar-output {
    text-align: left !important;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: #fff;
    line-height: 24px;
    display: block;
    width: 100%;
    cursor: text;
}

#rewords.grammar-output:focus,
.grammar-output:focus {
    outline: none;
    border-color: #fe5196;
    box-shadow: 0 0 0 2px rgba(254, 81, 150, 0.15);
}

.grammar-output:empty::before {
    content: 'Corrected text will appear here…';
    color: #a4a4a4;
    pointer-events: none;
}

.grammar-changed {
    color: #ec0a0a !important;
}

@media (max-width: 991px) {
    .grammar-tool-row > [class*="col-"] {
        width: 100%;
    }
}
