/* Дополнительные стили для калькулятора */

.product-item {
    border-left: 4px solid #3b82f6;
    transition: all 0.2s ease;
}

.product-item:hover {
    border-left-color: #1d4ed8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f3f4f6;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-highlight {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 500;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* Индикатор загрузки */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top-color: #3498db;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Стили для таблиц результатов */
.result-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 16px;
}

.result-table th,
.result-table td {
    border: 1px solid #e5e7eb;
    padding: 8px 12px;
    text-align: left;
}

.result-table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 14px;
}

.result-table td {
    font-size: 14px;
}

.result-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Цветовая схема для разных типов статистики */
.stat-card.volume {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.weight {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.boxes {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card.pallets {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .grid.grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    .product-item {
        padding: 12px;
    }
}

/* Стили для кнопок удаления */
.remove-btn {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.remove-btn:hover {
    opacity: 1;
}

/* Стили для подсказок */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Стили для прогресс-барра загрузки */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #10b981;
}

.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

/* Стили для пустого состояния */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 14px;
    opacity: 0.7;
}