/* 
 * Grammar correction overlay styles
 * Provides styling for the real-time grammar and spelling correction feature
 */

/* Container for the grammar check component */
.grammar-check-container {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Style for textarea with grammar checking */
textarea.grammar-check {
    width: 100%;
    min-height: 150px;
    padding: 0.75rem;
    border: 1px solid var(--bs-gray-600);
    border-radius: 4px;
    background-color: var(--bs-gray-900);
    color: var(--bs-light);
    font-family: system-ui, -apple-system, sans-serif;
    resize: vertical;
    transition: border-color 0.2s ease-in-out;
}

textarea.grammar-check:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Status indicator for grammar checking */
.grammar-status-indicator {
    position: absolute;
    top: -24px;
    right: 0;
    padding: 4px 10px;
    font-size: 0.85rem;
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    border-radius: 15px;
    color: var(--bs-light);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.grammar-status-indicator:hover {
    background-color: var(--bs-gray-700);
}

.grammar-status-indicator i {
    font-size: 1rem;
}

/* Status indicator states */
.grammar-status-indicator.has-errors {
    color: var(--bs-danger);
    border-color: var(--bs-danger);
}

.grammar-status-indicator.has-suggestions {
    color: var(--bs-warning);
    border-color: var(--bs-warning);
}

.grammar-status-indicator.is-good {
    color: var(--bs-success);
    border-color: var(--bs-success);
}

/* Suggestions panel */
.grammar-suggestions-panel {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    width: 100%;
    max-width: 400px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--bs-gray-800);
    border: 1px solid var(--bs-gray-700);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 12px;
    z-index: 1000;
}

/* Sections within the suggestions panel */
.grammar-section {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bs-gray-700);
}

.grammar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.grammar-section h5 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
    color: var(--bs-light);
}

.grammar-section h6 {
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--bs-gray-200);
}

.grammar-stats {
    font-size: 0.85rem;
    color: var(--bs-gray-400);
}

/* Suggestion categories */
.suggestion-category {
    margin-top: 10px;
}

.suggestion-category ul {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 0.9rem;
}

.suggestion-category li {
    margin-bottom: 5px;
    color: var(--bs-gray-300);
}

/* Button for accepting changes */
.accept-corrections {
    display: block;
    margin-top: 10px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .grammar-suggestions-panel {
        max-width: 100%;
    }
}