/* Ad Banner Stats Page Styles */

.wrap {
    margin: 20px 0;
}

.stats-controls {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.stats-controls h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.stats-controls .form-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.stats-controls label {
    font-weight: 600;
    min-width: 100px;
}

.stats-controls select,
.stats-controls input[type="date"] {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.stats-controls .button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
}

.stats-controls .button:hover {
    background: #005a87;
}

/* Chart container styles */
.chart-container {
    position: relative;
    margin-bottom: 30px;
    border: 1px solid #ddd;
    padding: 20px;
    background-color: white;
    border-radius: 4px;
}

.chart-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.chart-container.resizable {
    resize: vertical;
    overflow: hidden;
    min-height: 300px;
    max-height: 800px;
}

.chart-container .resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background-color: #f5f5f5;
    cursor: ns-resize;
    border-top: 1px solid #ddd;
}

.chart-container .resize-handle:hover {
    background-color: #0073aa;
}

/* Chart canvas styling */
.chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* Stats summary */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.stats-card h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
}

.stats-card .stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    margin: 0;
}

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

.loading::after {
    content: "Loading...";
}

/* Error state */
.error-message {
    background: #fff2f2;
    border: 1px solid #ff6b6b;
    color: #d63031;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .stats-controls .form-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stats-controls label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .stats-summary {
        grid-template-columns: 1fr;
    }
}

/* Chart legend styling */
.chart-legend {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

/* No data state */
.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-style: italic;
}

.no-data::before {
    content: "📊";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}
