/* Custom Styles for Inventory System */

/* Global Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.table th {
    background-color: #f8f9fa;
}

/* Dashboard Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card .card-img-top {
    overflow: hidden;
}

/* Stats Cards */
.bg-primary, .bg-success, .bg-info, .bg-warning, .bg-danger {
    transition: all 0.3s ease;
}

.bg-primary:hover, .bg-success:hover, .bg-info:hover, .bg-warning:hover, .bg-danger:hover {
    transform: translateY(-5px);
}

/* Form Controls */
.form-control:focus, .form-select:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Buttons */
.btn {
    border-radius: 0.25rem;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Step Progress Bar */
.bs-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    color: #6c757d;
}

.step::before, .step::after {
    content: '';
    position: absolute;
    top: 20px;
    height: 3px;
    background-color: #e9ecef;
    z-index: 1;
}

.step::before {
    right: 50%;
    left: -50%;
}

.step::after {
    left: 50%;
    right: -50%;
}

.bs-stepper .step:first-child::before,
.bs-stepper .step:last-child::after {
    display: none;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-text {
    font-size: 0.875rem;
    text-align: center;
}

.step.active .step-circle {
    background-color: #0d6efd;
    color: white;
}

.step.active .step-text {
    color: #0d6efd;
    font-weight: bold;
}

.step.active::before, .step.active::after {
    background-color: #0d6efd;
}

/* Table Responsive Styles */
.table-responsive {
    overflow-x: auto;
}

/* Action Buttons */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Product Cards */
.product-card {
    height: 100%;
}

.product-card .card-img-top {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
}

/* Order Status Colors */
.status-pending {
    color: #ffc107;
}

.status-processing {
    color: #17a2b8;
}

.status-shipped {
    color: #007bff;
}

.status-delivered {
    color: #28a745;
}

.status-cancelled {
    color: #dc3545;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .bs-stepper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .step {
        flex-direction: row;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .step::before, .step::after {
        display: none;
    }
    
    .step-circle {
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .step-text {
        text-align: left;
    }
}

/* Print Styles */
@media print {
    header, footer, .btn, .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
    
    .card-header, .card-footer {
        background-color: white;
    }
    
    main {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    .container {
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Header and Dropdown Enhancements */
header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
}

.navbar {
    position: relative;
    z-index: 1030;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dropdown-menu {
    z-index: 1031 !important;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    position: relative;
}

.dropdown-item:hover, 
.dropdown-item:focus, 
.dropdown-item:active {
    background-color: #0d6efd !important;
    color: white !important;
}

.dropdown-toggle::after {
    margin-left: 0.5em;
}

/* Make sure nested elements don't interfere with dropdown visibility */
.card, .table-responsive, .form-control, .modal {
    position: relative;
    z-index: 1;
}

/* Add a transition effect for smoother dropdown appearance */
.dropdown-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: visibility 0s, opacity 0.2s, transform 0.2s;
}

.dropdown-menu.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Make sure all modals appear above the header */
.modal {
    z-index: 1060 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}
}