/**
 * Inventory Page Responsive Styles
 * Optimized for mobile, tablet, and desktop
 */

/* Inventory Table Responsive */
.inventory-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .inventory-table-wrapper table {
        font-size: 0.85rem;
    }
    
    .inventory-table-wrapper th,
    .inventory-table-wrapper td {
        padding: 0.5rem;
    }
    
    .inventory-table-wrapper .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

@media (max-width: 480px) {
    .inventory-table-wrapper table {
        font-size: 0.75rem;
    }
    
    .inventory-table-wrapper th,
    .inventory-table-wrapper td {
        padding: 0.4rem 0.3rem;
    }
    
    .inventory-table-wrapper .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Page Header with Actions */
.inventory-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .inventory-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .inventory-page-header > div:last-child {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .inventory-page-header .btn {
        flex: 1;
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .inventory-page-header h1 {
        font-size: 1.25rem;
    }
    
    .inventory-page-header .btn {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Filter Bar */
.inventory-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .inventory-filter-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .inventory-filter-bar input,
    .inventory-filter-bar select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .inventory-filter-bar {
        gap: 0.5rem;
    }
    
    .inventory-filter-bar input,
    .inventory-filter-bar select {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Inventory Stats Cards */
.inventory-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .inventory-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .inventory-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .inventory-stats-grid > div {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .inventory-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .inventory-stats-grid > div {
        padding: 0.6rem;
    }
    
    .inventory-stats-grid .stat-value {
        font-size: 1.25rem !important;
    }
}

/* Stock Adjustment Form */
.stock-adjust-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .stock-adjust-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stock-adjust-form {
        gap: 0.5rem;
    }
    
    .stock-adjust-form .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .stock-adjust-form label {
        font-size: 0.85rem;
    }
}

/* Stock Transfer Form */
.stock-transfer-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .stock-transfer-form {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stock-transfer-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .stock-transfer-form {
        gap: 0.5rem;
    }
    
    .stock-transfer-form .form-control {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Action Buttons in Table */
.table-actions {
    display: flex;
    gap: 0.25rem;
}

@media (max-width: 768px) {
    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-actions .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Compact Table for Mobile */
@media (max-width: 480px) {
    .inventory-table-wrapper .hide-mobile {
        display: none;
    }
}

/* Empty State */
.inventory-empty-state {
    text-align: center;
    padding: 3rem;
}

@media (max-width: 768px) {
    .inventory-empty-state {
        padding: 2rem;
    }
    
    .inventory-empty-state svg {
        width: 48px;
        height: 48px;
    }
    
    .inventory-empty-state h3 {
        font-size: 1rem;
    }
    
    .inventory-empty-state p {
        font-size: 0.85rem;
    }
}

/* Stock History Table */
.stock-history-table {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .stock-history-table {
        font-size: 0.8rem;
    }
    
    .stock-history-table th,
    .stock-history-table td {
        padding: 0.4rem;
    }
}

@media (max-width: 480px) {
    .stock-history-table {
        font-size: 0.75rem;
    }
    
    .stock-history-table th,
    .stock-history-table td {
        padding: 0.3rem 0.2rem;
    }
}

/* Location Select Group */
.location-select-group {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .location-select-group {
        flex-direction: column;
    }
    
    .location-select-group select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .location-select-group select {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
}

/* Stock Quantity Input */
.stock-qty-input {
    width: 80px;
}

@media (max-width: 480px) {
    .stock-qty-input {
        width: 60px;
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
}
