/* ============================================
   Statistiken Admin Styles
   ============================================ */

.simpbook-stats-container {
    margin: 20px 0;
}

.simpbook-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.simpbook-stat-card {
    background: #fff;
    padding: 20px;
        border: 2px solid #1a4a8a;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.simpbook-stat-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.simpbook-stat-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
    font-size: 16px;
    font-weight: 600;
}

.simpbook-stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2271b1;
    margin: 10px 0;
    line-height: 1.2;
}

.simpbook-stat-label {
    color: #646970;
    font-size: 14px;
    margin-top: 5px;
}

/* Chart Container */
.simpbook-chart-container {
    background: #fff;
    padding: 20px;
        border: 2px solid #1a4a8a;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.simpbook-chart-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #23282d;
    font-size: 18px;
    font-weight: 600;
}

.simpbook-chart-wrapper {
    position: relative;
    height: 400px;
}

/* Filter Bereich */
.simpbook-stats-filters {
    background: #f9f9f9;
    padding: 15px;
        border: 2px solid #1a4a8a;
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
}

/* Mobile Filter Toggle Button - Hidden on Desktop */
.simpbook-stats-filters .filter-toggle-button {
    display: none;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.simpbook-stats-filters .filter-toggle-button:hover {
    background: #135e96;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.simpbook-stats-filters .filter-toggle-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.simpbook-stats-filters .filter-toggle-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.simpbook-stats-filters .filter-toggle-button[aria-expanded="true"] .filter-toggle-icon {
    transform: rotate(180deg);
}

.simpbook-stats-filters .filter-options {
    display: contents;
}

.simpbook-stats-filters form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.simpbook-stats-filters label {
    font-weight: 600;
    color: #23282d;
    margin-right: 5px;
}

.simpbook-stats-filters input[type="date"],
.simpbook-stats-filters select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.simpbook-stats-filters .button {
    margin-left: 0;
}

.simpbook-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.simpbook-filter-actions .button {
    height: 32px;
    line-height: 1;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 !important;
    font-size: 13px;
}

/* Quick Filter Buttons */
.simpbook-quick-filter {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #2271b1;
    transition: all 0.2s;
}

.simpbook-quick-filter:hover {
    background: #2271b1;
    color: #fff;
    border-color: #135e96;
}

/* Loading State */
.simpbook-stats-loading {
    text-align: center;
    padding: 40px;
    color: #646970;
}

.simpbook-stats-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1200px) {
    .simpbook-admin-wrap {
        max-width: 80%;
    }
    
    .simpbook-stats-container {
        padding: 0 10px;
    }
    
    .simpbook-stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .simpbook-stat-card {
        padding: 15px;
    }
    
    .simpbook-stat-value {
        font-size: 28px;
    }
    
    .simpbook-chart-container {
        padding: 15px;
    }
    
    .simpbook-chart-wrapper {
        height: 300px;
    }
    
    .simpbook-stats-filters {
        padding: 15px;
    }
    
    /* Show Mobile Filter Toggle */
    .simpbook-stats-filters .filter-toggle-button {
        display: flex !important;
    }
    
    /* Hide and collapse filter panel by default on mobile */
    .simpbook-stats-filters .filter-options {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
        margin-top: 0;
        display: block;
        width: 100%;
    }
    
    /* Show filter panel when expanded */
    .simpbook-stats-filters .filter-options.show {
        max-height: 2000px;
        opacity: 1;
        margin-top: 15px;
    }

    .simpbook-stats-filters form {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .simpbook-filter-actions {
        justify-content: center;
        margin-top: 10px;
    }
    
    .simpbook-stats-filters label {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .simpbook-stats-filters input[type="date"],
    .simpbook-stats-filters select {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
        box-sizing: border-box;
    }
    
    .simpbook-stats-filters .button {
        width: 100%;
        margin-left: 5px !important;
        margin-right: 5px !important;
    }
}

