/* Stock Adjustment Page Styles */

/* 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;
    margin-top: 1rem;
}

.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;
    transform: translateX(2px);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Selected Product Info */
.selected-product-info {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* Form Elements */
.rz-numeric {
    width: 100% !important;
}

.rz-textarea {
    width: 100% !important;
    min-height: 100px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.75rem !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
}

.rz-textarea:focus {
    border-color: #1e3c72 !important;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1) !important;
    outline: none !important;
}

/* Quantity Input Styling */
.quantity-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.quantity-preview {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.quantity-preview.positive {
    background: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.quantity-preview.negative {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.quantity-preview.warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-adjust {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border: none !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    min-width: 150px !important;
}

.btn-adjust:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4) !important;
}

.btn-adjust:disabled {
    background: #cccccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-clear {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%) !important;
    border: none !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    min-width: 120px !important;
}

.btn-clear:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4) !important;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.empty-state-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-state-title {
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Character Counter */
.character-counter {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    margin-top: 0.25rem;
}

/* Validation Messages */
.validation-message {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.validation-message.success {
    background: #f0fdf4;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.validation-message.warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.validation-message.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-adjust,
    .btn-clear {
        width: 100% !important;
        min-width: auto !important;
    }
    
    .quantity-input-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .selected-product-info {
        padding: 1rem;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-state-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .search-results {
        max-height: 250px;
    }
    
    .search-result-item {
        padding: 0.75rem;
    }
    
    .selected-product-info {
        padding: 0.75rem;
    }
    
    .empty-state {
        padding: 1.5rem 0.75rem;
    }
}

/* Custom Scrollbar */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1e3c72 0%, #059669 100%);
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2a5298 0%, #047857 100%);
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* Focus States */
.rz-numeric:focus,
.rz-textarea:focus {
    border-color: #1e3c72 !important;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1) !important;
    outline: none !important;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #1e3c72;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
