/**
 * Lager Status Modal Styles
 * Compact, clean stock status modal
 */

/* Modal Overlay */
.lager-status-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overscroll-behavior: contain;
}

.lager-status-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    touch-action: none;
}

/* Modal Dialog */
.lager-status-dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.3);
    width: 480px;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
    animation: lagerModalFadeIn 0.2s ease-out;
}

@keyframes lagerModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.lager-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: none;
    background: var(--shop-header-bg, #1a365d);
}

.lager-status-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lager-status-header h3::before {
    content: '📦';
    font-size: 1.1rem;
}

.lager-status-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.25rem;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.lager-status-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Content */
.lager-status-content {
    padding: 0;
    overflow-y: auto;
    max-height: 60vh;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.lager-loading,
.lager-empty,
.lager-error {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
}

.lager-error {
    color: #dc2626;
}

/* Table Styles */
.lager-status-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.lager-status-table th,
.lager-status-table td {
    padding: 10px 16px;
    text-align: left;
}

.lager-status-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 2px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.lager-status-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.lager-status-table tbody tr:hover {
    background: #f8fafc;
}

.lager-status-table tbody tr:last-child {
    border-bottom: none;
}

/* Cell Types */
.lager-produktnr {
    font-weight: 500;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
}

.lager-storrelse {
    color: #1e293b;
    font-weight: 500;
}

.lager-warehouse-cell {
    min-width: 100px;
}

.lager-quantity {
    font-weight: 600;
    color: #059669;
}

.lager-expected {
    font-size: 0.6875rem;
    color: #64748b;
    font-style: italic;
}

.lager-unknown {
    color: #cbd5e1;
}

/* Color indicators */
.lager-warehouse-cell .fa-circle {
    font-size: 0.625rem;
}

/* Responsive */
@media (max-width: 520px) {
    .lager-status-dialog {
        width: 100%;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .lager-status-table th,
    .lager-status-table td {
        padding: 8px 12px;
    }
    
    .lager-status-table {
        font-size: 0.75rem;
    }
    
    .lager-warehouse-cell {
        min-width: 80px;
    }

    /* Mobile: no rounded borders, full width */
    .lager-status-dialog {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
        width: 100%;
    }

    .lager-status-modal {
        padding: 0;
    }

    .lager-status-header {
        border-radius: 0;
    }
}

/* Print styles */
@media print {
    .lager-status-modal {
        position: static;
    }
    
    .lager-status-overlay {
        display: none;
    }
    
    .lager-status-dialog {
        width: 100%;
        max-height: none;
        box-shadow: none;
    }
    
    .lager-status-close {
        display: none;
    }
}
