/* Modern Sales Page Styles */

/* Page Container - Now in MainLayout */

/* Modern Header */
.sales-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    color: #1e293b;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
}

/* Header Action Buttons */
.header-action-btn {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.header-action-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Layout classes moved to MainLayout.css */

/* Unified Input */
.unified-input-group {
    position: relative;
    margin-bottom: 1rem;
}

.unified-input {
    width: 100% !important;
    padding: 1rem 3rem 1rem 1rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 1.1rem !important;
    font-family: 'Courier New', monospace !important;
    background: #f8fafc !important;
    transition: all 0.3s ease !important;
}

.unified-input:focus {
    border-color: #1e3c72 !important;
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.2) !important;
    outline: none !important;
    background: #ffffff !important;
}

.unified-input.scanner-active {
    border-color: #059669 !important;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2) !important;
    background: #f0fdf4 !important;
}

.unified-input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.5rem;
    pointer-events: none;
}

/* Search Input */
.search-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
}

.search-input:focus {
    border-color: #1e3c72 !important;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1) !important;
    outline: none !important;
}

/* Search Results */
.search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: #f8fafc;
    border-left: 4px solid #1e3c72;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Panel classes moved to MainLayout.css */

/* Cart Items */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.cart-item {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cart-item:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Empty Cart */
.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

/* Responsive Design - Layout moved to MainLayout.css */

.barcode-scanner-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-size: 1.5rem;
    pointer-events: none;
}

/* Manual Search */
.manual-search {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

.manual-search-input {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    border: 2px solid #e3f2fd !important;
    border-radius: 8px !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
}

.manual-search-input:focus {
    border-color: #2196F3 !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1) !important;
    outline: none !important;
}

/* Product Search Results */
.search-results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 1rem;
    background: white;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(33, 150, 243, 0.05) 100%);
    transform: translateX(2px);
}

.search-result-item:last-child {
    border-bottom: none;
}

.product-name {
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 0.25rem;
}

.product-details {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    gap: 1rem;
}

.product-sku {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* Right Panel - Cart */
.cart-panel {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(33, 150, 243, 0.1);
    display: flex;
    flex-direction: column;
}

.cart-title {
    color: #2196F3;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-count {
    background: #2196F3;
    color: white;
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 1.5rem;
    max-height: 450px;
    min-height: 200px;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #2196F3 #f1f1f1;
    scroll-behavior: smooth;
    border: 1px solid rgba(33, 150, 243, 0.1);
    border-radius: 8px;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    position: relative;
}

/* Scroll Shadow Effect */
.cart-items::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.cart-items::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.9) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.cart-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    margin-right: 0.5rem;
    border-left: 4px solid #2196F3;
    transition: all 0.2s ease;
    position: relative;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cart-item:last-child {
    margin-bottom: 1rem;
}

.cart-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.cart-item-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.cart-item-name {
    font-weight: 600;
    color: #1976D2;
    flex: 1;
    margin-right: 0.5rem;
}

.cart-item-remove {
    background: #f44336 !important;
    border: none !important;
    color: white !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8rem !important;
}

.cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: #2196F3 !important;
    border: none !important;
    color: white !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem !important;
    font-weight: bold !important;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
}

.cart-item-price {
    font-weight: 600;
    color: #4CAF50;
    font-size: 1.1rem;
}

/* Cart Summary */
.cart-summary {
    border-top: 2px solid #e0e0e0;
    padding-top: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.summary-label {
    font-weight: 500;
    color: #666;
}

.summary-value {
    font-weight: 600;
    color: #333;
}

.summary-total {
    border-top: 1px solid #e0e0e0;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    font-size: 1.25rem;
}

.summary-total .summary-value {
    color: #4CAF50;
    font-size: 1.5rem;
}

/* Action Buttons */
.cart-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-clear-cart {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%) !important;
    border: none !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    flex: 1 !important;
    transition: all 0.3s ease !important;
}

.btn-clear-cart:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4) !important;
}

.btn-checkout {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%) !important;
    border: none !important;
    color: white !important;
    padding: 0.75rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    flex: 2 !important;
    font-size: 1.1rem !important;
    transition: all 0.3s ease !important;
}

.btn-checkout:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4) !important;
}

.btn-checkout:disabled {
    background: #cccccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-cart-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.empty-cart-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Scanner Animation */
.scanner-active {
    animation: scannerPulse 2s infinite;
}

@keyframes scannerPulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Success Feedback */
.scan-success {
    border-color: #4CAF50 !important;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%) !important;
    animation: scanSuccess 0.5s ease;
}

@keyframes scanSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Responsive Design - Layout moved to MainLayout.css */

/* Custom Scrollbar */
.cart-items::-webkit-scrollbar,
.search-results::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2196F3 0%, #4CAF50 100%);
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1976D2 0%, #45a049 100%);
}
