/**
 * AIOHM Q&A Generator Shortcode Styles
 * Frontend styles for the [aiohm_qa_generator] shortcode
 */

:root {
    --ohm-primary: #457d58;
    --ohm-dark: #272727;
    --ohm-light-accent: #cbddd1;
    --ohm-muted-accent: #7d9b76;
    --ohm-light-bg: #EBEBEB;
    --ohm-dark-accent: #1f5014;
    --ohm-font-primary: 'Montserrat', 'Montserrat Alternates', sans-serif;
    --ohm-font-secondary: 'PT Sans', sans-serif;
}

/* Q&A Generator Container */
.aiohm-qa-generator-wrapper {
    margin: 20px 0;
    font-family: var(--ohm-font-secondary);
}

.aiohm-qa-generator-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.aiohm-qa-description {
    font-size: 16px;
    color: var(--ohm-dark);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Generate Button */
.aiohm-qa-generate-btn {
    background: linear-gradient(135deg, var(--ohm-primary) 0%, var(--ohm-dark-accent) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: var(--ohm-font-primary);
}

.aiohm-qa-generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(69, 125, 88, 0.3);
}

.aiohm-qa-generate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Results Container */
.aiohm-qa-results {
    margin-top: 20px;
    text-align: left;
}

/* Loading State */
.aiohm-qa-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    color: var(--ohm-muted-accent);
    font-size: 14px;
}

.aiohm-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--ohm-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Q&A Sample Container */
.aiohm-qa-sample-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--ohm-light-bg);
}

/* Q&A Header */
.aiohm-qa-header {
    background: linear-gradient(135deg, var(--ohm-primary) 0%, var(--ohm-dark-accent) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.aiohm-qa-icon {
    font-size: 20px;
}

.aiohm-qa-header h4 {
    margin: 0;
    font-size: 18px;
    font-family: var(--ohm-font-primary);
    font-weight: 600;
}

/* Question and Answer Sections */
.aiohm-qa-question,
.aiohm-qa-answer {
    padding: 20px;
    border-bottom: 1px solid var(--ohm-light-bg);
}

.aiohm-qa-answer {
    border-bottom: none;
    background: #fafcfb;
}

.aiohm-qa-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-family: var(--ohm-font-primary);
    color: var(--ohm-dark-accent);
}

.aiohm-qa-q-icon,
.aiohm-qa-a-icon {
    font-size: 16px;
}

.aiohm-qa-content {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--ohm-light-accent);
    line-height: 1.6;
    font-size: 15px;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.aiohm-qa-answer .aiohm-qa-content {
    border-left-color: var(--ohm-dark-accent);
    background: #f8faf9;
}

/* Formatted Answer Content */
.aiohm-qa-answer-formatted h1,
.aiohm-qa-answer-formatted h2,
.aiohm-qa-answer-formatted h3 {
    font-family: var(--ohm-font-primary);
    color: var(--ohm-dark-accent);
    margin: 16px 0 12px 0;
    line-height: 1.3;
}

.aiohm-qa-answer-formatted h1 { font-size: 1.5em; }
.aiohm-qa-answer-formatted h2 { font-size: 1.3em; }
.aiohm-qa-answer-formatted h3 { font-size: 1.2em; }

.aiohm-qa-answer-formatted p {
    margin: 12px 0;
    line-height: 1.6;
}

.aiohm-qa-answer-formatted strong {
    color: var(--ohm-dark-accent);
    font-weight: 600;
}

.aiohm-qa-answer-formatted em {
    font-style: italic;
    color: var(--ohm-muted-accent);
}

.aiohm-qa-answer-formatted br {
    line-height: 1.8;
}

/* Error State */
.aiohm-qa-error {
    background: #fee;
    color: #c33;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #c33;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .aiohm-qa-generator-container {
        margin: 0 15px;
    }
    
    .aiohm-qa-question,
    .aiohm-qa-answer {
        padding: 15px;
    }
    
    .aiohm-qa-header {
        padding: 12px 15px;
    }
    
    .aiohm-qa-header h4 {
        font-size: 16px;
    }
}