/* Selection action bar */
.selection-action-bar {
    position: sticky;
    bottom: 0;
    background: var(--surface-section);
    border-top: 1px solid var(--border-color);
    padding: var(--space-2) var(--space-3);
    z-index: 100;
    animation: action-bar-slide-up 0.2s ease-out;
}

.selection-action-bar-main {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.selection-action-bar-select-all {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 0.85em;
    font-weight: bold;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.selection-action-bar-select-all-checkbox {
    cursor: pointer;
    margin: 0;
}

.selection-action-bar-count {
    font-size: 0.85em;
    font-weight: bold;
    color: var(--color-text);
    margin-right: var(--space-1);
}

.selection-action-bar-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85em;
    color: var(--color-chat-btn-text);
    font-weight: bold;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-2);
    white-space: nowrap;
}

.selection-action-bar-btn:hover {
    background: var(--surface-hover);
}

.selection-action-bar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.selection-action-bar-btn:disabled:hover {
    background: none;
}

.selection-action-delete:hover {
    color: var(--color-danger);
}

.selection-action-bar-close {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    color: var(--text-muted);
    margin-left: auto;
    padding: var(--space-1);
}

.selection-action-bar-close:hover {
    color: var(--color-text);
}

.selection-action-bar-hint {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

/* Hide drag hint on touch devices (no touch drag-and-drop) */
@media (pointer: coarse) {
    .selection-action-bar-hint.no-touch {
        display: none;
    }
}

@keyframes action-bar-slide-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating search popups — positioned by CommonPopup inside #comments-popup */
/* Override popup-close-btn absolute positioning inside comments popup header */
.comments-popup-actions .popup-close-btn {
  position: static;
}

/* Chevron icon shown while the docked chat is collapsed */
.comments-popup-actions .popup-close-btn svg {
  display: block;
}

/* Streaming indicator for AI comments */
.comment-content.streaming {
    min-height: 1.5em;
}

.streaming-dots {
    display: inline-flex;
    gap: 2px;
    font-size: 1.5em;
    line-height: 1;
}

.streaming-dots span {
    animation: streaming-bounce 1.4s infinite ease-in-out both;
}

.streaming-dots span:nth-child(1) {
    animation-delay: 0s;
}

.streaming-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.streaming-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes streaming-bounce {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* Blinking cursor inline at the end of streaming content */
.streaming-cursor {
    animation: streaming-blink 1s infinite;
    color: var(--text-primary);
    margin-left: 1px;
    font-weight: normal;
}

@keyframes streaming-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.review-hint {
    background: var(--surface-btn);
    color: var(--text-on-btn);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-2);
    font-size: var(--text-0);
    white-space: nowrap;
    z-index: var(--layer-important, 999);
    animation: review-hint-fade 3s ease-out forwards;
    pointer-events: none;
    box-shadow: var(--shadow-2, 0 2px 8px rgba(0,0,0,0.15));
}

@keyframes review-hint-fade {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; }
}

.topic-create-option {
    color: var(--link);
    font-style: italic;
}

li:hover .topic-create-option {
    text-decoration: underline;
}
