.wxgiveaway-analytics-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.wxgiveaway-analytics-header {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid #0073aa;
}

.wxgiveaway-analytics-header h1 {
    margin: 0 0 10px 0;
    color: #23282d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wxgiveaway-analytics-header .subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.wxgiveaway-date-filter {
    margin-bottom: 30px;
}

.filter-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-card h3 {
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wxgiveaway-select, .wxgiveaway-date-input, .wxgiveaway-number-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.wxgiveaway-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.kpi-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.card-primary .kpi-icon { background: #0073aa; }
.card-success .kpi-icon { background: #46b450; }
.card-info .kpi-icon { background: #00a0d2; }
.card-warning .kpi-icon { background: #ffb900; }

.kpi-content {
    flex: 1;
}

.kpi-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #23282d;
}

.kpi-trend {
    font-size: 12px;
    color: #999;
}

.trend-up { color: #46b450; }
.trend-down { color: #dc3232; }
.trend-neutral { color: #00a0d2; }

.analytics-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-suffix {
    color: #666;
}

.card-body {
    padding: 20px;
}

.draw-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
}

.draw-value {
    font-size: 48px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 10px;
}

.draw-label {
    font-size: 18px;
    color: #666;
    margin-bottom: 5px;
}

.draw-info {
    font-size: 12px;
    color: #999;
    margin-bottom: 20px;
}



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

.chart-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.chart-container {
    padding: 20px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-active { background: #d4edda; color: #155724; }
.status-badge.status-upcoming { background: #d1ecf1; color: #0c5460; }
.status-badge.status-completed { background: #fff3cd; color: #856404; }

.wxgiveaway-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

@media (max-width: 768px) {
    .wxgiveaway-charts-grid {
        grid-template-columns: 1fr;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .wxgiveaway-kpi-grid {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Giveaway All Products Table Start */

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

.table-responsive {
    overflow-x: auto;
}

.giveaway-products-table .product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.giveaway-products-table .product-image {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.giveaway-products-table .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.giveaway-products-table .product-info {
    flex: 1;
}

.giveaway-products-table .product-name {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
}

.giveaway-products-table .row-actions {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    margin-top: 5px;
}

.giveaway-products-table tr:hover .row-actions {
    opacity: 1;
    visibility: visible;
}

.giveaway-products-table .row-actions a {
    text-decoration: none;
}

.giveaway-products-table .row-actions a:hover {
    text-decoration: underline;
}

.giveaway-pagination {
    margin-top: 20px;
    text-align: center;
}

.giveaway-pagination .page-numbers {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.giveaway-pagination .page-numbers li {
    display: inline-block;
}

.giveaway-pagination .page-numbers a,
.giveaway-pagination .page-numbers span {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #2271b1;
}

.giveaway-pagination .page-numbers .current {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.giveaway-pagination .page-numbers a:hover {
    background: #f0f0f0;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}
/* Giveaway All Products Table End */

.upcoming-giveaway-products {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.upcoming-draws-summary {
    background: #fff;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    border-left: 4px solid #007cba;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.upcoming-draws-summary p {
    margin: 0;
    color: #555;
}

.upcoming-product-box {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.upcoming-product-box:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.upcoming-product-box .product-image {
    flex-shrink: 0;
    margin-right: 15px;
}

.upcoming-product-box .product-image img {
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.upcoming-product-box .product-details {
    flex-grow: 1;
}

.upcoming-product-box .product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.upcoming-product-box .product-title a {
    text-decoration: none;
    color: #1d2327;
}

.upcoming-product-box .product-title a:hover {
    color: #007cba;
}

.upcoming-product-box .product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.upcoming-product-box .meta-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #646970;
}

.upcoming-product-box .meta-item .dashicons {
    font-size: 16px;
    margin-right: 6px;
    color: #8c8f94;
    display: flex;
    align-items: center;
}

.upcoming-product-box .meta-label {
    font-weight: 500;
    margin-right: 5px;
}

.upcoming-product-box .product-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    padding: 10px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.upcoming-product-box .stat-item {
    display: flex;
    align-items: center;
}

.upcoming-product-box .stat-label {
    font-size: 13px;
    color: #646970;
    margin-right: 8px;
}

.upcoming-product-box .stat-value {
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.upcoming-product-box .product-actions {
    display: flex;
    gap: 8px;
}

.upcoming-product-box .button-small {
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.5;
}

.upcoming-product-box .button-small .dashicons {
    font-size: 14px;
    margin-right: 4px;
    vertical-align: middle;
}

.no-products-found {
    text-align: center;
    padding: 40px 20px;
}

.no-products-found .empty-state {
    color: #8c8f94;
}

.no-products-found .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    color: #dcdcde;
}

.no-products-found h4 {
    margin: 0 0 10px 0;
    color: #646970;
    font-size: 16px;
}

.no-products-found p {
    margin: 0;
    font-size: 14px;
}