/* Empty chat state — feature discovery cards */
#no-comments {
    padding: 24px 16px;
}

.feature-cards-title {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.9em;
    text-align: center;
}

.feature-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    padding: 14px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2);
    background: var(--surface-section);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature-card-dismiss {
    position: absolute;
    top: 4px;
    right: 6px;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--radius-1);
}

.feature-card-dismiss:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.feature-card-icon {
    font-size: 1.4em;
}

.feature-card-title {
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card-description {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.85em;
}

.feature-card-action {
    align-self: flex-start;
    margin-top: 4px;
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2);
    background: var(--surface-btn);
    color: var(--text-on-btn);
    font-size: 0.85em;
    cursor: pointer;
}

.feature-card-action:hover {
    background: var(--surface-hover);
}

.feature-card-guide-link {
    font-size: 0.8em;
    color: var(--text-muted);
    text-decoration: underline;
}

.chat-empty-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
}

.chat-empty-restore-btn {
    border: 1px solid var(--border-color);
    background: var(--surface-btn);
    color: var(--text-muted);
    border-radius: var(--radius-round);
    width: 20px;
    height: 20px;
    line-height: 1;
    cursor: pointer;
    font-size: 0.75em;
}

.chat-empty-restore-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.creative-history-toast-container {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    display: grid;
    gap: 8px;
}

.creative-history-undo-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 40px));
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-3);
    background: var(--surface-raised);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
}

.creative-history-undo-toast .creative-history-revert {
    margin-top: 0;
    white-space: nowrap;
}

.creative-history-undo-dismiss {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

.comment-agent-model-editor {
    padding: var(--space-2);
    border-top: 1px solid var(--color-border);
}

.comment-agent-model-editor label,
.comment-agent-model-editor input[type="text"],
.comment-agent-model-editor select {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.comment-agent-model-editor p {
    overflow-wrap: anywhere;
    margin: var(--space-1) 0;
    color: var(--text-muted);
    font-size: var(--text-0);
}

/* Content extension controls share the existing action strip without adding a row. */
.comment-content-action-controls {
    position: absolute;
    bottom: 0.2em;
    left: 0.5em;
    right: 0.2em;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.comment-content-action-controls button {
    font-size: 0.8125rem;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comments-loading {
    padding: 16px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
}

.comments-loading .creative-loading-indicator {
    margin-left: 0;
}

.comments-popup-header,
.creative-tree-title {
    position: relative;
}

.document-header-progress {
    display: none;
}

.creative-document-view .document-header-progress {
    display: contents;
}

.creative-header-progress {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 4px;
}

.creative-header-progress::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(to right,
        var(--color-active) var(--creative-header-progress),
        var(--border-color) var(--creative-header-progress));
}

.creative-header-progress:focus-visible {
    outline: 1px solid var(--color-active);
    outline-offset: 1px;
}

.creative-header-progress:is(:hover, :focus-visible)::after {
    content: attr(data-progress-tooltip);
    position: absolute;
    z-index: 1;
    inset-inline-end: 0;
    top: 100%;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-text);
    background: var(--surface-hover);
    font-size: 0.75rem;
}
