/* Custom styles for Cement E-Commerce */

/* Auth layout styles */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.auth-card .card-body {
    padding: 2.5rem;
}

/* Ensure proper spacing for form elements */
.auth-card .form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.auth-card .input-group {
    margin-bottom: 1rem;
}

.auth-card .btn {
    padding: 0.75rem 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }
    
    .auth-card .card-body {
        padding: 1.5rem;
    }
}

.sidebar {
    position: fixed;
    top: 0;
    /* Navbar height */
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar-sticky {
    position: sticky;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.nav-link {
    color: #333;
    border-radius: 0.25rem;
    margin: 0.1rem 0.5rem;
}

.nav-link:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.nav-link.active {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.nav-link i {
    margin-right: 0.5rem;
}

/* POS specific styles */
.pos-container {
    max-width: 1200px;
    margin: 0 auto;
}

.pos-item-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pos-item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pos-item-card.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Table-based POS styles */
.pos-item-row {
    transition: background-color 0.2s ease;
}

.pos-item-row:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
}

.pos-item-row[style*="cursor: pointer"]:hover {
    cursor: pointer;
}

.pos-item-row.table-secondary:hover {
    background-color: #f8f9fa !important;
    cursor: not-allowed;
}

#products-table {
    font-size: 0.9rem;
}

#products-table td {
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
}

#products-table .badge {
    font-size: 0.75rem;
    min-width: 60px;
}

.cart-item {
    border-left: 3px solid #007bff;
    background-color: #f8f9fa;
    transition: all 0.2s ease;
}

.cart-item:hover {
    background-color: #e9ecef;
}

/* Search and filter styles */
#product-search:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Sticky table header */
.table-responsive .sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Product action buttons */
.add-to-cart-btn {
    min-width: 80px;
    font-size: 0.8rem;
}

.add-to-cart-btn:hover {
    transform: translateY(-1px);
}

/* Results counter styling */
.pos-container .text-muted small {
    font-style: italic;
}

/* Stock level indicators */
.stock-high { color: #28a745; }
.stock-medium { color: #ffc107; }
.stock-low { color: #dc3545; }
.stock-out { color: #6c757d; }

/* Receipt styles */
.receipt-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border: 1px solid #ddd;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.receipt-items {
    border-bottom: 1px solid #ddd;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.receipt-total {
    font-size: 1.2rem;
    font-weight: bold;
    border-top: 2px solid #000;
    padding-top: 0.5rem;
}

/* Dashboard cards */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

/* Form improvements */
.form-floating > label {
    padding-left: 1rem;
}

/* Table improvements */
.table-responsive {
    border-radius: 0.375rem;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Button improvements */
.btn {
    border-radius: 0.375rem;
}

.btn-group-sm > .btn, .btn-sm {
    font-size: 0.875rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        padding: 0;
    }
    
    .pos-container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-start-primary {
    border-left: 3px solid #007bff !important;
}

.border-start-success {
    border-left: 3px solid #28a745 !important;
}

.border-start-warning {
    border-left: 3px solid #ffc107 !important;
}

.border-start-danger {
    border-left: 3px solid #dc3545 !important;
}