/**
 * Mobile Enhancements für Bulk Manager
 * Zusätzliche Optimierungen für Touch-Geräte
 */

/* Touch-optimierte Buttons */
@media (max-width: 768px) {
    
    /* Größere Touch-Targets */
    .toggle-switch {
        width: 70px !important;
        height: 36px !important;
    }
    
    .toggle-slider:before {
        height: 28px !important;
        width: 28px !important;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(34px) !important;
    }
    
    /* Größere Input-Felder */
    .price-input {
        width: 100% !important;
        min-width: 80px;
        padding: 10px !important;
        font-size: 16px !important; /* Verhindert Auto-Zoom auf iOS */
    }
    
    .search-box {
        font-size: 16px !important; /* Verhindert Auto-Zoom auf iOS */
        padding: 14px 16px !important;
    }
    
    /* Scrollbare Tabelle auf kleinen Geräten */
    .products-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .products-table {
        min-width: 600px;
    }
    
    /* Header NICHT sticky auf Mobile */
    .bulk-header {
        position: relative;
    }
    
    /* Kompaktere Stats */
    .bulk-stats {
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* iPhone SE und kleine Geräte */
@media (max-width: 375px) {
    .appizza-bulk-wrapper {
        padding: 8px;
    }
    
    .bulk-header {
        padding: 15px;
    }
    
    .bulk-header h1 {
        font-size: 16px;
    }
    
    .products-table th,
    .products-table td {
        padding: 8px 5px;
        font-size: 11px;
    }
    
    .size-label {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .price-input {
        font-size: 14px !important;
    }
}

/* Landscape-Modus auf Tablets */
@media (max-width: 1024px) and (orientation: landscape) {
    .products-table th,
    .products-table td {
        padding: 10px 8px;
    }
}

/* Dark Mode Support (falls Theme Dark Mode hat) */
@media (prefers-color-scheme: dark) {
    .appizza-bulk-wrapper {
        color: #e1e8ed;
    }
    
    .products-container,
    .bulk-controls,
    .stat-card {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .products-table thead {
        background: #2a2a2a;
    }
    
    .products-table tbody tr:hover {
        background-color: #2a2a2a;
    }
    
    .products-table tbody tr {
        border-bottom-color: #333;
    }
    
    .search-box,
    .price-input {
        background: #2a2a2a;
        border-color: #444;
        color: #e1e8ed;
    }
    
    .product-title,
    .stat-value {
        color: #e1e8ed;
    }
}

/* Print Styles (falls jemand die Seite drucken möchte) */
@media print {
    .bulk-header,
    .bulk-controls,
    .bulk-stats {
        display: none;
    }
    
    .toggle-switch,
    .status-toggle {
        display: none;
    }
    
    .products-table {
        font-size: 10pt;
    }
}

/* Accessibility Improvements */
.toggle-switch:focus-within .toggle-slider,
.status-toggle:focus-within .status-slider {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.price-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bulk-header {
        background: #000;
        border: 2px solid #fff;
    }
    
    .toggle-slider {
        border: 2px solid #000;
    }
    
    .products-table {
        border: 2px solid #000;
    }
}

