/*
 * SEOPress PRO — Site overview tab bodies.
 *
 * The chrome (title, period selector, tabs, "View full report" link) is
 * rendered by the free plugin; only the body styles live here. Colors
 * inherit from the WP admin theme variables to stay in sync with the
 * user's selected admin color scheme.
 */

.seopress-overview-empty {
    margin: 0;
    padding: 24px;
    background: #f6f7f7;
    border: 1px dashed #dcdcde;
    border-radius: 4px;
    color: #646970;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.seopress-overview-empty p {
    margin: 0;
}

.seopress-overview-sync {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.seopress-overview-filters .seopress-overview-sync {
    margin-left: auto;
}

.seopress-overview-sync .components-spinner {
    margin: 0 6px 0 0;
}

.seopress-overview-sync__error {
    margin: 0;
    color: var(--colorAlert, #eb0f00);
    font-size: 12px;
}

/* ---------- PageSpeed (Figma showcase) ---------- */

.seopress-overview-pagespeed {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

@media (max-width: 600px) {
    .seopress-overview-pagespeed {
        grid-template-columns: minmax(0, 1fr);
    }
}

.seopress-overview-pagespeed__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    padding: 12px;
    border: 1px solid #f0f0f1;
    border-radius: 4px;
    background: #fff;
}

.seopress-overview-pagespeed__card--scores {
    align-items: center;
}

.seopress-overview-pagespeed__gauges {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.seopress-overview-pagespeed__gauge {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.seopress-overview-pagespeed__gauge-label {
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.seopress-overview-pagespeed__ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
}

.seopress-overview-pagespeed__ring-value {
    position: absolute;
    color: currentColor;
    font-size: 13px;
    font-weight: 600;
}

.seopress-overview-pagespeed__legend {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    justify-content: center;
}

.seopress-overview-pagespeed__legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.4;
}

.seopress-overview-pagespeed__legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.seopress-overview-pagespeed__legend-dot.is-red {
    background: var(--colorAlert, #eb0f00);
}

.seopress-overview-pagespeed__legend-dot.is-yellow {
    background: var(--colorWarning, #ffba00);
}

.seopress-overview-pagespeed__legend-dot.is-green {
    background: var(--colorSuccess, #4ab866);
}

.seopress-overview-pagespeed__card--cwv {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.seopress-overview-pagespeed__cwv-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--colorSuccess, #4ab866);
}

.seopress-overview-pagespeed__cwv-icon.is-fail {
    color: var(--colorAlert, #eb0f00);
}

.seopress-overview-pagespeed__cwv-icon.is-empty {
    color: #c3c4c7;
}

.seopress-overview-pagespeed__cwv-body {
    flex: 1 1 auto;
    min-width: 0;
}

.seopress-overview-pagespeed__cwv-title {
    margin: 0 0 4px 0;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.seopress-overview-pagespeed__cwv-status.is-pass {
    color: var(--colorSuccess, #4ab866);
}

.seopress-overview-pagespeed__cwv-status.is-fail {
    color: var(--colorAlert, #eb0f00);
}

.seopress-overview-pagespeed__cwv-status.is-empty {
    color: #646970;
}

.seopress-overview-pagespeed__cwv-desc {
    margin: 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.55;
}

/* ---------- Shared CTA / summary blocks ---------- */

.seopress-overview-cta {
    padding: 20px;
    border: 1px dashed #dcdcde;
    border-radius: 4px;
    background: #fff;
    text-align: center;
}

.seopress-overview-cta h3 {
    margin: 0 0 8px 0;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.seopress-overview-cta p {
    margin: 0 0 12px 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.55;
}

.seopress-overview-cta__link {
    display: inline-block;
    color: var(--wp-admin-theme-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.seopress-overview-cta__link:hover,
.seopress-overview-cta__link:focus {
    text-decoration: underline;
}

.seopress-overview-summary {
    padding: 4px 0;
}

.seopress-overview-summary__hint {
    margin: 0 0 8px 0;
    color: #1d2327;
    font-size: 13px;
    line-height: 1.55;
}

.seopress-overview-summary__line {
    margin: 4px 0 0 0;
    color: #646970;
    font-size: 13px;
    line-height: 1.55;
}

.seopress-overview-summary__line strong {
    color: #1d2327;
    font-weight: 600;
}

/* ---------- Overview line chart (Matomo / future GA) ---------- */

.seopress-overview-matomo {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.seopress-overview-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.seopress-overview-filters .components-base-control {
    flex: 1 1 180px;
    min-width: 160px;
    margin-bottom: 0;
}

.seopress-overview-chart {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #f0f0f1;
    border-radius: 4px;
    background: #fff;
}

.seopress-overview-chart__title {
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.seopress-overview-chart__plot {
    position: relative;
}

.seopress-overview-chart__svg {
    display: block;
    width: 100%;
    height: 160px;
    color: var(--wp-admin-theme-color, #2271b1);
}

.seopress-overview-chart__area {
    fill: rgba(var(--wp-admin-theme-color--rgb, 34, 113, 177), 0.12);
}

.seopress-overview-chart__line {
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.seopress-overview-chart__crosshair {
    stroke: currentColor;
    stroke-width: 1;
    stroke-dasharray: 3 3;
    opacity: 0.5;
    vector-effect: non-scaling-stroke;
    pointer-events: none;
}

.seopress-overview-chart__dot {
    fill: currentColor;
    transition: r 0.1s ease-out;
}

.seopress-overview-chart__tooltip {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px;
    background: #1d2327;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.4;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.seopress-overview-chart__tooltip-label {
    opacity: 0.75;
    font-size: 11px;
}

.seopress-overview-chart__tooltip-value {
    font-weight: 600;
}

.seopress-overview-chart__axis {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    color: #646970;
    font-size: 11px;
    line-height: 1.4;
}

/* ---------- Generic stats grid (GA / Matomo) ---------- */

.seopress-overview-stats {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.seopress-overview-stats__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #f0f0f1;
    border-radius: 4px;
    background: #fff;
}

.seopress-overview-stats__label {
    color: #646970;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.seopress-overview-stats__value {
    color: #1d2327;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

/* ---------- Search Console ---------- */

.seopress-overview-gsc {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.seopress-overview-gsc__section-title {
    margin: 0 0 8px 0;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.seopress-overview-gsc__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.seopress-overview-gsc__list li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 4px 16px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #f0f0f1;
    border-radius: 4px;
    background: #fff;
}

.seopress-overview-gsc__keyword {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    color: #1d2327;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
}

.seopress-overview-gsc__keyword:hover,
.seopress-overview-gsc__keyword:focus {
    color: var(--wp-admin-theme-color);
}

.seopress-overview-gsc__meta {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    color: #646970;
    font-size: 12px;
    line-height: 1.45;
}

.seopress-overview-gsc__metric {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.seopress-overview-gsc__metric span {
    color: #646970;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.seopress-overview-gsc__metric strong {
    color: #1d2327;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

