/* Prompt History styles using our design system */

.saiap-prompt-history {
    margin-top: 16px;
}

.saiap-prompt-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.saiap-history-prompt {
    text-align: left;
    white-space: normal;
    height: auto;
    min-height: 48px;
    padding: 8px 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.saiap-history-prompt:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    max-height: 200px;
}

.saiap-prompt-posts {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    border-top: 1px solid var(--neutral-border);
    padding-top: 6px;
    width: 100%;
}

.saiap-prompt-timestamp {
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-tertiary, #6e7781);
    font-style: italic;
}

/* Highlight effect for form when a prompt is selected */
.highlight-form {
    animation: form-highlight 1s ease;
}

@keyframes form-highlight {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 0, 132, 255), 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--primary-rgb, 0, 132, 255), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb, 0, 132, 255), 0);
    }
}

#saiap-all-prompts-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    background-color: #fff;
    z-index: 100000;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

#saiap-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99999;
}

#saiap-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saiap-all-prompts-list {
    margin-top: 16px;
    overflow-y: auto;
}

.saiap-prompt-item {
    padding: 16px;
    border-bottom: 1px solid var(--neutral-border);
    margin-bottom: 16px;
}

.saiap-prompt-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.saiap-prompt-text {
    margin-bottom: 8px;
}

.saiap-prompt-text p {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.saiap-prompt-meta {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
} 