/* 
 * Activity Log Pro - Stats & Insights Page Styles
 * 
 * Note: Several panels have been removed from the stats display:
 * - Top Activities panel
 * - Activity Overview panel
 * - User Insights panel
 * - Security Insights panel
 * The CSS for these panels has been removed or commented out.
 */
.alp-stats-insights-container {
    margin-top: 20px;
}

.alp-stats-insights-header {
    margin-bottom: 20px;
}

.alp-stats-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.alp-stats-section h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f1f1;
    color: #23282d;
    font-size: 18px;
}

.alp-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.alp-stat-card {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
}

.alp-stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #555;
}

.alp-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #1e88e5;
}

.alp-trends-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.alp-trends-chart-wrapper {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05); /* Add subtle shadow */
    display: flex;
    flex-direction: column;
}

.alp-full-width-chart {
    grid-column: 1 / -1; /* Make it full width across all columns */
    margin-bottom: 20px; /* Add more space below the daily activity chart */
    padding-bottom: 10px; /* Add padding at the bottom */
}

.alp-chart-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alp-chart-header h3 {
    margin: 0;
    font-size: 14px;
    color: #555;
}

.alp-chart-actions select {
    padding: 4px 8px 4px 12px;
    padding-right: 30px; /* Create space for the custom arrow */
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 13px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23555555%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 10px;
}

.alp-trends-chart {
    padding: 20px;
    min-height: 250px; /* Ensure consistent height across all charts */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Allow the chart to fill available space */
}

.alp-trends-chart canvas {
    max-width: 100%;
    height: auto !important;
}

/* Top Activities panel styles removed as the panel has been removed */

/* User Insights and Security Insights panels styles removed as these panels have been removed */

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .alp-trends-container {
        grid-template-columns: 1fr;
    }
}

/* Daily Stats Panel Styles */
.alp-daily-stats-panel {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.alp-daily-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.alp-daily-stats-header h2 {
    margin: 0;
    padding: 0;
    font-size: 18px;
    color: #23282d;
}

.alp-stats-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.alp-stats-toggle {
    display: flex;
    background: #f1f1f1;
    border-radius: 6px;
    padding: 2px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.alp-stats-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.alp-stats-toggle-btn:hover {
    color: #1e88e5;
    background: rgba(30, 136, 229, 0.05);
}

.alp-stats-toggle-btn.active {
    background: #1e88e5;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.alp-stats-toggle-btn svg {
    flex-shrink: 0;
}

.alp-stats-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alp-stats-refresh-btn {
    padding: 8px 10px;
    background: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.alp-stats-refresh-btn:hover {
    background: #e6e6e6;
    color: #1e88e5;
}

.alp-stats-refresh-btn.alp-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.alp-stats-refresh-btn svg {
    width: 16px;
    height: 16px;
}

.alp-daily-date {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.alp-daily-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.alp-daily-stat-item {
    background: #f9f9f9;
    border: 1px solid var(--stat-color-border, #eee);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, var(--stat-color-light, #f9f9f9) 0%, #f9f9f9 100%);
}

.alp-daily-stat-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: var(--stat-color, #ddd);
}

a.alp-daily-stat-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: flex;
}

a.alp-daily-stat-link .alp-daily-stat-value,
a.alp-daily-stat-link .alp-daily-stat-label {
    color: inherit;
}

a.alp-daily-stat-link:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
    border-color: var(--stat-color, #ddd);
    text-decoration: none;
}

.alp-daily-stat-icon {
    width: 40px;
    height: 40px;
    background: var(--stat-color-light, #e3f2fd);
    border: 2px solid var(--stat-color-border, #e3f2fd);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--stat-color, #1e88e5);
    flex-shrink: 0;
}

.alp-daily-stat-content {
    flex: 1;
    min-width: 0;
}

.alp-daily-stat-value {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #23282d;
    line-height: 1.2;
}

.alp-daily-stat-label {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
}

.alp-daily-stats-insights {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
}

.alp-daily-stats-insights h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
    font-weight: 600;
}

.alp-daily-stats-insights ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.alp-daily-stats-insights li {
    padding: 4px 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.alp-daily-stats-insights li:before {
    content: "•";
    color: #1e88e5;
    margin-right: 8px;
    font-weight: bold;
}

/* Loading state for stats toggle */
.alp-stats-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.alp-stats-loading .alp-daily-stat-item {
    animation: alpStatsShimmer 1.5s ease-in-out infinite;
}

@keyframes alpStatsShimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Peak Activity Times Styles */
#alpPeakActivityTimes {
    width: 100%;
    display: grid;
    grid-template-columns: auto repeat(24, 1fr);
    grid-template-rows: repeat(7, auto);
    gap: 1px;
    margin-bottom: 15px;
}

.alp-peak-day-label {
    padding: 5px;
    font-size: 12px;
    white-space: nowrap;
    text-align: right;
    padding-right: 10px;
    color: #555;
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.alp-peak-hour-label {
    padding: 5px;
    font-size: 10px;
    text-align: center;
    color: #555;
}

.alp-peak-cell {
    background-color: rgba(30, 136, 229, 0.05);
    transition: all 0.2s ease;
    aspect-ratio: 1;
}

.alp-peak-cell:hover {
    opacity: 0.8;
}

.alp-peak-times-insights {
    padding: 10px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    margin-bottom: 0; /* Remove bottom margin */
}

.alp-peak-times-insights p {
    margin: 5px 0;
    color: #555;
    font-size: 13px;
}

.alp-peak-times-insights strong {
    color: #1e88e5;
}

.alp-event-type-insights,
.alp-action-distribution-insights,
.alp-peak-times-insights {
    padding: 10px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    margin-bottom: 0; /* Remove bottom margin */
    min-height: 80px; /* Set minimum height */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.alp-event-type-insights p,
.alp-action-distribution-insights p,
.alp-peak-times-insights p {
    margin: 5px 0;
    color: #555;
    font-size: 13px;
}

.alp-event-type-insights strong,
.alp-action-distribution-insights strong,
.alp-peak-times-insights strong {
    color: #1e88e5;
}

.alp-event-type-count, .alp-event-type-most {
    padding: 4px 0;
}

.alp-action-insight-most, .alp-action-insight-least {
    padding: 4px 0;
}

.alp-activity-insights {
    padding: 10px 20px;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    margin-bottom: 15px;
}

.alp-activity-insights p {
    margin: 5px 0;
    color: #555;
    font-size: 13px;
}

.alp-activity-insights strong {
    color: #1e88e5;
}

.alp-activity-insights .alp-install-date {
    color: #1e88e5;
    border-bottom: 1px dotted #1e88e5;
    padding-bottom: 1px;
}

/* Peak Activity Times CSS */
.alp-peak-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    max-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.alp-peak-tooltip:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* Responsive design for stats */
@media screen and (max-width: 782px) {
    .alp-daily-stats-grid {
        grid-template-columns: 1fr;
    }

    .alp-daily-stats-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .alp-stats-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .alp-stats-toggle-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .alp-stats-toggle-btn svg {
        width: 14px;
        height: 14px;
    }
} 