/**
 * AgentHarmony AI Public Styles
 * Frontend styles for AI Assistant and other public features
 */

/* Base Styles */
.ah-ai-assistant,
.ah-prompt-library,
.ah-tutorials,
.ah-usage-stats {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* AI Assistant Styles */
.ah-ai-assistant {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ah-assistant-header {
    text-align: center;
    margin-bottom: 30px;
}

.ah-assistant-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2rem;
    font-weight: 600;
}

.ah-assistant-header p {
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0;
}

/* Usage Stats */
.ah-usage-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ah-usage-item {
    text-align: center;
}

.ah-usage-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.ah-usage-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #007cba;
}

/* Form Styles */
.ah-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ah-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.ah-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.ah-form-group {
    margin-bottom: 15px;
}

.ah-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.ah-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    background-color: #fff;
}

.ah-form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.ah-form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

/* Premium Badge */
.ah-premium-badge {
    background: #ffc107;
    color: #212529;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 5px;
}

/* Prompt Preview */
.ah-prompt-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.ah-prompt-preview h4 {
    margin-top: 0;
    color: #495057;
    font-size: 1.1rem;
}

.ah-prompt-content {
    margin-bottom: 10px;
    font-style: italic;
    color: #6c757d;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.ah-prompt-compliance {
    font-size: 12px;
    color: #28a745;
    font-weight: 500;
}

/* Buttons */
.ah-generate-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    text-decoration: none;
}

.ah-generate-btn:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.ah-generate-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.ah-action-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    text-decoration: none;
    display: inline-block;
}

.ah-action-btn:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

.ah-save-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.ah-save-btn:hover {
    background: #138496;
}

/* Spinner */
.ah-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: ah-spin 1s linear infinite;
}

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

/* Results Section */
.ah-results {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ah-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.ah-results-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.ah-results-actions {
    display: flex;
    gap: 10px;
}

/* Content Editor */
.ah-content-editor {
    margin-bottom: 20px;
}

.ah-content-textarea {
    min-height: 200px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

.ah-content-stats {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 12px;
    color: #6c757d;
}

.ah-final-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Compliance Styles */
.ah-compliance-pass {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.ah-compliance-report {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
}

.ah-compliance-score {
    margin-bottom: 15px;
}

.ah-compliance-score h4 {
    margin: 0;
    color: #495057;
}

.ah-compliance-violations ul,
.ah-compliance-recommendations ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ah-compliance-violations li {
    margin: 8px 0;
    padding: 8px;
    border-radius: 4px;
}

.ah-severity-high {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.ah-severity-medium {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.ah-severity-low {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.ah-compliance-recommendations {
    background: #e2e3e5;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
}

.ah-compliance-recommendations h4 {
    margin-top: 0;
    color: #495057;
}

/* Error and Success Messages */
.ah-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-top: 20px;
}

.ah-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-top: 20px;
}

/* Prompt Library Styles */
.ah-prompt-library {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ah-prompt-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ah-prompt-filters .ah-form-group {
    margin-bottom: 0;
    flex: 1;
}

.ah-prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.ah-prompt-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.15s ease-in-out;
}

.ah-prompt-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ah-prompt-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ah-prompt-category {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.ah-prompt-content {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.ah-prompt-actions {
    display: flex;
    gap: 10px;
}

.ah-copy-prompt {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.ah-copy-prompt:hover {
    background: #218838;
    color: white;
    text-decoration: none;
}

/* Tutorial Library Styles */
.ah-tutorials {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ah-tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ah-tutorial-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.15s ease-in-out;
}

.ah-tutorial-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ah-tutorial-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.ah-tutorial-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #6c757d;
}

.ah-tutorial-difficulty {
    background: #17a2b8;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
}

.ah-tutorial-time {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.ah-tutorial-excerpt {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.ah-tutorial-link {
    background: #007cba;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.15s ease-in-out;
}

.ah-tutorial-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ah-ai-assistant,
    .ah-prompt-library,
    .ah-tutorials {
        padding: 15px;
    }
    
    .ah-form-row {
        grid-template-columns: 1fr;
    }
    
    .ah-usage-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .ah-results-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .ah-results-actions {
        justify-content: center;
    }
    
    .ah-final-actions {
        flex-direction: column;
    }
    
    .ah-prompt-filters {
        flex-direction: column;
    }
    
    .ah-prompt-grid {
        grid-template-columns: 1fr;
    }
    
    .ah-tutorial-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ah-assistant-header h2 {
        font-size: 1.5rem;
    }
    
    .ah-form-section {
        padding: 15px;
    }
    
    .ah-prompt-item,
    .ah-tutorial-item {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .ah-usage-stats,
    .ah-results-actions,
    .ah-final-actions,
    .ah-prompt-actions {
        display: none;
    }
    
    .ah-ai-assistant,
    .ah-prompt-library,
    .ah-tutorials {
        max-width: none;
        padding: 0;
    }
    
    .ah-form-section,
    .ah-results {
        border: none;
        box-shadow: none;
        padding: 0;
        margin-bottom: 20px;
    }
}
