/* ==========================================================
   Quest statistics panel
   ========================================================== */

.eq-statistics-panel {
    margin: 0 0 18px;
    padding: 10px;
    border: 1px solid #dedede;
    border-radius: 6px;
    background: #f5f6f6;
}

.eq-statistics-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.eq-statistics-card {
    padding: 8px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background: #fff;
}

.eq-statistics-card span {
    display: block;
    color: #666;
    font-size: 12px;
}

.eq-statistics-card strong {
    display: block;
    margin-top: 3px;
    font-size: 20px;
    line-height: 1.2;
}

/* Match total counters to the corresponding chart-series colors. */
.eq-statistics-card:nth-child(1) strong {
    color: #e58b78;
}

.eq-statistics-card:nth-child(2) strong {
    color: #000000;
}

.eq-statistics-card:nth-child(3) strong {
    color: #4b9b91;
}

.eq-statistics-card:nth-child(5) strong {
    color: #6c6c4a;
}

.eq-statistics-chart {
    display: flex;
    align-items: stretch;
    gap: 3px;
    height: 105px;
    margin-top: 10px;
    padding-top: 4px;
    border-bottom: 1px solid #ccc;
}

.eq-statistics-day {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.eq-statistics-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 78px;
}

.eq-statistics-bar {
    display: block;
    width: 28%;
    min-height: 1px;
    border-radius: 2px 2px 0 0;
}

.eq-statistics-views {
    background: #4b9b91;
}

.eq-statistics-clicks {
    background: #6c6c4a;
}

.eq-statistics-homepage {
    background: #e58b78;
}

.eq-statistics-day small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 9px;
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: top center;
}

.eq-statistics-legend {
    display: flex;
    gap: 18px;
    margin-top: 6px;
    font-size: 12px;
}

.eq-statistics-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.eq-statistics-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.eq-statistics-legend-views {
    background: #4b9b91;
}

.eq-statistics-legend-clicks {
    background: #6c6c4a;
}

.eq-statistics-legend-homepage {
    background: #e58b78;
}


/* ==========================================================
   Per-article counters in the Quest article list
   ========================================================== */

.eq-article-statistics-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    margin: 7px 10px 5px;
    padding: 0;
}

.eq-article-statistic {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.eq-article-statistic i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 23px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    background: #4b9b91;
    color: #fff;
    font-size: 11px;
    text-align: center;
    box-sizing: border-box;
}

.eq-article-statistic strong {
    color: #333;
    font-size: 16px;
    font-weight: 700;
}

.eq-article-statistic > span {
    color: #666;
    font-size: 13px;
}

.eq-article-statistic-views i {
    color: #fff;
    background: #4b9b91;
}

.eq-article-statistic-clicks i {
    color: #fff;
    background: #6c6c4a;
}


/* ==========================================================
   Responsive layout
   ========================================================== */

@media (max-width: 700px) {
    .eq-statistics-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .eq-statistics-chart {
        gap: 1px;
    }

    .eq-statistics-day small {
        font-size: 8px;
    }

    .eq-statistics-panel {
        padding: 8px;
    }

    .eq-statistics-card {
        padding: 7px;
    }

    .eq-statistics-card span {
        font-size: 11px;
    }

    .eq-statistics-card strong {
        font-size: 18px;
    }

    .eq-statistics-chart {
        height: 95px;
        margin-top: 8px;
    }

    .eq-statistics-bars {
        height: 70px;
    }

    .eq-article-statistics-row {
        gap: 16px;
        margin: 7px 8px 5px;
    }

    .eq-article-statistic {
        gap: 5px;
        font-size: 13px;
    }

    .eq-article-statistic strong {
        font-size: 15px;
    }
}


/* ==========================================================
   Collapsible statistics panel
   ========================================================== */

.eq-statistics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px dotted #cccccc;
}

.eq-statistics-header > .content-header {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.eq-statistics-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
}

.eq-statistics-persist-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: #666;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
    cursor: pointer;
}

.eq-statistics-persist-label input {
    margin: 0;
    cursor: pointer;
}

.eq-statistics-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #dedede;
    border-radius: 5px;
    background: #fafafa;
    color: #6c6c4a;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.eq-statistics-toggle:hover,
.eq-statistics-toggle:focus {
    background: #f0f0e8;
    border-color: #bdbda9;
    outline: none;
}

.eq-statistics-content[hidden] {
    display: none !important;
}

@media (max-width: 600px) {
    .eq-statistics-header {
        align-items: flex-start;
        gap: 8px;
    }

    .eq-statistics-header > .content-header {
        font-size: 16px;
    }

    .eq-statistics-controls {
        gap: 7px;
    }

    .eq-statistics-persist-label {
        font-size: 11px;
    }

    .eq-statistics-toggle {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }
}

@media (max-width: 420px) {
    .eq-statistics-header {
        flex-wrap: wrap;
    }

    .eq-statistics-controls {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Tighten the lower edge of the statistics panel without affecting other panels. */
.articles-statistics-outer-panel {
    padding-bottom: 10px;
}
.articles-statistics-outer-panel > #articles-statistics-summary > .eq-statistics-panel {
    margin-bottom: 0;
}

/* Cikk szerkesztőoldali statisztikai panel — külön stylesheetben. */

.eq-article-edit-statistics-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
}

.eq-article-edit-statistics-row + .eq-article-edit-statistics-row {
    border-top: 1px solid #e8e8e8;
}

.eq-article-edit-statistics-icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
}

.eq-article-edit-statistics-icon-views {
    background: #4b9b91;
}

.eq-article-edit-statistics-icon-clicks {
    background: #6c6c4a;
}

.eq-article-edit-statistics-label {
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
}

.eq-article-edit-statistics-row strong {
    color: #333;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    text-align: right;
}

.eq-article-edit-statistics-row-views strong {
    color: #4b9b91;
}

.eq-article-edit-statistics-row-clicks strong {
    color: #6c6c4a;
}

/* Today's statistics: emphasize the labels, not the values. */
.eq-statistics-card:nth-child(2) span,
.eq-statistics-card:nth-child(4) span,
.eq-statistics-card:nth-child(6) span {
    font-weight: 700;
}
