/* Online Orders Total Page Styles */

/* Date Selection Bar */
.date-selection {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-selection .form-label {
    margin-bottom: 0;
    font-weight: 500;
    color: #495057;
}

.date-selection .form-control {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.date-selection .form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Summary Cards */
.summary-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.summary-info h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    line-height: 1;
}

/* Charts Section */
.charts-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Chart Styles */
.chart-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    height: 100%;
}

.chart-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.chart-header h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header h5 i {
    color: #007bff;
}

.chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

.chart-container canvas {
    max-height: 250px;
}

.chart-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 0.5rem;
}

/* Table Styles */
.table {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

.table thead th i {
    margin-left: 0.5rem;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.table thead th:hover i {
    opacity: 1;
}

.table tbody td {
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Merchant ID Badge */
.merchant-id-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 0.5rem;
}

/* Merchant Name */
.merchant-name {
    font-weight: 500;
    color: #212529;
}

/* Value Display */
.value-display {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1rem;
}

/* Order Count */
.order-count {
    background-color: #007bff;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

/* Average Order Value */
.avg-order-value {
    color: #6c757d;
    font-weight: 500;
}

/* Action Buttons */
.btn-group .btn {
    border-radius: 0.25rem;
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Loading States */
.loading-component {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.progress-container-component {
    width: 200px;
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-component {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
    animation: progress-animation 2s ease-in-out infinite;
}

.loading-text-component {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes progress-animation {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .summary-number {
        font-size: 1.25rem;
    }
    
    .date-selection {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .date-selection .form-control {
        width: 100%;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.4rem 0.3rem;
    }
    
    .empty-state {
        padding: 1.5rem 0.5rem;
    }
    
    .empty-state i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .chart-card {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .chart-container canvas {
        max-height: 200px;
    }
    
    .charts-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast-notification {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 1rem;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0.5rem 0.5rem 0 0;
}

.toast-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.toast-icon.success {
    color: #28a745;
}

.toast-icon.error {
    color: #dc3545;
}

.toast-icon.warning {
    color: #ffc107;
}

.toast-icon.info {
    color: #17a2b8;
}

.toast-title {
    font-weight: 600;
    color: #212529;
    flex-grow: 1;
}

.toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}

.toast-close:hover {
    color: #495057;
}

.toast-body {
    padding: 0.75rem 1rem;
    color: #495057;
    font-size: 0.875rem;
    line-height: 1.4;
}

.toast-progress {
    height: 3px;
    background-color: #e9ecef;
    border-radius: 0 0 0.5rem 0.5rem;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    transition: width linear;
}

.toast-progress-bar.success {
    background-color: #28a745;
}

.toast-progress-bar.error {
    background-color: #dc3545;
}

.toast-progress-bar.warning {
    background-color: #ffc107;
}

.toast-progress-bar.info {
    background-color: #17a2b8;
}
