/**
 * Analytics file
 */

.aiimatg-analytics-dashboard .aiimatg-page-title{ 
    font-weight: 700;
}
.aiimatg-analytics-dashboard {
    padding: 30px;
    max-width: 1400px;
    margin: 20px auto; 
    border-radius: 16px;
}
.aiimatg-alert {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0 32px; 
    border-left: 4px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
}
.aiimatg-stats-grid { 
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 0 0 32px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.aiimatg-stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 150px;
}

.aiimatg-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aiimatg-stat-card:hover::before {
    opacity: 1;
}

.aiimatg-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 10px -4px rgba(0, 0, 0, 0.15);
}

.aiimatg-stat-card h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1;
}

.aiimatg-critical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.critical-item {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.critical-item:hover {
    transform: translateY(-2px);
}

.critical-item h4 {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.critical-item .count {
    font-size: 32px;
    font-weight: 700;
    color: #ef4444;
    line-height: 1;
    margin-bottom: 8px;
}

.critical-item .description {
    color: #94a3b8;
    font-size: 13px;
    margin-top: 8px;
    line-height: 1.4;
}

.critical-item.content-images {
    border-left-color: #f59e0b;
}

.critical-item.content-images .count {
    color: #f59e0b;
}

.aiimatg-section {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
    box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
}
.aiimatg-section h2 {
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.section-description {
    color: #64748b;
    font-size: 14px;
    margin-top: -8px;
    margin-bottom: 24px;
    font-style: italic;
}
.wp-list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 16px 0;
}

.wp-list-table th {
    background: #f1f5f9;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}
.wp-list-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.wp-list-table tr:hover td {
    background: #f8fafc;
}

.wp-list-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.aiimatg-export-section {
    margin-top: 30px;
    text-align: right;
}
.aiimatg-export-section button {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%) !important;
    border: none !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: all 0.2s ease !important;
}

.aiimatg-export-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}
.aiimatg-quality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}
.quality-item {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.quality-item.warning .stat {
    color: #f59e0b;
}

.quality-item .stat {
    font-size: 28px;
    font-weight: 600;
    color: #0ea5e9;
    display: block;
    margin: 10px 0;
}
.seo-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    margin: 20px 0;
    text-align: center;
}
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 15px;
    position: relative;
    background: #f8fafc;
    box-shadow: inset 0 0 0 8px #e2e8f0;
}

.score-circle.warning {
    color: #f59e0b;
    box-shadow: inset 0 0 0 8px #fbbf24;
}

.score-circle.good {
    color: #10b981;
    box-shadow: inset 0 0 0 8px #34d399;
}

.score-circle::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        currentColor var(--score), 
        transparent var(--score)
    );
    opacity: 0.2;
}

.score-circle .percent {
    font-size: 16px;
    font-weight: 500;
    margin-left: 2px;
}

.aiimatg-alert {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid #f59e0b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
}

.aiimatg-alert.warning h3 {
    color: #f59e0b;
    margin: 0;
}

.aiimatg-alert p {
    margin: 0;
    flex-grow: 1;
}

.critical-item {
    position: relative;
}

.critical-item .button {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
}

.quick-stats,
.stats-grid,
.stat-item,
.stat-item.highlight,
.stat-item label,
.stat-item span {
    display: none;
}


.seo-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
    margin: 24px 0;
}

.seo-metric-card {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
}

.metric-header {
    margin-bottom: 24px;
}

.metric-header h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px;
}

.metric-header .description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.metric-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.score-circle {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, currentColor var(--progress), #f1f5f9 var(--progress));
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-circle::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: white;
}

.score-circle-inner {
    position: relative;
    display: flex;
    align-items: baseline;
    color: inherit;
}

.score-value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.score-symbol {
    font-size: 24px;
    font-weight: 500;
    margin-left: 2px;
}

.metric-score.warning {
    --color: #f59e0b;
    color: var(--color);
}

.metric-score.good {
    --color: #10b981;
    color: var(--color);
}

.metric-action {
    width: 100%;
    text-align: center;
}

.metric-action .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid currentColor;
    background: #fff;
    color: currentColor;
    transition: all 0.2s ease;
}

.metric-action .button:hover {
    background: currentColor;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.action-icon {
    font-size: 16px;
}


.progress-ring {
    transform: rotate(-90deg);
    overflow: visible;
}

.progress-ring__background {
    stroke: #f1f5f9;
    stroke-width: 12px;
}

.progress-ring__progress {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

.circle-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
}

.progress-ring__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: inherit;
}

.progress-ring__percentage {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.progress-ring__symbol {
    font-size: 20px;
    font-weight: 500;
}

.metric-score.warning .progress-ring__progress {
    stroke: #f59e0b;
}

.metric-score.good .progress-ring__progress {
    stroke: #10b981;
}


.recent-generations-table {
    border: 1px solid #e5e7eb;
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.table-header, .table-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.table-header {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
}

.table-cell {
    flex: 1;
    padding: 8px 12px;
    text-align: left;
}

.alt-text-cell {
    flex: 2; /* Give more space to alt text */
}

.quality-cell,
.seo-impact-cell {
    flex: 0.8;
    text-align: center;
}

.date-cell {
    flex: 0.8;
}

/* Score badges */
.score-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    min-width: 60px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-badge.excellent {
    background: linear-gradient(135deg, #10b981, #059669);
}

.score-badge.good {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.score-badge.average {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.score-badge.poor {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.table-cell img {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.table-cell .button {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.table-cell .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


@media screen and (max-width: 782px) {
    .aiimatg-analytics-dashboard {
        padding: 20px;
        margin: 10px;
    }

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

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

    .critical-item .count {
        font-size: 24px;
    }

    .aiimatg-section {
        padding: 16px;
    }
}

/* Empty state styling */
.empty-state {
    background: #f8fafc;
    padding: 40px 20px;
    text-align: center;
    border-radius: 12px;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-icon {
    background: #e0f2fe;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.empty-state-icon .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: #0ea5e9;
}

.empty-state h3 {
    color: #334155;
    margin: 0 0 8px 0;
    font-size: 18px;
}

.empty-state p {
    margin: 0 0 20px 0;
    max-width: 400px;
}

.empty-state .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    height: auto;
    line-height: 1.4;
}

.empty-state .button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-top: -2px;
}
