/**
 * Mega SEO Module CSS
 * Advanced SEO management styles
 */

/* SEO Analysis Tools Styles */
.megaseo-tools-panel {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.megaseo-tool-box {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.megaseo-tool-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Analysis Results Styles */
.megaseo-analysis-results {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-top: 20px;
}

.megaseo-results-header {
    background: linear-gradient(135deg, #007cba, #0056b3);
    color: white;
    padding: 15px;
    border-radius: 6px 6px 0 0;
    margin: -1px -1px 0 -1px;
}

.megaseo-results-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.megaseo-analysis-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

.megaseo-analysis-summary .row div {
    text-align: center;
    padding: 10px;
}

.megaseo-opportunity {
    border-left: 3px solid #007cba;
    margin-bottom: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
    transition: all 0.2s ease-in-out;
}

.megaseo-opportunity:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.megaseo-cluster {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
    transition: box-shadow 0.2s ease-in-out;
}

.megaseo-cluster:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.megaseo-missing-topic {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 4px solid #ffc107;
}

.megaseo-results-actions {
    background: #f8f9fa;
    padding: 15px;
    border-top: 1px solid #dee2e6;
    text-align: center;
    border-radius: 0 0 6px 6px;
    margin: 0 -1px -1px -1px;
}

.megaseo-analysis-loading {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.megaseo-analysis-loading .icon-spinner {
    font-size: 28px;
    color: #007cba;
    margin-bottom: 15px;
}

.megaseo-analysis-loading p {
    font-size: 16px;
    margin-top: 10px;
    animation: megaseo-pulse 1.5s ease-in-out infinite;
}

/* Tool box specific styles */
.megaseo-tool-box h6 {
    color: #495057;
    margin-bottom: 10px;
    font-weight: 600;
}

.megaseo-tool-box p {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
}

.megaseo-tool-box .btn {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    width: 100%;
}

.megaseo-tool-box .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.megaseo-tool-box .btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
}

.megaseo-tool-box .btn-info {
    background: linear-gradient(45deg, #17a2b8, #138496);
    border: none;
    color: white;
}

.megaseo-tool-box .btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    color: white;
}

/* Export and apply buttons */
.megaseo-export-results {
    background: linear-gradient(45deg, #17a2b8, #6f42c1);
    border: none;
    color: white;
    border-radius: 15px;
    margin: 0 5px;
}

.megaseo-apply-suggestions {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    border: none;
    color: white;
    border-radius: 15px;
    margin: 0 5px;
}

/* Loading Animation */
@keyframes megaseo-pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Button disabled state */
.megaseo-tools-panel .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .megaseo-tools-panel .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .megaseo-tools-panel .col-md-4 {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 15px;
    }
    
    .megaseo-tool-box .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .megaseo-analysis-summary .row div {
        margin-bottom: 10px;
    }
}

/* Admin Panel Styles */
.megaseo-admin-panel {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.megaseo-admin-panel h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.megaseo-form-group {
    margin-bottom: 20px;
}

.megaseo-form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    display: block;
}

.megaseo-form-group input[type="text"],
.megaseo-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.megaseo-form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.megaseo-form-group .help-text {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Status Indicators */
.megaseo-status {
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.megaseo-status.enabled {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.megaseo-status.disabled {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Configuration Sections */
.megaseo-section {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.megaseo-section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.megaseo-section-header i {
    font-size: 20px;
    margin-right: 10px;
    color: #3498db;
}

.megaseo-section-header h4 {
    margin: 0;
    color: #2c3e50;
}

/* JSON-LD Preview */
.megaseo-jsonld-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.megaseo-jsonld-preview pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Analytics Dashboard */
.megaseo-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.megaseo-analytics-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.megaseo-analytics-card h5 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.megaseo-analytics-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
}

.megaseo-analytics-card .label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
}

/* Social Media Icons */
.megaseo-social-icons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.megaseo-social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 16px;
}

.megaseo-social-icon.facebook {
    background-color: #3b5998;
}

.megaseo-social-icon.twitter {
    background-color: #1da1f2;
}

.megaseo-social-icon.instagram {
    background-color: #e4405f;
}

.megaseo-social-icon.youtube {
    background-color: #ff0000;
}

/* Responsive Design */
@media (max-width: 768px) {
    .megaseo-admin-panel {
        padding: 15px;
    }
    
    .megaseo-analytics {
        grid-template-columns: 1fr;
    }
    
    .megaseo-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .megaseo-section-header i {
        margin-bottom: 5px;
    }
}

/* PrestaShop 1.6 Compatibility */
.bootstrap .megaseo-admin-panel {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bootstrap .megaseo-form-group input[type="text"]:focus,
.bootstrap .megaseo-form-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

/* Error and Success Messages */
.megaseo-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.megaseo-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.megaseo-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.megaseo-message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Loading States */
.megaseo-loading {
    opacity: 0.6;
    pointer-events: none;
}

.megaseo-spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: megaseo-spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes megaseo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
