/* Citation Suggestions Styling */

/* Container for suggestions */
.citation-suggestions {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    max-width: 400px;
    z-index: 1000;
}

/* Suggestion list */
.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Individual suggestion item */
.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    position: relative;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
    overflow: hidden;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f0f7ff;
}

/* Confidence indicator bar */
.confidence-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #4CAF50, #8BC34A);
    transition: width 0.3s ease;
}

/* Text area with citation suggestions enabled */
textarea.citation-enabled {
    border: 1px solid #ccc;
    padding: 10px;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

textarea.citation-enabled:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* Animated typing indicator */
@keyframes typing-pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.citation-typing-indicator {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 16px;
    height: 16px;
    background-color: #4CAF50;
    border-radius: 50%;
    display: none;
    animation: typing-pulse 1s infinite;
}

.citation-enabled.is-typing .citation-typing-indicator {
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .citation-suggestions {
        max-width: 90vw;
    }
    
    .suggestion-item {
        padding: 10px;
        font-size: 16px; /* Larger text for touch devices */
    }
}