[data-astro-image] {
    width: 100%;
    height: auto;
    object-fit: var(--fit);
    object-position: var(--pos);
    aspect-ratio: var(--w) / var(--h);
}

[data-astro-image="responsive"] {
    max-width: calc(var(--w) * 1px);
    max-height: calc(var(--h) * 1px);
}

[data-astro-image="fixed"] {
    width: calc(var(--w) * 1px);
    height: calc(var(--h) * 1px);
}

.ui-datepicker {
    font-size: 0.9em;
}
.pagination {
    margin-bottom: 0;
}
.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

.date-input-group {
    position: relative;
}

.date-input-group .form-control {
    padding-right: 40px;
}

.date-input-group .input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
}

.product-table th,
.product-table td {
    vertical-align: middle;
}

/* Small-box icon customization */
.small-box {
    position: relative;
    overflow: hidden;
}

.small-box .icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    z-index: 1;
}

.small-box .icon i {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.small-box:hover .icon i {
    color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .small-box .icon {
        right: 10px;
    }
    
    .small-box .icon i {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .small-box .icon i {
        font-size: 2rem;
    }
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon i {
    margin-right: 0.5rem;
}

/* เพิ่มสัญลักษณ์ดอกจัน (*) สำหรับฟิลด์ที่จำเป็นต้องระบุข้อมูล */
.required::after {
    content: " *";
    color: red;
    font-weight: bold;
}

.hover-text-white:hover {
    color: white !important;
}

.fs-075rem {
    font-size: 0.75rem;
}

/* Sticky footer styles */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: var(--bs-sidebar-width, 250px); /* เริ่มหลังจาก sidebar */
    right: 0;
    background-color: white;
    border-top: 1px solid #dee2e6;
    box-shadow: 0 -0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1rem;
    z-index: 1050;
    width: calc(100vw - var(--bs-sidebar-width, 250px)); /* กำหนดความกว้างแน่นอน */
}