/**
 * SEO Visualizations CSS for Easy AI Blog Generator
 *
 * Styles for the SEO visualization charts and graphs.
 */

/* Main visualizations panel */
.easyai-seo-visualizations-panel {
    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    padding: 15px 20px;
    margin-bottom: 20px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Section headings for visualization groups */
.easyai-section-heading {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-top: 20px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #23282d;
}

/* Current keyword display */
.easyai-current-keyword-display {
    background-color: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    border-radius: 3px;
    margin-bottom: 15px;
    font-weight: 500;
    color: #333;
}

/* Visualizations grid layout */
.easyai-visualizations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

/* Responsive grid adjustments */
@media screen and (max-width: 782px) {
    .easyai-visualizations-grid {
        grid-template-columns: 1fr;
    }
}

/* Individual visualization items */
.easyai-visualization-item {
    background: #fbfbfb;
    border: 1px solid #e5e5e5;
    padding: 12px;
    border-radius: 3px;
}

/* Full width visualization items */
.easyai-visualization-item.easyai-visualization-full {
    grid-column: 1 / -1;
}

/* Visualization section containers */
.easyai-visualizations-section {
    margin-bottom: 25px;
}

/* Visualization item headings */
.easyai-visualization-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 13px;
    color: #23282d;
    font-weight: 600;
}

/* Visualization containers */
.easyai-visualization-container {
    position: relative;
    height: 180px;
    width: 100%;
    max-width: 100%;
}

/* Container for heading structure visualization */
#heading-structure-tree {
    overflow-y: auto;
    max-height: 180px;
    padding: 10px;
}

/* Heading structure tree nodes */
.easyai-tree-node {
    margin-left: 15px;
    position: relative;
    padding-left: 10px;
    border-left: 1px solid #ddd;
}

.easyai-tree-node:before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 10px;
    height: 1px;
    background: #ddd;
}

.easyai-tree-node h1, 
.easyai-tree-node h2, 
.easyai-tree-node h3, 
.easyai-tree-node h4, 
.easyai-tree-node h5, 
.easyai-tree-node h6 {
    margin: 5px 0;
    font-size: 12px;
    font-weight: normal;
    color: #333;
}

.easyai-tree-node h1 { font-size: 14px; font-weight: bold; color: #23282d; }
.easyai-tree-node h2 { font-size: 13px; font-weight: bold; }
.easyai-tree-node h3 { font-size: 12px; font-weight: bold; }

/* Chart tooltips */
.easyai-tooltip {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 12px;
    font-weight: normal;
    text-align: left;
    color: #333;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.easyai-help-icon:hover .easyai-tooltip {
    opacity: 1;
    visibility: visible;
}

.easyai-tooltip h5 {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #0073aa;
    font-weight: 600;
}

.easyai-tooltip p {
    margin: 0 0 8px 0;
    font-size: 12px;
    line-height: 1.4;
}

.easyai-tooltip ul {
    margin: 6px 0;
    padding-left: 15px;
}

.easyai-tooltip li {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.easyai-tooltip-section {
    margin-bottom: 8px;
}

.easyai-tooltip-section:last-child {
    margin-bottom: 0;
}

/* Adjust position for items near the right edge */
.easyai-visualization-item:nth-child(even) .easyai-help-icon .easyai-tooltip {
    transform: translateX(-90%) translateY(-100%);
}

/* Status indicators */
.easyai-status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.easyai-status-good { background-color: #46b450; }
.easyai-status-warning { background-color: #ffb900; }
.easyai-status-poor { background-color: #dc3232; }

/* Loading indicator */
.easyai-visualization-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 4px;
}

.easyai-visualization-loading span {
    display: inline-block;
    padding: 5px 15px;
    background: #f8f8f8;
    border-radius: 4px;
    color: #0073aa;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.easyai-visualization-loading span:before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top-color: #0073aa;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: easyai-spin 1s linear infinite;
}

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

/* Styles for specific chart types */

/* Gauge charts */
.easyai-gauge-chart {
    margin-top: 10px;
}

/* Radar charts */
.easyai-radar-chart {
    margin-top: 5px;
}

/* Heat maps */
.easyai-heat-map {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 3px;
    padding: 5px;
}

/* Opportunity graphs */
.easyai-opportunity-graph .bubble {
    cursor: pointer;
    transition: opacity 0.2s;
}

.easyai-opportunity-graph .bubble:hover {
    opacity: 0.8;
}

/* Timeline charts */
.easyai-timeline-chart {
    margin-top: 5px;
}

/* Topic coverage indicator */
.easyai-topic-coverage {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.easyai-topic-coverage-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 11px;
}

.easyai-topic-coverage-bar {
    flex: 2;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.easyai-topic-coverage-fill {
    height: 100%;
    background: #0073aa;
    border-radius: 5px;
}

.easyai-topic-coverage-percentage {
    font-size: 11px;
    margin-left: 5px;
    color: #666;
}

/* Heading for visualization panel */
.easyai-seo-visualizations-panel h3 {
    font-size: 15px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

/* Link distribution chart */
.easyai-link-chart {
    margin-top: 10px;
}

/* Competitor benchmark chart legend */
.easyai-competitor-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 10px;
    font-size: 11px;
}

.easyai-competitor-legend-item {
    display: flex;
    align-items: center;
    margin-right: 10px;
    margin-bottom: 5px;
}

.easyai-competitor-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
}

/* Media queries for responsive design */
@media screen and (max-width: 600px) {
    .easyai-visualization-container {
        height: 150px;
    }
    
    .easyai-visualizations-grid {
        gap: 15px;
    }
    
    .easyai-visualization-item {
        padding: 10px;
    }
    
    .easyai-section-heading {
        font-size: 13px;
    }
}

/* Canvas element sizing */
.easyai-visualization-container canvas {
    max-width: 100%;
    max-height: 100%;
}

/* Headings for visualizations */
.easyai-seo-visualizations-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.easyai-visualization-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 13px;
    color: #23282d;
}

/* Visualization legend */
.easyai-visualization-legend {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.easyai-legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.easyai-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 5px;
}

.easyai-legend-optimal {
    background-color: #46b450;
}

.easyai-legend-warning {
    background-color: #ffb900;
}

.easyai-legend-poor {
    background-color: #dc3232;
}

/* Keyword distribution heatmap custom styles */
.easyai-heatmap-row {
    display: flex;
    height: 30px;
    margin-bottom: 5px;
}

.easyai-heatmap-label {
    width: 100px;
    font-size: 12px;
    padding-right: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.easyai-heatmap-cells {
    flex-grow: 1;
    display: flex;
}

.easyai-heatmap-cell {
    flex-grow: 1;
    margin: 0 1px;
    border-radius: 2px;
}

/* Score indicator with animated fill */
.easyai-score-indicator {
    height: 8px;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.easyai-score-fill {
    height: 100%;
    transition: width 1s ease;
}

.easyai-score-optimal {
    background-color: #46b450;
}

.easyai-score-warning {
    background-color: #ffb900;
}

/* Hide any remaining test visualizations button */
.button#test-visualizations,
#test-visualizations-button,
#easyai-test-visualizations,
a[href="#test-visualizations"],
button:contains("Test Visualizations") {
    display: none !important;
}

/* Also hide the old test container if it exists */
#easyai-visualization-test-container {
    display: none !important;
}

/* Help tooltip styles */
.easyai-help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #e5e5e5;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 11px;
    color: #444;
    margin-left: 5px;
    cursor: help;
    position: relative;
    vertical-align: middle;
    font-weight: bold;
}

.easyai-help-icon:hover {
    background: #0073aa;
    color: white;
}

/* Scorecard help section styles */
.easyai-scorecard-help {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 15px 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.easyai-scorecard-help-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
}

.easyai-help-icon-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #0073aa;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
}

.easyai-scorecard-help-header h4 {
    margin: 0;
    flex-grow: 1;
    font-size: 14px;
    color: #23282d;
}

.easyai-toggle-help {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #555;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.easyai-toggle-help:hover {
    background: #e8e8e8;
    color: #23282d;
}

.easyai-toggle-help[aria-expanded="true"] {
    background: #e5e5e5;
}

.easyai-scorecard-help-content {
    padding: 0 15px 15px;
    border-top: 1px solid #e8e8e8;
    font-size: 13px;
    line-height: 1.5;
}

.easyai-scorecard-help-content p {
    margin: 10px 0;
}

.easyai-scorecard-help-content ol {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.easyai-scorecard-help-content li {
    margin-bottom: 8px;
}

/* SEO Interpretation Guide styles */
.easyai-interpretation-guide {
    margin-top: 30px;
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

.easyai-interpretation-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.easyai-interpretation-header h4 {
    margin: 0;
    flex-grow: 1;
    font-size: 15px;
    color: #23282d;
}

.easyai-toggle-guide {
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 3px;
    color: #555;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.easyai-toggle-guide:hover {
    background: #e8e8e8;
    color: #23282d;
}

.easyai-toggle-guide[aria-expanded="true"] {
    background: #e5e5e5;
}

.easyai-metrics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid #e5e5e5;
}

.easyai-metrics-table th {
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
}

.easyai-metrics-table td {
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    font-size: 13px;
}

.easyai-metrics-table tr:nth-child(even) {
    background: #fafafa;
}

.easyai-metrics-table td:first-child {
    font-weight: 600;
}

.easyai-metrics-table td:nth-child(2) {
    color: #46b450; /* Green for excellent */
}

.easyai-metrics-table td:nth-child(3) {
    color: #ffb900; /* Yellow for good */
}

.easyai-metrics-table td:nth-child(4) {
    color: #dc3232; /* Red for needs improvement */
}

.easyai-guide-notes {
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    padding: 12px 15px;
}

.easyai-guide-notes h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.easyai-guide-notes ul {
    margin: 0;
    padding-left: 20px;
}

.easyai-guide-notes li {
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.4;
} 