/**
 * MAI Smart Assistant - Gutenberg Editor Styles
 *
 * @package MAI_SMART_ASSISTANT
 * @since 1.0.0
 */

/* Sidebar Panel Styling */
.edit-post-sidebar .mai-smart-assistant-panel {
    padding: 16px;
}

.edit-post-sidebar .mai-smart-assistant-panel .components-panel__body {
    padding: 0;
}

/* Button Styling */
.edit-post-sidebar .mai-smart-assistant-panel .components-button {
    justify-content: center;
}

.edit-post-sidebar .mai-smart-assistant-panel .components-button.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

/* Textarea Styling */
.edit-post-sidebar .mai-smart-assistant-panel .components-textarea-control textarea {
    min-height: 100px;
}

/* Notice Styling */
.edit-post-sidebar .mai-smart-assistant-panel .components-notice {
    margin: 0 0 16px 0;
}

.edit-post-sidebar .mai-smart-assistant-panel .components-notice ul {
    list-style: disc;
    margin-top: 10px;
}

.edit-post-sidebar .mai-smart-assistant-panel .components-notice li {
    margin-bottom: 8px;
}

/* Title Suggestions */
.mai-smart-assistant-title-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: background-color 0.2s ease;
}

.mai-smart-assistant-title-suggestion:hover {
    background-color: #f8f9fa;
}

.mai-smart-assistant-title-suggestion-text {
    flex: 1;
    margin-right: 10px;
}

/* Stats Display */
.mai-smart-assistant-stats {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.mai-smart-assistant-stats p {
    margin: 4px 0;
}

/* Loading State */
.mai-smart-assistant-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mai-smart-assistant-loading .components-spinner {
    margin-right: 10px;
}

/* Template Select */
.mai-smart-assistant-panel .components-select-control {
    margin-bottom: 16px;
}

/* Action Buttons Group */
.mai-smart-assistant-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.mai-smart-assistant-actions .components-button {
    width: 100%;
}

/* Result Preview */
.mai-smart-assistant-result-preview {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    margin: 16px 0;
    max-height: 300px;
    overflow-y: auto;
}

.mai-smart-assistant-result-preview pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    font-size: 13px;
    margin: 0;
}

/* Error State */
.mai-smart-assistant-error {
    color: #d63638;
    padding: 12px;
    background: #fcf0f1;
    border: 1px solid #f1aeb5;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* Success State */
.mai-smart-assistant-success {
    color: #00701a;
    padding: 12px;
    background: #edfaef;
    border: 1px solid #68de7c;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 782px) {
    .edit-post-sidebar .mai-smart-assistant-panel {
        padding: 12px;
    }

    .mai-smart-assistant-panel .components-button {
        font-size: 13px;
        padding: 6px 12px;
    }
}
