/**
 * Product Summary and History Styles
 * 
 * Created: 2025-11-13
 * Author: Devese
 */

/* Container Styles */
.tof-product-summary-container,
.tof-product-history-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Title */
.tof-summary-title {
    color: #FF0000;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 30px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filters Section */
.tof-summary-filters {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
}

.tof-filter-group {
    flex: 1;
    min-width: 200px;
}

.tof-filter-group label {
    display: block;
    color: white;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tof-filter-group input[type="date"],
.tof-filter-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid white;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.tof-filter-group input[type="date"]:focus,
.tof-filter-group select:focus {
    outline: none;
    border-color: #FFE5E5;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Buttons */
.tof-btn-primary,
.tof-btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tof-btn-primary {
    background: white;
    color: #FF0000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tof-btn-primary:hover {
    background: #FFE5E5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tof-btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.tof-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Totals Card */
.tof-totals-card {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.25);
}

.tof-totals-card h2 {
    margin: 0 0 25px 0;
    font-size: 24px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tof-totals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tof-total-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.tof-total-item:hover {
    transform: scale(1.05);
}

.tof-total-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.tof-total-value {
    font-size: 36px;
    font-weight: bold;
    color: white;
}

/* Product Summary Cards */
.tof-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tof-product-card {
    background: white;
    border: 2px solid #FF0000;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tof-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.2);
}

.tof-product-card-header {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.tof-product-card-header h3 {
    margin: 0;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tof-product-card-body {
    padding: 20px;
}

.tof-card-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tof-card-stat:last-child {
    border-bottom: none;
}

.tof-stat-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tof-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #FF0000;
}

/* Detailed Breakdown */
.tof-detailed-breakdown {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tof-detailed-breakdown h2 {
    color: #FF0000;
    font-size: 24px;
    margin: 0 0 25px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Summary Table */
.tof-summary-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.tof-summary-table thead {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
}

.tof-summary-table th {
    padding: 18px 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.tof-summary-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.tof-summary-table tbody tr:hover {
    background-color: #FFF5F5;
}

.tof-summary-table tbody tr:last-child {
    border-bottom: none;
}

.tof-summary-table td {
    padding: 16px 15px;
    color: #333;
}

.tof-staff-summary {
    font-size: 13px;
    color: #666;
}

/* History Table Container */
.tof-history-table-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.tof-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.tof-pagination-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.tof-page-btn {
    padding: 10px 16px;
    border: 2px solid #FF0000;
    background: white;
    color: #FF0000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tof-page-btn:hover {
    background: #FF0000;
    color: white;
    transform: translateY(-2px);
}

.tof-page-btn.active {
    background: #FF0000;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

.tof-page-ellipsis {
    padding: 10px;
    color: #999;
}

/* Loading State */
.tof-loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

.tof-no-data {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    font-style: italic;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .tof-summary-filters {
        flex-direction: column;
    }
    
    .tof-filter-group {
        width: 100%;
        min-width: 100%;
    }
    
    .tof-totals-grid {
        grid-template-columns: 1fr;
    }
    
    .tof-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .tof-summary-table {
        display: block;
        overflow-x: auto;
    }
    
    .tof-total-value {
        font-size: 28px;
    }
    
    .tof-summary-title {
        font-size: 24px;
    }
    
    .tof-pagination-controls {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 480px) {
    .tof-product-summary-container,
    .tof-product-history-container {
        padding: 20px 10px;
    }
    
    .tof-summary-filters,
    .tof-totals-card,
    .tof-detailed-breakdown,
    .tof-history-table-container {
        padding: 20px 15px;
    }
    
    .tof-page-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Animation for real-time updates */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tof-product-card,
.tof-summary-table tbody tr {
    animation: fadeIn 0.3s ease;
}