/*
 * Frontend CSS for AI SEO Autofill Plugin
 * 
 * Styles for shortcodes, widgets, and frontend display elements.
 * Includes responsive design and accessibility considerations.
 * 
 * @package AI_SEO_Autofill
 * @subpackage Assets
 * @since 1.0.0
 */

/* ==========================================================================
   AI Summary Shortcode Styles
   ========================================================================== */

.ai-summary {
    margin: 1.5em 0;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    clear: both;
}

/* Minimal Style */
.ai-summary.style-minimal {
    background: #f9f9f9;
    padding: 15px;
    border-left: 3px solid #0073aa;
    color: #333;
    font-style: italic;
}

/* Card Style */
.ai-summary.style-card {
    background: #ffffff;
    padding: 20px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #444;
}

.ai-summary.style-card::before {
    content: "📝 AI Summary";
    display: block;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge Style */
.ai-summary.style-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Highlight Style */
.ai-summary.style-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-left: 4px solid #ffc107;
    border-radius: 0 4px 4px 0;
    position: relative;
    overflow: hidden;
}

.ai-summary.style-highlight::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffc107, #fd7e14);
}

/* Quote Style */
.ai-summary.style-quote {
    background: #f8f9fa;
    color: #6c757d;
    padding: 20px 25px;
    border-left: 4px solid #6c757d;
    font-style: italic;
    position: relative;
    margin: 2em 0;
}

.ai-summary.style-quote::before {
    content: "\201C";
    font-size: 60px;
    color: #dee2e6;
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: Georgia, serif;
    line-height: 1;
}

.ai-summary.style-quote::after {
    content: "\201D";
    font-size: 60px;
    color: #dee2e6;
    position: absolute;
    bottom: -35px;
    right: 15px;
    font-family: Georgia, serif;
    line-height: 1;
}

/* ==========================================================================
   Widget Styles
   ========================================================================== */

.widget_ai_summary_widget {
    background: transparent;
}

.widget_ai_summary_widget .widget-title {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.widget_ai_summary_widget .ai-summary {
    margin: 0;
    font-size: 13px;
}

.widget_ai_summary_widget .ai-summary.style-card {
    border: none;
    box-shadow: none;
    background: #f8f9fa;
    padding: 15px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 768px) {
    .ai-summary {
        margin: 1em 0;
        font-size: 13px;
    }
    
    .ai-summary.style-card {
        padding: 15px;
    }
    
    .ai-summary.style-badge {
        padding: 12px 15px;
        border-radius: 20px;
    }
    
    .ai-summary.style-quote {
        padding: 15px 20px;
        margin: 1.5em 0;
    }
    
    .ai-summary.style-quote::before,
    .ai-summary.style-quote::after {
        font-size: 40px;
    }
}

@media screen and (max-width: 480px) {
    .ai-summary {
        font-size: 12px;
    }
    
    .ai-summary.style-card::before {
        font-size: 11px;
    }
    
    .widget_ai_summary_widget .ai-summary {
        font-size: 12px;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.ai-summary:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ai-summary.style-minimal {
        border-left-width: 4px;
        background: #ffffff;
        color: #000000;
    }
    
    .ai-summary.style-card {
        border-width: 2px;
        border-color: #000000;
    }
    
    .ai-summary.style-badge {
        background: #000000;
        color: #ffffff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ai-summary {
        transition: none;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .ai-summary {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .ai-summary.style-badge {
        background: white !important;
        color: black !important;
        border: 2px solid black !important;
    }
    
    .ai-summary::before,
    .ai-summary::after {
        display: none !important;
    }
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .ai-summary.style-minimal {
        background: #2d3748;
        color: #e2e8f0;
        border-left-color: #4299e1;
    }
    
    .ai-summary.style-card {
        background: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .ai-summary.style-card::before {
        color: #4299e1;
    }
    
    .ai-summary.style-highlight {
        background: #2d3748;
        color: #f7fafc;
        border-left-color: #ed8936;
    }
    
    .ai-summary.style-quote {
        background: #2d3748;
        color: #a0aec0;
        border-left-color: #718096;
    }
    
    .ai-summary.style-quote::before,
    .ai-summary.style-quote::after {
        color: #4a5568;
    }
    
    .widget_ai_summary_widget .widget-title {
        color: #e2e8f0;
        border-bottom-color: #4299e1;
    }
}

/* ==========================================================================
   Animation and Transitions
   ========================================================================== */

.ai-summary {
    transition: all 0.3s ease;
}

.ai-summary:hover {
    transform: translateY(-1px);
}

.ai-summary.style-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.ai-summary.style-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Loading state for dynamic content */
.ai-summary.loading {
    opacity: 0.6;
    position: relative;
}

.ai-summary.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0073aa;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.ai-summary-center {
    text-align: center;
}

.ai-summary-right {
    text-align: right;
}

.ai-summary-small {
    font-size: 12px;
}

.ai-summary-large {
    font-size: 16px;
}

.ai-summary-no-margin {
    margin: 0;
}

.ai-summary-compact {
    padding: 10px;
}

.ai-summary-spacious {
    padding: 25px;
}