/**
 * On-Page SEO Report Styles
 * 
 * This file contains styles specific to SEO on-page optimization reports.
 * 
 * @package SEO_OnPage_Report
 * @since 1.0.0
 */

/* SEO Keyword Analysis Table */
.keyword-analysis-table {
    margin: 1.5rem 0;
}

.keyword-analysis-table table {
    border-collapse: collapse;
    width: 100%;
}

.keyword-analysis-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.keyword-analysis-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.keyword-analysis-table tr.primary-keyword {
    background-color: #f8f9ff;
    font-weight: 500;
}

.keyword-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    color: #fff;
}

.keyword-badge.primary {
    background-color: #397BFB;
}

.keyword-badge.secondary {
    background-color: #5cb85c;
}

/* Meta Comparison Table */
.meta-comparison-table {
    margin: 1.5rem 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.meta-comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.meta-comparison-table th {
    background-color: #4D4D4D;
    color: #fff;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

.meta-comparison-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.meta-comparison-table tr:last-child td {
    border-bottom: none;
}

.current-meta {
    font-family: 'Courier New', monospace;
    background-color: #f8f8f8;
    padding: 0.5rem;
    border-radius: 3px;
    word-break: break-word;
}

.recommended-meta {
    font-family: 'Courier New', monospace;
    padding: 0.5rem;
    border-radius: 3px;
    word-break: break-word;
}

.improved-meta {
    background-color: #e6ffed;
    border-left: 3px solid #28a745;
}

.meta-visualizer {
    vertical-align: middle;
    width: 300px;
    background-color: #f8f8f8;
}

.meta-preview {
    max-width: 280px;
    padding: 0.75rem;
    border-radius: 6px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    font-family: Arial, sans-serif;
}

.meta-preview.recommended {
    background-color: #e6ffed;
    border: 1px solid #b0fbc1;
}

.google-title {
    display: block;
    color: #1a0dab;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.google-url {
    display: block;
    color: #006621;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.google-description {
    display: block;
    color: #4d5156;
    font-size: 0.875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* Heading Structure Visualization */
.heading-structure-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 1.5rem 0;
}

.heading-structure {
    flex: 1;
    min-width: 300px;
}

.heading-structure h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #4D4D4D;
}

.structure-visualization {
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
}

.heading-level-h1,
.heading-level-h2,
.heading-level-h3,
.heading-level-h4,
.heading-level-h5,
.heading-level-h6 {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    background-color: #fff;
    display: flex;
    align-items: center;
    position: relative;
}

.heading-level-h1 {
    padding-left: 0.5rem;
}

.heading-level-h2 {
    padding-left: 1.5rem;
}

.heading-level-h3 {
    padding-left: 2.5rem;
}

.heading-level-h4 {
    padding-left: 3.5rem;
}

.heading-level-h5 {
    padding-left: 4.5rem;
}

.heading-level-h6 {
    padding-left: 5.5rem;
}

.heading-tag {
    background-color: #4D4D4D;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    margin-right: 0.75rem;
    font-family: monospace;
    font-weight: bold;
}

.heading-text {
    flex: 1;
    font-family: Arial, sans-serif;
    word-break: break-word;
}

.heading-added {
    background-color: #e6ffed;
    border-left: 3px solid #28a745;
}

.heading-modified {
    background-color: #fff8e6;
    border-left: 3px solid #ffbb33;
}

.heading-removed {
    background-color: #ffebee;
    border-left: 3px solid #dc3545;
    text-decoration: line-through;
}

.heading-action-badge {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.625rem;
    font-weight: bold;
    color: white;
}

.heading-action-badge.add {
    background-color: #28a745;
}

.heading-action-badge.modify {
    background-color: #ffbb33;
    color: #333;
}

.heading-action-badge.remove {
    background-color: #dc3545;
}

/* Suggestion Blocks */
.suggestion-block {
    margin: 1.5rem 0;
    background-color: #f8f9ff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
}

.suggestion-title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #4D4D4D;
    font-weight: 600;
}

.suggestion-list {
    margin: 0;
    padding-left: 1.5rem;
}

.suggestion-list li {
    margin-bottom: 0.5rem;
}

.suggestion-list li:last-child {
    margin-bottom: 0;
}

/* Word Count Section */
.word-count-section {
    margin: 1.5rem 0;
    background-color: #f8f8f8;
    border-radius: 6px;
    padding: 1rem;
}

.word-count-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric {
    flex: 1;
    min-width: 120px;
    background-color: white;
    padding: 0.75rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.metric-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.word-count-progress {
    margin-top: 1rem;
}

.progress-bar-container {
    height: 0.75rem;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-bar {
    height: 100%;
    background-color: #397BFB;
    border-radius: 4px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #666;
}

/* Content Gaps Section */
.content-gaps-section {
    margin: 1.5rem 0;
}

.content-gap-item {
    background-color: #f8f8f8;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid #397BFB;
}

.gap-topic {
    margin-bottom: 0.5rem;
}

.competitor-coverage {
    display: inline-block;
    font-size: 0.75rem;
    color: #666;
    margin-left: 0.5rem;
}

.gap-recommendation {
    color: #333;
}

/* Page Analysis Section */
.page-analysis-section {
    margin: 1.5rem 0;
}

.analyzed-page {
    background-color: #f8f8f8;
    border-radius: 6px;
    padding: 1rem;
}

.page-url {
    font-family: monospace;
    color: #006621;
    margin-bottom: 0.5rem;
}

.page-title {
    font-weight: 600;
    color: #333;
}

/* Toggleable Sections */
.toggleable-section {
    margin: 1.5rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.toggle-trigger {
    padding: 1rem;
    background-color: #f8f8f8;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #4D4D4D;
}

.toggle-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #397BFB;
    color: white;
}

.toggleable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.toggleable-section.expanded .toggleable-content {
    max-height: 2000px;
    transition: max-height 1s ease-in;
}

.toggle-inner {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* Status Indicators */
.success-indicator {
    color: #28a745;
    font-weight: 500;
}

.warning-indicator {
    color: #ffbb33;
    font-weight: 500;
}

.error-indicator {
    color: #dc3545;
    font-weight: 500;
}

/* Keyword Highlights */
.keyword-highlight {
    background-color: #fffbc1;
    padding: 0 2px;
    border-radius: 2px;
}

/* Targeted Keywords Table */
.targeted-keywords-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.targeted-keywords-table th {
    background-color: #f5f5f5;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e0e0e0;
}

.targeted-keywords-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.targeted-keywords-table tr:last-child td {
    border-bottom: none;
}

.kd-value, .volume-value, .position-value {
    text-align: center;
}

.position-value.ranking {
    color: #28a745;
    font-weight: 500;
}

.position-value.not-ranking {
    color: #dc3545;
}

/* Before/After Comparisons */
.comparison-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.comparison-column {
    flex: 1;
    min-width: 280px;
}

.comparison-column h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.comparison-column.current h4 {
    color: #666;
}

.comparison-column.recommended h4 {
    color: #397BFB;
}

.comparison-content {
    background-color: #f8f8f8;
    border-radius: 6px;
    padding: 1rem;
}

.comparison-content.current {
    border-left: 3px solid #666;
}

.comparison-content.recommended {
    border-left: 3px solid #397BFB;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .heading-structure-container {
        flex-direction: column;
    }
    
    .word-count-metrics {
        flex-direction: column;
    }
    
    .meta-comparison-table td,
    .keyword-analysis-table td {
        padding: 0.5rem;
    }
    
    .meta-visualizer {
        display: none;
    }
}