/**
 * OLW Dynamic Data Stats - Frontend Styles
 */

/* CSS Variables */
:root {
    /* Plugin variables */
    --olw-primary: #ec4899;
    --olw-primary-light: #f9a8d4;
    --olw-secondary: #8b5cf6;
    --olw-secondary-light: #c4b5fd;
    --olw-success: #10b981;
    --olw-danger: #ef4444;
    --olw-warning: #f59e0b;
    --olw-dark: #1e293b;
    --olw-gray-900: #0f172a;
    --olw-gray-800: #1e293b;
    --olw-gray-700: #334155;
    --olw-gray-600: #475569;
    --olw-gray-500: #64748b;
    --olw-gray-400: #94a3b8;
    --olw-gray-300: #cbd5e1;
    --olw-gray-200: #e2e8f0;
    --olw-gray-100: #f1f5f9;
    --olw-gray-50: #f8fafc;
    --olw-white: #ffffff;
    --olw-radius: 12px;
    --olw-radius-sm: 8px;
    --olw-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --olw-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Base Container */
.olw-ai-analytics-page,
.olw-ai-tool-page,
.olw-stats-page,
.olw-comparison-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--olw-gray-800);
    line-height: 1.6;
    background-color: var(--olw-gray-50);
}

.olw-ai-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Minimal Design Styles
   ======================================== */
.olw-header-bar {
    background: var(--olw-white);
    border-bottom: 1px solid var(--olw-gray-200);
    padding: 16px 0;
}

.olw-header-bar .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.breadcrumb-nav {
    display: flex;
    gap: 8px;
}

.breadcrumb-nav a {
    display: inline-block;
    padding: 8px 16px;
    color: var(--olw-gray-500);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.breadcrumb-nav a:hover {
    color: var(--olw-gray-700);
    background: var(--olw-gray-50);
}

.breadcrumb-nav a.active {
    color: var(--olw-primary);
    background: rgba(236, 72, 153, 0.08);
}

.period-dropdown {
    padding: 8px 32px 8px 14px;
    border: 1px solid var(--olw-gray-200);
    border-radius: 8px;
    background: var(--olw-white);
    font-size: 14px;
    font-weight: 500;
    color: var(--olw-gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.period-dropdown:focus {
    outline: none;
    border-color: var(--olw-primary);
}

.olw-minimal-hero {
    background: var(--olw-gray-50);
    padding: 40px 0;
    border-bottom: 1px solid var(--olw-gray-200);
}

.olw-minimal-hero .hero-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.olw-minimal-hero .hero-title-area h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--olw-gray-900);
    margin: 0 0 4px 0;
}

.olw-minimal-hero .hero-title-area p {
    font-size: 14px;
    color: var(--olw-gray-500);
    margin: 0;
}

.olw-minimal-hero .hero-metrics {
    display: flex;
    gap: 32px;
}

.olw-minimal-hero .metric {
    text-align: center;
}

.olw-minimal-hero .metric-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--olw-gray-900);
}

.olw-minimal-hero .metric-label {
    font-size: 12px;
    color: var(--olw-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .olw-header-bar .header-content {
        flex-direction: column;
        gap: 12px;
    }

    .breadcrumb-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .olw-minimal-hero .hero-flex {
        flex-direction: column;
        text-align: center;
    }

    .olw-minimal-hero .hero-metrics {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Hero Section */
.olw-ai-hero {
    background: linear-gradient(135deg, #fdf2f8 0%, #fae8ff 50%, #ede9fe 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.olw-ai-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--olw-white);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--olw-primary);
    margin-bottom: 24px;
    box-shadow: var(--olw-shadow);
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    color: var(--olw-gray-900);
    margin: 0 0 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--olw-gray-600);
    margin: 0 0 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--olw-primary);
    margin-bottom: 4px;
}

.hero-stat .stat-label {
    font-size: 14px;
    color: var(--olw-gray-500);
}

/* Stats Section */
.olw-ai-stats-section {
    padding: 60px 0;
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--olw-white);
    border: 1px solid var(--olw-gray-200);
    border-radius: var(--olw-radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: var(--olw-shadow-lg);
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--olw-white);
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-content {
    flex: 1;
}

.stat-content .stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--olw-gray-900);
    line-height: 1.2;
}

.stat-content .stat-label {
    display: block;
    font-size: 14px;
    color: var(--olw-gray-500);
    margin-top: 4px;
}

.stat-content .stat-sublabel,
.stat-content .stat-date {
    display: block;
    font-size: 12px;
    color: var(--olw-gray-400);
    margin-top: 2px;
}

.stat-content .stat-change {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 4px;
}

.stat-content .stat-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--olw-success);
}

.stat-content .stat-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--olw-danger);
}

/* Chart Section */
.olw-ai-chart-section {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--olw-gray-900);
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 12px;
}

.olw-select,
.olw-input {
    padding: 10px 16px;
    border: 1px solid var(--olw-gray-300);
    border-radius: var(--olw-radius-sm);
    font-size: 14px;
    background: var(--olw-white);
    color: var(--olw-gray-700);
    transition: border-color 0.2s ease;
}

.olw-select:focus,
.olw-input:focus {
    outline: none;
    border-color: var(--olw-primary);
}

.chart-container {
    background: var(--olw-white);
    border-radius: var(--olw-radius);
    padding: 24px;
    box-shadow: var(--olw-shadow);
}

/* Table Section */
.olw-ai-table-section {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.table-controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box input {
    padding-left: 40px;
    min-width: 200px;
}

.table-responsive {
    overflow-x: auto;
    background: var(--olw-white);
    border-radius: var(--olw-radius);
    box-shadow: var(--olw-shadow);
}

.olw-ai-data-table {
    width: 100%;
    border-collapse: collapse;
}

.olw-ai-data-table th {
    background: var(--olw-gray-50);
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--olw-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--olw-gray-200);
}

.olw-ai-data-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.olw-ai-data-table th.sortable:hover {
    color: var(--olw-primary);
}

.sort-icon {
    margin-left: 4px;
    opacity: 0.5;
}

.olw-ai-data-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--olw-gray-100);
    vertical-align: middle;
}

.olw-ai-data-table tbody tr:hover {
    background: var(--olw-gray-50);
}

.olw-ai-data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Tool Info in Table */
.tool-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--olw-gray-100);
    padding: 4px;
}

.tool-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--olw-primary), var(--olw-secondary));
    color: var(--olw-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.tool-details {
    display: flex;
    flex-direction: column;
}

.tool-name {
    font-weight: 600;
    color: var(--olw-gray-900);
}

.tool-link {
    font-size: 12px;
    color: var(--olw-gray-500);
    text-decoration: none;
}

.tool-link:hover {
    color: var(--olw-primary);
}

/* Category Badge */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--olw-gray-100);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    color: var(--olw-gray-600);
    text-transform: capitalize;
}

/* Traffic Value */
.traffic-value {
    font-weight: 600;
    color: var(--olw-gray-900);
}

/* Share Bar */
.share-bar {
    width: 100%;
    max-width: 100px;
    height: 6px;
    background: var(--olw-gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.share-fill {
    height: 100%;
    background: #FF6A00;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.share-value {
    font-size: 14px;
    color: var(--olw-gray-700);
    font-weight: 500;
}

/* Growth Indicator */
.growth-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.growth-icon.up {
    color: var(--olw-success);
}

.growth-icon.down {
    color: var(--olw-danger);
}

.col-growth.positive {
    color: var(--olw-success);
}

.col-growth.negative {
    color: var(--olw-danger);
}

/* View Button */
.btn-view {
    display: inline-block;
    padding: 8px 16px;
    background: var(--olw-gray-100);
    border-radius: var(--olw-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--olw-gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view:hover {
    background: var(--olw-primary);
    color: var(--olw-white);
}

/* Distribution Section */
.olw-ai-distribution-section {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.distribution-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

@media (max-width: 900px) {
    .distribution-grid {
        grid-template-columns: 1fr;
    }
}

.distribution-chart {
    background: var(--olw-white);
    border-radius: var(--olw-radius);
    padding: 30px;
    box-shadow: var(--olw-shadow);
}

.distribution-chart h2 {
    margin: 0 0 20px;
    font-size: 24px;
    color: var(--olw-gray-900);
}

.distribution-legend {
    background: var(--olw-white);
    border-radius: var(--olw-radius);
    padding: 24px;
    box-shadow: var(--olw-shadow);
}

.distribution-legend h3 {
    margin: 0 0 20px;
    font-size: 18px;
    color: var(--olw-gray-900);
}

.legend-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legend-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--olw-gray-100);
}

.legend-list li:last-child {
    border-bottom: none;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    font-size: 14px;
    color: var(--olw-gray-700);
}

.legend-value {
    font-weight: 600;
    color: var(--olw-gray-900);
    font-size: 14px;
}

/* Categories Section */
.olw-ai-categories-section {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.olw-ai-categories-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: var(--olw-gray-900);
    margin: 0 0 30px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background: var(--olw-white);
    border: 1px solid var(--olw-gray-200);
    border-left-width: 4px;
    border-radius: var(--olw-radius);
    padding: 24px;
    transition: all 0.3s ease;
}

.category-card:hover {
    box-shadow: var(--olw-shadow);
}

.category-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--olw-gray-900);
    margin: 0 0 16px;
}

.category-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 16px;
}

.cat-stat {
    display: flex;
    flex-direction: column;
}

.cat-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--olw-gray-900);
}

.cat-stat-label {
    font-size: 12px;
    color: var(--olw-gray-500);
}

.category-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--olw-gray-100);
    border-radius: 50px;
    font-size: 12px;
    color: var(--olw-gray-600);
}

.tool-tag.more {
    background: var(--olw-primary);
    color: var(--olw-white);
}

/* Single Tool Page */
.olw-ai-tool-header {
    background: linear-gradient(135deg, #fdf2f8 0%, #fae8ff 50%, #ede9fe 100%);
    padding: 60px 0;
}

.tool-header-content {
    max-width: 800px;
}

.tool-header-main {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.tool-header-logo,
.tool-header-logo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: contain;
    background: var(--olw-white);
    padding: 8px;
    box-shadow: var(--olw-shadow);
}

.tool-header-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--olw-primary);
}

.tool-header-info {
    flex: 1;
}

.tool-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.type-badge {
    padding: 4px 12px;
    background: var(--olw-primary);
    color: var(--olw-white);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
}

.tool-header-info h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--olw-gray-900);
    margin: 0 0 8px;
}

.tool-website {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--olw-gray-600);
    text-decoration: none;
    font-size: 14px;
}

.tool-website:hover {
    color: var(--olw-primary);
}

.tool-website svg {
    width: 14px;
    height: 14px;
}

.tool-description {
    color: var(--olw-gray-600);
    line-height: 1.7;
}

/* Tool Stats */
.olw-ai-tool-stats {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.olw-ai-tool-stats .stat-card {
    background: var(--olw-white);
    /* Ensure white background */
}

/* Tool Chart */
.olw-ai-tool-chart {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

/* Tool Data Table */
.olw-ai-tool-data {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.olw-ai-tool-data .olw-container {
    background: var(--olw-white);
    padding: 30px;
    border-radius: var(--olw-radius);
    box-shadow: var(--olw-shadow);
    border: 1px solid var(--olw-gray-200);
}

.positive {
    color: var(--olw-success) !important;
}

.negative {
    color: var(--olw-danger) !important;
}

/* Related Tools */
.olw-ai-related-tools {
    padding: 60px 0;
    background: var(--olw-gray-50);
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--olw-white);
    border-radius: var(--olw-radius);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--olw-shadow);
}

.related-tool-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--olw-shadow-lg);
}

.related-tool-logo,
.related-tool-logo-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--olw-gray-100);
}

.related-tool-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--olw-gray-600);
}

.related-tool-info {
    display: flex;
    flex-direction: column;
}

.related-tool-name {
    font-weight: 600;
    color: var(--olw-gray-900);
    font-size: 14px;
}

.related-tool-traffic {
    font-size: 12px;
    color: var(--olw-gray-500);
}

/* Back Link */
.olw-ai-back-section {
    padding: 40px 0;
    background: var(--olw-white);
    border-top: 1px solid var(--olw-gray-200);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--olw-gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--olw-primary);
}

.back-link svg {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .olw-ai-hero {
        padding: 60px 0;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-stats {
        gap: 40px;
    }

    .hero-stat .stat-value {
        font-size: 28px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .table-controls {
        width: 100%;
    }

    .olw-select,
    .olw-input {
        width: 100%;
    }

    .tool-header-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tool-badges {
        justify-content: center;
    }
}

/* ========================================
   Dashboard Navigation
   ======================================== */
.olw-ai-dashboard-nav {
    background: var(--olw-white);
    border-bottom: 1px solid var(--olw-gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.olw-ai-dashboard-nav .nav-links {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    justify-content: center;
}

.olw-ai-dashboard-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--olw-radius);
    color: var(--olw-gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.olw-ai-dashboard-nav .nav-link:hover {
    background: var(--olw-gray-100);
    color: var(--olw-gray-800);
}

.olw-ai-dashboard-nav .nav-link.active {
    background: linear-gradient(135deg, var(--olw-primary), var(--olw-secondary));
    color: var(--olw-white);
}

.olw-ai-dashboard-nav .nav-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.olw-ai-dashboard-nav .nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.olw-ai-dashboard-nav .period-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.olw-ai-dashboard-nav .period-selector label {
    font-size: 14px;
    font-weight: 500;
    color: var(--olw-gray-600);
    white-space: nowrap;
}

.olw-ai-dashboard-nav .period-selector .olw-select {
    min-width: 160px;
}

/* ========================================
   Comparison Page Styles
   ======================================== */


.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    align-items: start;
}

.comparison-card {
    background: var(--olw-white);
    border-radius: var(--olw-radius);
    box-shadow: var(--olw-shadow);
    padding: 32px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comparison-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--olw-shadow-lg);
}

.comparison-card.ai-tools {
    border-top: 4px solid var(--olw-primary);
}

.comparison-card.search-engines {
    border-top: 4px solid var(--olw-secondary);
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.comparison-header .comparison-icon {
    font-size: 32px;
}

.comparison-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.comparison-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.comp-stat {
    text-align: center;
    padding: 16px;
    background: var(--olw-gray-50);
    border-radius: var(--olw-radius-sm);
}

.comp-stat .comp-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--olw-gray-800);
}

.comp-stat .comp-value.positive {
    color: var(--olw-success);
}

.comp-stat .comp-value.negative {
    color: var(--olw-danger);
}

.comp-stat .comp-label {
    display: block;
    font-size: 12px;
    color: var(--olw-gray-500);
    margin-top: 4px;
}

.vs-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--olw-primary), var(--olw-secondary));
    color: var(--olw-white);
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    align-self: center;
    box-shadow: 0 4px 20px rgba(236, 72, 153, 0.3);
}

.top-players {
    border-top: 1px solid var(--olw-gray-200);
    padding-top: 20px;
}

.top-players h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--olw-gray-600);
    margin-bottom: 16px;
}

.top-players ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-players li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--olw-gray-100);
}

.top-players li:last-child {
    border-bottom: none;
}

.top-players .rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--olw-gray-100);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: var(--olw-gray-600);
}

.top-players .mini-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
}

.top-players .name {
    flex: 1;
    font-weight: 500;
    color: var(--olw-gray-800);
}

.top-players .traffic {
    font-weight: 600;
    color: var(--olw-gray-600);
}

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.type-badge.tool {
    background: rgba(236, 72, 153, 0.1);
    color: var(--olw-primary);
}

.type-badge.search_engine {
    background: rgba(139, 92, 246, 0.1);
    color: var(--olw-secondary);
}

/* Responsive Comparison */
@media (max-width: 992px) {
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .vs-badge {
        order: -1;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .olw-ai-dashboard-nav .nav-links {
        flex-wrap: wrap;
        gap: 4px;
    }

    .olw-ai-dashboard-nav .nav-link {
        padding: 10px 16px;
        font-size: 14px;
    }

    .comparison-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Hero & Dashboard Styles (Consolidated)
   ======================================== */
#olw-dashboard-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    width: 100%;
    line-height: 1.6;
}

#olw-dashboard-wrapper * {
    box-sizing: border-box;
}

#olw-dashboard-wrapper .olw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Hero */
#olw-dashboard-wrapper .olw-hero-gradient {
    background: linear-gradient(135deg, #fce7f3 0%, #ede9fe 50%, #e0f2fe 100%);
    padding: 30px 0 50px;
    border-radius: 0 0 20px 20px;
    margin-bottom: 30px;
}

/* Breadcrumb */
.olw-breadcrumb {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    align-items: center;
    flex-wrap: wrap;
}

.olw-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid transparent;
}

.olw-breadcrumb a:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.olw-breadcrumb a.active {
    background: #fff;
    color: #ec4899;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    border-color: rgba(236, 72, 153, 0.1);
}

.olw-breadcrumb a svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.olw-breadcrumb a:hover svg,
.olw-breadcrumb a.active svg {
    opacity: 1;
}

#olw-dashboard-wrapper .olw-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

#olw-dashboard-wrapper .hero-main {
    flex: 1;
    min-width: 300px;
}

#olw-dashboard-wrapper .hero-divider {
    width: 1px;
    height: 50px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

#olw-dashboard-wrapper .hero-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 5px;
    color: #1f2937;
    line-height: 1.2;
}

#olw-dashboard-wrapper .hero-subtitle {
    margin: 0;
    color: #4b5563;
    font-size: 15px;
}

#olw-dashboard-wrapper .period-select {
    padding: 10px 15px;
    border: 2px solid #ddd6fe;
    border-radius: 8px;
    font-size: 14px;
    color: #4b5563;
    background: white;
    cursor: pointer;
    min-width: 160px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#olw-dashboard-wrapper .hero-period {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#olw-dashboard-wrapper .period-instruction-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 6px;
    margin-left: 4px;
    letter-spacing: 0.5px;
}

#olw-dashboard-wrapper .period-label-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

#olw-dashboard-wrapper .period-instruction-label {
    margin-bottom: 0;
}

#olw-dashboard-wrapper .olw-info-tooltip {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    color: #9ca3af;
    transition: color 0.2s;
}

#olw-dashboard-wrapper .olw-info-tooltip:hover {
    color: #6b7280;
}

#olw-dashboard-wrapper .olw-info-tooltip svg {
    width: 14px;
    height: 14px;
}

#olw-dashboard-wrapper .tooltip-content {
    visibility: hidden;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1f2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    width: 220px;
    text-align: center;
    text-transform: none;
    z-index: 50;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

#olw-dashboard-wrapper .tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

#olw-dashboard-wrapper .olw-info-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Stats Cards */
.olw-stats-section {
    margin-bottom: 50px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f3f4f6;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.stat-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.stat-icon.rose {
    background: #ffe4e6;
    color: #e11d48;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    letter-spacing: -0.5px;
}

.stat-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Sections */
.olw-breakdown-section,
.olw-charts-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

/* Country Map & Grid */
.country-card-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    padding: 30px !important;
}

.country-map-container {
    flex: 1;
    min-width: 400px;
    height: 450px;
    background: #f8fafc;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-grid-wrapper {
    flex: 1;
    min-width: 400px;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.country-grid-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 10px 0 15px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
}

.country-grid-body {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

.country-grid-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    transition: background 0.1s;
}

.country-grid-row:hover {
    background: #fafafa;
}

.grid-col {
    display: flex;
    align-items: center;
}

.grid-col.text-right {
    justify-content: flex-end;
}

.grid-col.location {
    gap: 12px;
}

.country-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.traffic-value,
.share-value {
    font-size: 14px;
    color: #111827;
}

.traffic-value {
    font-weight: 700;
}

.share-value {
    font-weight: 500;
}

/* Country Map & Grid */
.country-card-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: stretch;
    padding: 30px !important;
}

.country-map-container {
    flex: 1;
    min-width: 300px;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.country-grid-wrapper {
    flex: 1;
    min-width: 300px;
}

/* Source Chart & Grid */
.source-card-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    padding: 30px !important;
}

.source-chart-container {
    flex: 1;
    min-width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.source-list-wrapper {
    flex: 1;
    min-width: 300px;
    width: 100%;
}

.source-grid-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 10px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.source-grid-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: center;
    font-size: 14px;
    color: #374151;
}

.dot-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}

.source-traffic {
    font-weight: 700;
    color: #111827;
}

/* Table */
/* Table - Override Hello Elementor styles */
#olw-dashboard-wrapper .table-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    overflow-x: auto;
}

#olw-dashboard-wrapper table.olw-rankings-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    padding: 0;
    border: none !important;
    background: white !important;
}

#olw-dashboard-wrapper table.olw-rankings-table th,
#olw-dashboard-wrapper .olw-rankings-table th {
    background: #f9fafb !important;
    padding: 10px 14px !important;
    text-align: left;
    font-size: 12px;
    text-transform: capitalize;
    color: #6b7280 !important;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
}

#olw-dashboard-wrapper table.olw-rankings-table td,
#olw-dashboard-wrapper .olw-rankings-table td {
    padding: 10px 14px !important;
    border: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
    color: #1f2937;
    font-size: 14px;
    vertical-align: middle;
    background: transparent !important;
}

/* Override Hello Elementor alternating row colors */
#olw-dashboard-wrapper table.olw-rankings-table tbody tr:nth-child(odd) td,
#olw-dashboard-wrapper table.olw-rankings-table tbody tr:nth-child(odd) th,
#olw-dashboard-wrapper .olw-rankings-table tbody tr:nth-child(odd) td,
#olw-dashboard-wrapper .olw-rankings-table tbody tr:nth-child(odd) th {
    background-color: transparent !important;
}

#olw-dashboard-wrapper table.olw-rankings-table tbody tr:nth-child(even) td,
#olw-dashboard-wrapper table.olw-rankings-table tbody tr:nth-child(even) th,
#olw-dashboard-wrapper .olw-rankings-table tbody tr:nth-child(even) td,
#olw-dashboard-wrapper .olw-rankings-table tbody tr:nth-child(even) th {
    background-color: transparent !important;
}

#olw-dashboard-wrapper table.olw-rankings-table tbody tr:hover td {
    background-color: #f9fafb !important;
}

.pos {
    color: #10b981 !important;
    font-weight: 600;
}

.neg {
    color: #ef4444 !important;
    font-weight: 600;
}

@media (max-width: 900px) {

    .country-card-layout,
    .source-card-layout {
        flex-direction: column;
    }

    .country-map-container,
    .country-grid-wrapper,
    .source-chart-container,
    .source-list-wrapper {
        min-width: 100%;
    }

    #olw-dashboard-wrapper .olw-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    #olw-dashboard-wrapper .hero-divider {
        display: none;
    }

    #olw-dashboard-wrapper .hero-period {
        margin-left: 0 !important;
        width: 100%;
    }

    #olw-dashboard-wrapper .period-select {
        width: 100%;
    }
}

/* Rankings Table Styles (Restored) */
#olw-dashboard-wrapper .tool-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

#olw-dashboard-wrapper .tool-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

#olw-dashboard-wrapper .tool-logo-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    color: #6b7280;
}

#olw-dashboard-wrapper .tool-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

#olw-dashboard-wrapper .tool-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

#olw-dashboard-wrapper .tool-visit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    background: #f1f5f9;
    color: #94a3b8;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

#olw-dashboard-wrapper .tool-visit-btn:hover {
    background: #FF6A00;
    color: #fff;
}

#olw-dashboard-wrapper .category-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 12px;
    font-size: 12px;
}

#olw-dashboard-wrapper .share-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#olw-dashboard-wrapper .share-progress {
    flex: 1;
    width: 60px;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

#olw-dashboard-wrapper .share-fill {
    height: 100%;
    background: #FF6A00;
    border-radius: 3px;
}

#olw-dashboard-wrapper .col-growth.pos {
    color: #16a34a;
}

#olw-dashboard-wrapper .col-growth.neg {
    color: #dc2626;
}

/* Comparison Page Unique Styles */

/* Comparison Section */
#olw-dashboard-wrapper .olw-comparison-section {
    padding: 60px 0;
}

#olw-dashboard-wrapper .comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}

#olw-dashboard-wrapper .comparison-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

#olw-dashboard-wrapper .card-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#olw-dashboard-wrapper .card-header.ai-theme {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
}

#olw-dashboard-wrapper .card-header.se-theme {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

#olw-dashboard-wrapper .card-icon {
    font-size: 28px;
}

#olw-dashboard-wrapper .card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

#olw-dashboard-wrapper .card-body {
    padding: 24px;
}

#olw-dashboard-wrapper .stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

#olw-dashboard-wrapper .stat-row:last-child {
    border-bottom: none;
}

#olw-dashboard-wrapper .stat-label {
    font-size: 14px;
    color: #6b7280;
}

#olw-dashboard-wrapper .stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

#olw-dashboard-wrapper .stat-value.positive {
    color: #10b981;
}

#olw-dashboard-wrapper .stat-value.negative {
    color: #ef4444;
}

#olw-dashboard-wrapper .card-footer {
    padding: 20px 24px;
    border-top: 1px solid #f3f4f6;
}

#olw-dashboard-wrapper .view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

#olw-dashboard-wrapper .view-all-btn.ai-btn {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff;
}

#olw-dashboard-wrapper .view-all-btn.ai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

#olw-dashboard-wrapper .view-all-btn.se-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

#olw-dashboard-wrapper .view-all-btn.se-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* VS Divider */
#olw-dashboard-wrapper .vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

#olw-dashboard-wrapper .vs-badge {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
}

/* Chart Section */
#olw-dashboard-wrapper .olw-chart-section {
    padding: 40px 0 60px;
}

#olw-dashboard-wrapper .chart-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

#comparison-chart,
#olw-traffic-trends-chart,
#olw-market-share-chart {
    max-height: 400px;
    height: 400px;
}

/* Breakdown Section - Comparison specific overrides/additions */
#olw-dashboard-wrapper .breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

#olw-dashboard-wrapper .item-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

#olw-dashboard-wrapper .item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#olw-dashboard-wrapper .item-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

#olw-dashboard-wrapper .item-value {
    font-size: 12px;
    color: #9ca3af;
}

#olw-dashboard-wrapper .item-bar-wrap {
    width: 100px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

#olw-dashboard-wrapper .item-bar {
    height: 100%;
    border-radius: 4px;
}

#olw-dashboard-wrapper .item-bar.ai-bar {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

#olw-dashboard-wrapper .item-bar.se-bar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Responsive */
@media (max-width: 1024px) {
    #olw-dashboard-wrapper .comparison-grid {
        grid-template-columns: 1fr;
    }

    #olw-dashboard-wrapper .vs-divider {
        padding: 16px 0;
    }

    #olw-dashboard-wrapper .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Comparison Page Styles (Migrated from Template)
   ======================================== */
/* Comparison Page Styles */
.olw-comparison-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
    background: #fff;
    line-height: 1.6;
}

.olw-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Hero Gradient */
.olw-hero-gradient {
    background: linear-gradient(to right, #fee2e2, #ede9fe, #dbeafe);
    padding: 48px 0 64px;
}

/* Breadcrumb styles moved to frontend-style.css */

/* Hero Content */
.olw-hero-content {
    display: flex;
    align-items: center;
    gap: 32px;
    background: rgba(249, 250, 251, 0.4);
    border-radius: 12px;
    padding: 48px 64px;
    flex-wrap: wrap;
    position: relative;
    /* Ensure stacking context */
    z-index: 50;
    /* Higher than table section */
}

.hero-main {
    flex: 1;
    min-width: 300px;
}

.hero-title {
    font-size: 54px;
    font-weight: 800;
    background: linear-gradient(to right, #9333ea, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 18px;
    color: #7c3aed;
    margin: 0;
}

.hero-divider {
    width: 2px;
    height: 60px;
    background: #d1d5db;
}

.hero-period {
    padding-left: 24px;
}

.period-select {
    padding: 12px 40px 12px 16px;
    border: 2px solid #a78bfa;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.period-select:focus {
    outline: none;
    border-color: #7c3aed;
}

/* Comparison Section */
.olw-comparison-section {
    padding: 60px 0;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: stretch;
}

.comparison-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-header {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header.ai-theme {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3);
}

.card-header.se-theme {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.card-icon {
    font-size: 28px;
}

.card-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.card-body {
    padding: 32px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 15px;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.stat-value.positive {
    color: #10b981;
}

.stat-value.negative {
    color: #ef4444;
}

.card-footer {
    padding: 24px 32px;
    border-top: 1px solid #f3f4f6;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.view-all-btn.ai-btn {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff;
}

.view-all-btn.ai-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
}

.view-all-btn.se-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

.view-all-btn.se-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* VS Divider */
.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-badge {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937, #374151);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Chart Section */
.olw-chart-section,
.olw-table-section,
.olw-stats-section {
    padding: 60px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 32px;
    letter-spacing: -0.01em;
}

.chart-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#comparison-chart,
#top-players-chart,
#visits-trend-chart {
    height: 400px;
    width: 100%;
}

/* Breakdown Section */
.olw-breakdown-section {
    padding: 60px 0;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.breakdown-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.breakdown-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.item-value {
    font-size: 12px;
    color: #9ca3af;
}

.item-bar-wrap {
    width: 100px;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.item-bar {
    height: 100%;
    border-radius: 4px;
}

.item-bar.ai-bar {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.item-bar.se-bar {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

/* Comparison Arena Styling */
.comparison-arena {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 20px;
}

.arena-header {
    display: flex;
    align-items: center;
    padding: 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.arena-col {
    flex: 1;
    text-align: center;
}

.arena-col h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
}

.col-ai h2 {
    color: #f97316;
}

.col-se h2 {
    color: #2563eb;
}

.col-center {
    flex: 0 0 80px;
    display: flex;
    justify-content: center;
}

.arena-icon {
    font-size: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.arena-body {
    padding: 0;
}

.arena-row {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.arena-row:last-child {
    border-bottom: none;
}

.arena-row:hover {
    background: #f8fafc;
}

.arena-cell {
    flex: 1;
}

.cell-ai,
.cell-se {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.cell-label {
    flex: 0 0 200px;
    text-align: center;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
}

.arena-footer {
    padding: 24px;
    display: flex;
    gap: 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.arena-footer .view-all-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* Responsive adjustment for Arena */
@media (max-width: 768px) {
    .arena-header {
        padding: 16px;
    }

    .arena-col h2 {
        font-size: 16px;
    }

    .col-center {
        flex: 0 0 40px;
    }

    .arena-row {
        padding: 16px;
        flex-wrap: wrap;
    }

    .cell-label {
        order: -1;
        flex: 0 0 100%;
        margin-bottom: 12px;
    }

    .cell-ai,
    .cell-se {
        font-size: 18px;
    }

    .arena-footer {
        flex-direction: column;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .vs-divider {
        padding: 16px 0;
    }

    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .olw-hero-content {
        flex-direction: column;
        padding: 24px;
        text-align: center;
    }

    .hero-divider {
        display: none;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-period {
        padding-left: 0;
    }

    .olw-breadcrumb {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ========================================
   Market Share Banner Section (In Hero)
   ======================================== */
.olw-market-share-banner {
    margin-top: 2rem;
    padding: 0;
}

.olw-market-share-banner .ms-banner-grid {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.ms-banner-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--olw-gray-600);
    margin: 1rem 0 0 0;
    text-align: center;
    letter-spacing: 0.025em;
    grid-column: 1 / -1;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.ms-banner-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    min-width: 0;
    width: 100%;
    /* Removing gap for dividers */
}

.ms-banner-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Left align as per previous plan/best practice for dividers */
    text-align: left;
    padding: 0 1.5rem;
    /* Horizontal padding for spacing */
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    /* Lighter divider for hero */
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-width: 0;
    overflow: hidden;
}

.ms-banner-item:last-child {
    border-right: none;
}

.ms-banner-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.ms-banner-item:first-child {
    padding-left: 0.5rem;
}

.ms-banner-item:last-child {
    padding-right: 0.5rem;
}

.ms-content {
    width: 100%;
    min-width: 0;
}

.ms-tool-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--olw-gray-500);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 100%;
    min-width: 0;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
}

.ms-tool-name .ms-tool-label {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.ms-tool-share {
    font-size: 2.3rem;
    /* User requested 2.3rem */
    font-weight: 800;
    color: var(--olw-gray-900);
    line-height: 1.1;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.ms-progress-bg {
    width: 100%;
    height: 4px;
    background: var(--olw-gray-100);
    border-radius: 2px;
    overflow: hidden;
    margin-top: auto;
    /* Push to bottom */
}

.ms-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--olw-primary), var(--olw-secondary));
    border-radius: 2px;
}

@media (max-width: 1200px) {
    .ms-banner-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }

    .ms-banner-item {
        border-right: none;
        /* Remove dividers on tablet */
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        padding: 20px 0;
        border-radius: 8px;
    }

    .ms-banner-item:nth-last-child(-n+3) {
        border-bottom: none;
        /* Logic might need adjustment for 3 cols */
    }
}

@media (max-width: 640px) {
    .ms-banner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ms-tool-share {
        font-size: 2rem;
    }

    .ms-banner-title {
        font-size: 0.75rem;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        grid-column: 1 / -1;
    }

    .olw-market-share-banner {
        margin-top: 1.5rem;
    }
}

/* ========================================
   Country Dashboard Page Styles
   ======================================== */

.olw-country-page .country-map-large {
    min-height: 500px;
    width: 100%;
}

.olw-country-page .country-card-full {
    display: block;
}

.olw-country-page .country-card-full .country-map-container {
    width: 100%;
    max-width: none;
}

.stats-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

@media (max-width: 640px) {
    .stats-grid-2 {
        grid-template-columns: 1fr;
    }

    .olw-country-page .country-map-large {
        min-height: 300px;
    }
}

.country-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.country-cell .country-flag {
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
}

.country-cell .country-name {
    font-weight: 500;
    color: var(--olw-gray-800);
}

.col-country {
    min-width: 200px;
}

/* ========================================
   Unified Section Spacing - Eye-soothing margins
   ======================================== */

/* Grey background for all pages */
.olw-stats-page,
.olw-country-page,
.olw-comparison-page {
    background-color: #f3f4f6;
}

/* Reset and normalize all section spacing */
.olw-stats-page .olw-stats-section,
.olw-stats-page .olw-table-section,
.olw-stats-page .olw-chart-section,
.olw-stats-page .olw-breakdown-section,
.olw-stats-page .olw-comparison-section {
    padding: 48px 0;
    margin: 0;
    background: transparent;
}

/* First section after hero gets less top padding */
.olw-stats-page .olw-hero-gradient+.olw-stats-section {
    padding-top: 40px;
}

/* White boxes for content - cards stand out on grey background */
.olw-stats-page .stat-card,
.olw-stats-page .breakdown-card,
.olw-stats-page .chart-container,
.olw-stats-page .table-wrapper,
.olw-stats-page .chart-wrapper,
.olw-country-page .stat-card,
.olw-country-page .breakdown-card,
.olw-country-page .chart-container,
.olw-country-page .table-wrapper {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

/* Table wrapper white background */
.olw-stats-page .table-wrapper,
.olw-country-page .table-wrapper {
    overflow: hidden;
}

/* Rankings table inside wrapper */
.olw-stats-page .olw-rankings-table,
.olw-country-page .olw-rankings-table {
    background: #ffffff;
}

/* Chart containers */
.olw-stats-page .chart-container.main-chart,
.olw-stats-page .chart-container.pie-chart,
.olw-country-page .chart-container.main-chart {
    padding: 24px;
}

/* Section titles consistent spacing */
.olw-stats-page .section-title {
    margin-bottom: 32px;
}

/* Country dashboard specific */
.olw-country-page .olw-breakdown-section,
.olw-country-page .olw-table-section,
.olw-country-page .olw-chart-section {
    padding: 48px 0;
    background: transparent;
}

/* Mobile responsive - tighter spacing on small screens */
@media (max-width: 768px) {

    .olw-stats-page .olw-stats-section,
    .olw-stats-page .olw-table-section,
    .olw-stats-page .olw-chart-section,
    .olw-stats-page .olw-breakdown-section,
    .olw-stats-page .olw-comparison-section {
        padding: 32px 0;
    }

    .olw-stats-page .section-title {
        margin-bottom: 24px;
    }
}

/* ========================================
   Info Tooltips
   ======================================== */
.info-tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    cursor: help;
    position: relative;
    color: var(--olw-gray-400);
    vertical-align: middle;
}

.info-tooltip:hover {
    color: var(--olw-gray-600);
}

.info-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--olw-gray-800);
    color: var(--olw-white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
}

.info-tooltip::before {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: var(--olw-gray-800);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.info-tooltip:hover::after,
.info-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Traffic Cell with Change Indicator
   ======================================== */

/* Fix for Market Share tooltip being cut off on the right */
/* Fix for Market Share tooltip being cut off on the right */
#olw-dashboard-wrapper .col-share .info-tooltip::after {
    left: auto !important;
    right: 0 !important;
    transform: none !important;
    width: 220px;
    /* Match default width */
    white-space: normal;
}

#olw-dashboard-wrapper .col-share .info-tooltip::before {
    left: auto !important;
    right: 4px !important;
    /* Align arrow with icon */
    transform: none !important;
}

/* Country Rankings Table Column Widths */
.olw-rankings-table .col-rank {
    width: 5%;
    text-align: center;
}

.olw-rankings-table .col-country {
    width: 31.6%;
}

.olw-rankings-table .col-traffic {
    width: 31.6%;
    text-align: center;
}

.olw-rankings-table th.col-traffic {
    text-align: center !important;
}

.olw-rankings-table th.col-share {
    text-align: center !important;
}

.olw-rankings-table .col-share {
    width: 31.6%;
    text-align: center;
}

/* Popular tools table — consistent per-column alignment */
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table th.col-rank,
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table td.col-rank {
    text-align: center;
}

#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table th.col-tool,
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table td.col-tool {
    text-align: left;
}

#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table th.col-category,
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table td.col-category {
    text-align: left;
}

#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table th.col-traffic,
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table td.col-traffic {
    text-align: center;
}

#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table th.col-change,
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table td.col-change {
    text-align: center;
}

#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table th.col-share,
#olw-dashboard-wrapper .olw-popular-tools-page .olw-rankings-table td.col-share {
    text-align: center;
}

/* Popular Tools & Default Stats Rankings Table Column Widths */
.olw-popular-tools-page .olw-rankings-table,
.olw-stats-page .olw-rankings-table {
    table-layout: fixed;
    width: 100%;
}

/* Specific overflow handling for popular tools & stats page */
@media (min-width: 1024px) {

    .olw-popular-tools-page .table-wrapper,
    .olw-stats-page .table-wrapper {
        overflow-x: hidden !important;
        /* Hide scrollbar on desktop */
    }
}

.olw-popular-tools-page .olw-rankings-table .col-rank,
.olw-stats-page .olw-rankings-table .col-rank {
    width: 6%;
}

.olw-popular-tools-page .olw-rankings-table .col-tool,
.olw-stats-page .olw-rankings-table .col-tool {
    width: 33%;
}

.olw-popular-tools-page .olw-rankings-table .col-category,
.olw-stats-page .olw-rankings-table .col-category {
    width: 16%;
}

.olw-popular-tools-page .olw-rankings-table .col-traffic,
.olw-stats-page .olw-rankings-table .col-traffic {
    width: 17%;
}

.olw-popular-tools-page .olw-rankings-table .col-change,
.olw-stats-page .olw-rankings-table .col-change,
.olw-stats-page .olw-rankings-table .col-growth {
    width: 15%;
}

.olw-popular-tools-page .olw-rankings-table .col-share,
.olw-stats-page .olw-rankings-table .col-share {
    width: 13%;
}

/* Specific overflow handling for popular tools page */
@media (min-width: 1024px) {
    .olw-popular-tools-page .table-wrapper {
        overflow-x: hidden !important;
        /* Hide scrollbar on desktop */
    }
}

.olw-popular-tools-page .olw-rankings-table .col-rank {
    width: 6%;
}

.olw-popular-tools-page .olw-rankings-table .col-tool {
    width: 33%;
}

.olw-popular-tools-page .olw-rankings-table .col-category {
    width: 16%;
}

.olw-popular-tools-page .olw-rankings-table .col-traffic {
    width: 17%;
}

.olw-popular-tools-page .olw-rankings-table .col-change {
    width: 15%;
}

.olw-popular-tools-page .olw-rankings-table .col-share {
    width: 13%;
}

/* First/last column outer padding matches card header (24px) */
#olw-dashboard-wrapper .olw-rankings-table th:first-child,
#olw-dashboard-wrapper .olw-rankings-table td:first-child {
    padding-left: 24px !important;
}

#olw-dashboard-wrapper .olw-rankings-table th:last-child,
#olw-dashboard-wrapper .olw-rankings-table td:last-child {
    padding-right: 24px !important;
}


.traffic-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.traffic-cell .traffic-value {
    font-weight: 600;
    color: var(--olw-gray-900);
    font-size: 14px;
}

.traffic-cell .traffic-change {
    font-size: 12px;
    font-weight: 500;
}

.traffic-cell .traffic-change.positive {
    color: #10b981;
}

.traffic-cell .traffic-change.negative {
    color: #ef4444;
}

/* Responsive tooltip positioning */
@media (max-width: 768px) {
    .info-tooltip::after {
        left: auto;
        right: 0;
        transform: none;
        max-width: 200px;
    }

    .info-tooltip::before {
        left: auto;
        right: 10px;
        transform: none;
    }
}

/* Compact Share Wrapper for Popular Tools Table */
.share-wrapper-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 60px;
}

.share-wrapper-compact .share-text {
    font-weight: 600;
    color: var(--olw-gray-900);
    font-size: 14px;
}

/* Increased specificity to override #olw-dashboard-wrapper .share-progress */
#olw-dashboard-wrapper .share-progress.share-progress-mini {
    width: 60px;
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    display: block;
    flex: none;
    /* Prevent flex grow/shrink from parent */
    margin-top: 2px;
}

.share-progress-mini .share-fill {
    height: 100%;
    background: #FF6A00;
    border-radius: 2px;
    display: block;
}

/* Rank Cell with Trend Icons */
.rank-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rank-number {
    font-weight: 600;
    color: var(--olw-gray-900);
}

.rank-trend-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.rank-trend-icon.trend-up {
    color: #10b981;
}

.rank-trend-icon.trend-down {
    color: #ef4444;
}

/* ========================================
   Country Dropdown Styles
   ======================================== */
.country-dropdown-wrapper {
    position: relative;
    z-index: 2001;
    /* Higher than tooltips (1000) */
}

.country-dropdown {
    position: relative;
}

.country-dropdown-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 16px !important;
    background: var(--olw-white) !important;
    border: 1px solid var(--olw-gray-200) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--olw-gray-700) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 180px;
    height: 44px !important;
    line-height: normal !important;
}

.country-dropdown-toggle:hover {
    border-color: #FF6A00 !important;
}

.country-dropdown-toggle .country-flag {
    width: 24px !important;
    height: 18px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.country-dropdown-toggle .country-name {
    flex: 1 !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.country-dropdown-toggle .dropdown-arrow {
    flex-shrink: 0 !important;
    transition: transform 0.2s ease !important;
}

/* ========================================
   Country Dropdown Styles
   ======================================== */
.country-dropdown.open .dropdown-arrow {
    transform: rotate(180deg) !important;
}

.country-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    z-index: 2100 !important;
    /* Higher than tooltips */
    background: #ffffff !important;
    border: 1px solid var(--olw-gray-200) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    min-width: 280px !important;
    max-height: 400px !important;
    overflow: hidden !important;
    display: none;
    /* Controlled by JS but setting default */
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

.country-search-wrapper {
    padding: 12px !important;
    border-bottom: 1px solid var(--olw-gray-200) !important;
    background: var(--olw-gray-50) !important;
    flex-shrink: 0 !important;
}

.country-search-input {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid var(--olw-gray-200) !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    outline: none !important;
    transition: border-color 0.2s ease !important;
    height: auto !important;
    margin: 0 !important;
}

.country-search-input:focus {
    border-color: #FF6A00 !important;
}

.country-list {
    overflow-y: auto !important;
    max-height: 320px !important;
    padding: 8px 0 !important;
    list-style: none !important;
    margin: 0 !important;
    display: block !important;
}

.country-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
    color: var(--olw-gray-700) !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease !important;
    cursor: pointer !important;
    border: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

.country-item:hover {
    background: rgba(255, 106, 0, 0.06) !important;
    color: #FF6A00 !important;
}

.country-item.selected {
    background: rgba(255, 106, 0, 0.08) !important;
    color: #FF6A00 !important;
    font-weight: 600 !important;
}

.country-item .country-flag {
    width: 24px !important;
    height: 18px !important;
    object-fit: cover !important;
    border-radius: 2px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
}

.country-item .country-name {
    flex: 1 !important;
    font-size: 14px !important;
    text-align: left !important;
}

.country-item .check-icon {
    flex-shrink: 0 !important;
    color: #FF6A00 !important;
}

.country-item.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .country-dropdown-toggle {
        min-width: 150px;
    }

    .country-dropdown-menu {
        min-width: 260px;
        right: 0;
        left: auto;
    }
}