/* Liquor Inventory Frontend Styles */

.liquor-inventory-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Controls Section */
.liquor-inventory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    position: relative;
    min-width: 250px;
}

#frontend-search {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#frontend-search:focus {
    outline: none;
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

/* Button Styles */
.liquor-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-height: 44px;
    box-sizing: border-box;
}

.liquor-btn-primary {
    background-color: #8e44ad;
    color: white;
}

.liquor-btn-primary:hover {
    background-color: #7d3c98;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(142, 68, 173, 0.3);
}

.liquor-btn-small {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

.liquor-btn-danger {
    background-color: #dc3545;
    color: white;
}

.liquor-btn-danger:hover {
    background-color: #c82333;
}

.cancel-btn {
    background-color: #6c757d;
    color: white;
}

.cancel-btn:hover {
    background-color: #5a6268;
}

/* Responsive Container */
.liquor-inventory-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Table View (Desktop/Tablet) */
.table-view {
    display: block;
}

.liquor-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.liquor-table th {
    background: linear-gradient(135deg, #8e44ad 0%, #3498db 100%);
    color: white;
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.liquor-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.liquor-table tr:hover {
    background-color: #f8f9fa;
}

.liquor-table tr:last-child td {
    border-bottom: none;
}

/* Table Cell Styles */
.liquor-name-cell strong {
    font-size: 16px;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.mobile-details {
    display: none;
    font-size: 12px;
    color: #666;
}

.mobile-details .liquor-type,
.mobile-details .brand,
.mobile-details .size {
    display: inline-block;
    margin-right: 10px;
}

.quantity-cell {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.threshold-cell {
    font-weight: 600;
    color: #e67e22;
    background: #fef9e7;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-badge.in-stock {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.low-stock {
    background-color: #f8d7da;
    color: #721c24;
    animation: pulse 2s infinite;
}

/* Card View (Mobile) */
.card-view {
    display: none;
    padding: 20px;
}

.liquor-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.liquor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.liquor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.liquor-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    flex: 1;
    margin-right: 10px;
}

.liquor-card-details {
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px 0;
}

.detail-row .label {
    font-weight: 600;
    color: #666;
    min-width: 80px;
}

.detail-row .value {
    color: #333;
    text-align: right;
}

.detail-row .value.quantity {
    font-size: 18px;
    font-weight: bold;
}

.liquor-card-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* No Data States */
.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.no-data-card {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-data-card p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* Modal Styles */
.liquor-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.liquor-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

.liquor-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.liquor-modal-close:hover {
    color: #333;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.1);
}

/* Threshold Group Styling */
.threshold-group {
    position: relative;
}

.threshold-group input {
    border-color: #e67e22;
}

.threshold-group input:focus {
    border-color: #d35400;
    box-shadow: 0 0 0 3px rgba(211, 84, 0, 0.1);
}

.threshold-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .liquor-inventory-frontend {
        padding: 15px;
    }
    
    .liquor-inventory-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        min-width: auto;
    }
    
    /* Hide table view, show card view */
    .table-view {
        display: none;
    }
    
    .card-view {
        display: block;
        padding: 0;
    }
    
    /* Show mobile details in table view if still visible */
    .mobile-details {
        display: block;
    }
    
    .hide-mobile {
        display: none !important;
    }
    
    /* Modal adjustments */
    .liquor-modal-content {
        margin: 10px;
        padding: 20px;
        width: calc(100% - 20px);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .liquor-card-actions {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .liquor-inventory-frontend {
        padding: 10px;
    }
    
    .liquor-card {
        padding: 16px;
    }
    
    .liquor-card-header h3 {
        font-size: 16px;
    }
    
    .liquor-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .liquor-btn-small {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .liquor-modal-content {
        margin: 5px;
        padding: 15px;
        width: calc(100% - 10px);
    }
    
    .status-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* Print Styles */
@media print {
    .liquor-inventory-controls,
    .liquor-card-actions,
    .actions-cell,
    .liquor-modal {
        display: none !important;
    }
    
    .liquor-inventory-frontend {
        padding: 0;
    }
    
    .liquor-inventory-responsive {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

