/* SEO Optimizer Pro - Frontend CSS */

/* Structured Data Enhancements */
.seo-enhanced-content {
    position: relative;
}

/* FAQ Schema Styling */
.seo-faq-item {
    margin: 20px 0;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
}

.seo-faq-question {
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    position: relative;
}

.seo-faq-question::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    transition: transform 0.3s ease;
}

.seo-faq-question.active::after {
    transform: translateY(-50%) rotate(45deg);
}

.seo-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.seo-faq-answer.active {
    padding: 15px 20px;
    max-height: 500px;
}

/* How-to Schema Styling */
.seo-howto-steps {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.seo-howto-step {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    position: relative;
    padding-left: 60px;
}

.seo-howto-step::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: 15px;
    top: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2271b1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.seo-howto-steps {
    counter-reset: step-counter;
}

.seo-howto-step-title {
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1d2327;
}

.seo-howto-step-description {
    margin: 0;
    color: #646970;
    line-height: 1.5;
}

/* Image Optimization Indicators */
.seo-optimized-image {
    position: relative;
}

.seo-optimized-image::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    background: #00a32a;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.seo-optimized-image:hover::after {
    opacity: 1;
}

/* Reading Time Indicator */
.seo-reading-time {
    display: inline-block;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #646970;
    margin: 10px 0;
}

.seo-reading-time::before {
    content: '🕒';
    margin-right: 5px;
}

/* SEO Score Indicator for Frontend */
.seo-score-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.seo-score-indicator:hover {
    transform: scale(1.1);
}

.seo-score-indicator.good {
    background: #00a32a;
}

.seo-score-indicator.ok {
    background: #dba617;
}

.seo-score-indicator.bad {
    background: #d63638;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .seo-faq-question {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .seo-faq-answer {
        padding: 0 15px;
    }
    
    .seo-faq-answer.active {
        padding: 12px 15px;
    }
    
    .seo-howto-step {
        padding: 12px;
        padding-left: 50px;
    }
    
    .seo-howto-step::before {
        left: 12px;
        top: 12px;
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
    
    .seo-score-indicator {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 12px;
    }
}

/* Print Styles */
@media print {
    .seo-score-indicator {
        display: none;
    }
    
    .seo-faq-answer {
        max-height: none !important;
        padding: 15px 20px !important;
    }
    
    .seo-faq-question::after {
        display: none;
    }
}

/* Accessibility Improvements */
.seo-faq-question:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.seo-howto-step:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .seo-faq-item {
        border-color: #000;
    }
    
    .seo-faq-question {
        background: #fff;
        border-bottom: 1px solid #000;
    }
    
    .seo-howto-step {
        border-color: #000;
    }
    
    .seo-howto-step::before {
        background: #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .seo-faq-answer,
    .seo-faq-question::after,
    .seo-score-indicator,
    .seo-optimized-image::after {
        transition: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .seo-faq-question {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .seo-faq-answer {
        background: #34495e;
        color: #bdc3c7;
    }
    
    .seo-howto-step {
        background: #34495e;
        border-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .seo-howto-step-description {
        color: #bdc3c7;
    }
    
    .seo-reading-time {
        background: #2c3e50;
        color: #bdc3c7;
    }
}