/**
 * MineListings Content Stats Styles
 */

/* Stats Button */
.ml-stats-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ml-stats-button:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.ml-stats-button i {
    font-size: 12px;
}

/* Stats Modal */
.ml-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ml-stats-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.ml-stats-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ml-stats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.ml-stats-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.ml-stats-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s;
}

.ml-stats-modal-close:hover {
    color: #333;
}

.ml-stats-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Loading state */
.ml-stats-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Stats Summary Cards */
.ml-stats-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.ml-stats-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.ml-stats-card h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ml-stats-numbers {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ml-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ml-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.ml-stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Today card - blue accent */
.ml-stats-today {
    border-top: 3px solid #0d6efd;
}

/* Month card - green accent */
.ml-stats-month {
    border-top: 3px solid #198754;
}

/* All time card - purple accent */
.ml-stats-alltime {
    border-top: 3px solid #6f42c1;
}

/* Chart container */
.ml-stats-chart-container {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.ml-stats-chart-container h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

#ml-stats-chart {
    width: 100%;
    height: 300px;
}

/* Update event marker legend */
.ml-stats-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.ml-stats-legend-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 165, 0, 0.8);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .ml-stats-modal {
        padding: 10px;
    }

    .ml-stats-modal-content {
        max-height: 95vh;
    }

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

    .ml-stat-value {
        font-size: 20px;
    }

    #ml-stats-chart {
        height: 250px;
    }
}

/* Tracking wrapper - invisible by default */
.ml-tracking-item {
    /* No visual change - just a wrapper for tracking */
}

/* Admin page styles */
.ml-content-stats-admin .widefat {
    margin-top: 10px;
}

.ml-content-stats-admin .widefat td,
.ml-content-stats-admin .widefat th {
    padding: 10px;
}
