/* Group Statistics Plugin Styles */

.group-statistics-widget {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.group-statistics-widget h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007cba;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.stat-label {
    font-weight: 600;
    color: #555;
}

.stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #007cba;
}

/* Admin Dashboard Styles */
.group-statistics-dashboard {
    margin: 20px 0;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-widgets .postbox {
    margin: 0;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.dashboard-widgets .postbox h2 {
    margin: 0;
    padding: 12px 20px;
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
    font-size: 14px;
    font-weight: 600;
}

.dashboard-widgets .postbox .inside {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-number {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.stat-card .stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Group Statistics Results */
.group-stats-results {
    margin-top: 20px;
}

.group-overview {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.stat-row {
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row strong {
    font-weight: 600;
}

/* Tables */
.wp-list-table {
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    overflow: hidden;
}

.wp-list-table th {
    background: #f6f7f7;
    font-weight: 600;
    padding: 12px;
    border-bottom: 1px solid #c3c4c7;
}

.wp-list-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
}

.wp-list-table tr:hover {
    background: #f9f9f9;
}

/* Form Styles */
.form-table th {
    width: 200px;
    padding: 20px 10px 20px 0;
    font-weight: 600;
}

.form-table td {
    padding: 15px 10px;
}

.form-table input[type="number"],
.form-table input[type="email"],
.form-table input[type="date"] {
    width: 150px;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
}

.form-table input[type="checkbox"] {
    margin-right: 8px;
}

.description {
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

/* Buttons */
.button-primary {
    background: #007cba;
    border-color: #007cba;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.button-primary:hover {
    background: #005a87;
    border-color: #005a87;
    color: #fff;
}

.button-secondary {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    color: #2c3338;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.button-secondary:hover {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #2c3338;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .statistics-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card .stat-number {
        font-size: 2em;
    }
    
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .form-table input[type="number"],
    .form-table input[type="email"],
    .form-table input[type="date"] {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .group-statistics-widget {
        padding: 15px;
        margin: 10px 0;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-card .stat-number {
        font-size: 1.8em;
    }
}

/* Animation for loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.notice {
    padding: 12px;
    margin: 15px 0;
    border-left: 4px solid;
    background: #fff;
}

.notice-success {
    border-left-color: #00a32a;
    background: #f0f6fc;
}

.notice-error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

.notice-warning {
    border-left-color: #dba617;
    background: #fcf9e8;
}

/* Custom scrollbar */
.group-statistics-widget::-webkit-scrollbar {
    width: 8px;
}

.group-statistics-widget::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.group-statistics-widget::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.group-statistics-widget::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
