:root {
    --bs-focus-ring-color: transparent;
    --seller-primary: #0d6efd;
    --seller-primary-hover: #0b5ed7;
}

[class*="form-"]:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #0d6efd !important;
    box-shadow: none !important;
    outline: none;
}

/* Width 1.5 */
.col-lg-1-5 {
    flex: 0 0 auto;
    width: 12.5%;
}

/* Width 2.5 */
.col-lg-2-5 {
    flex: 0 0 auto;
    width: 22.5%;
}

    /*
    ** Search input group styling
    */
.search-text {
    position: relative;
}

.search-text .form-control {
    border-radius: 0.375rem !important;
    padding-right: 0.75rem; /* Padding mặc định của Bootstrap */
}

/* Override chỉ khi có nút */
.search-text:has(.clear-search-btn) .form-control {
    padding-right: 38px !important;
}

/* Clear button styling */
.search-text .clear-search-btn {
    position: absolute;
    right: 1px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    border: none;
    background: transparent;
    padding: 0;
    border-radius: 0 0.25rem 0.25rem 0;
    color: #6c757d;
    transition: all 0.2s ease;
    width: 36px;
    height: calc(100% - 2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Icon size */
.search-text .clear-search-btn i {
    font-size: 16px;
}

/* Hover state */
.search-text .clear-search-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Active/click state */
.search-text .clear-search-btn:active {
    background-color: #e9ecef;
}

/* Focus state */
.search-text .form-control:focus {
    border-color: #0d6efd !important;
}

/* Khi input có focus, button cũng đổi style */
.search-text:focus-within .clear-search-btn {
    color: #0d6efd;
}

.search-text:focus-within .clear-search-btn:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

/* Disable outline cho button */
.search-text .clear-search-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Pagination styling fixes */
.pagination {
    margin-bottom: 0;
}

.page-item .page-link {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    color: #6c757d;
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6 #dee2e6 #0d6efd #dee2e6;
    color: #495057;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.page-item.active .page-link:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}

.page-item .page-link:focus {
    box-shadow: none;
}

    /*
    ** Input group with ending button
    */
.form-label {
    font-weight: 500;
    color: #495057;
}

/* Input group focus handling */
.input-group:focus-within .form-control {
    border-color: #0d6efd !important;
}

.input-group:focus-within .input-group-text {
    border-color: #0d6efd !important;
}

.input-group:focus-within .btn-end {
    border-color: #0d6efd !important;
}

/* Button style in input group */
.btn-end {
    border-color: #ced4da;
}

.btn-end:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
    color: #495057;
}

    /*
    ** Action buttons with border and hover fill
    ** Use for index.blade RUD 
    */
.btn-action {
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid;
}

.btn-action i {
    font-size: 14px;
}

/* Info button (View) */
.btn-action-info {
    color: #0dcaf0;
    border-color: #0dcaf0;
}

.btn-action-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: white;
}

/* Primary button (Edit) */
.btn-action-primary {
    color: #0d6efd;
    border-color: #0d6efd;
}

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

/* Danger button (Delete) */
.btn-action-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-action-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Remove default link underline */
.btn-action {
    text-decoration: none;
}

    /*
    ** Misc.
    */
/* Horizontal rule */
hr {
    margin: 1.5rem 0;
    opacity: 0.1;
}

/* Table header styling */
.table thead th {
    font-weight: 600;
    color: #495057;
}

/* Hover effect for table rows */
.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.02);
}




/* OPTIMIZED: Lightweight hover effects */
.img-thumbnail[onclick],
img[style*="cursor: pointer"],
.clickable-image,
.product-image[onclick],
.product-thumb[onclick] {
    /* Remove transition for performance */
    transition: none;
    cursor: pointer;
}

.img-thumbnail[onclick]:hover,
img[style*="cursor: pointer"]:hover,
.clickable-image:hover,
.product-image[onclick]:hover,
.product-thumb[onclick]:hover {
    /* Remove transform and z-index changes - performance killers */
    transform: none;
    /* Lighter shadow without transition */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* No z-index change to avoid reflow */
    z-index: auto;
}

/* OPTIMIZED: Preview images hover - lightweight */
.image-preview img.img-thumbnail,
.preview-container img.img-thumbnail,
.current-files img.img-thumbnail {
    /* Remove transitions for smooth scrolling */
    transition: none;
    cursor: pointer;
}

.image-preview img.img-thumbnail:hover,
.preview-container img.img-thumbnail:hover,
.current-files img.img-thumbnail:hover {
    /* Simple hover effect without transform */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* Optional: slight opacity change instead of transform */
    opacity: 0.9;
}

/* File icon containers - keep minimal effects */
.file-icon-container {
    transition: background-color 0.15s ease;
}

.file-icon-container:hover {
    /* Simple background change only - no transform */
    background-color: #e9ecef;
}

/* Rate cards - minimal transition */
.rate-card {
    transition: background-color 0.15s ease;
}

.rate-card:hover {
    background-color: #f8f9fa;
}

/* ===== UNIFIED HOVER EFFECTS - SAFE ADDITION ===== */
.img-thumbnail[onclick]:hover,
img[style*="cursor: pointer"]:hover,
.clickable-image:hover,
.product-image[onclick]:hover,
.product-thumb[onclick]:hover {
    /* Override any existing hover effects safely */
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    opacity: 0.9 !important;
    z-index: auto !important;
}

.image-preview img.img-thumbnail:hover,
.preview-container img.img-thumbnail:hover,
.current-files img.img-thumbnail:hover {
    /* Unified preview hover */
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    opacity: 0.9 !important;
}
/* Mobile responsive */
@media (max-width: 768px) {
    .page-item .page-link {
        min-width: 28px;
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
        text-align: center;
    }

    /* Pagination section: stack centered on mobile */
    .pagination-section {
        justify-content: center !important;
        flex-direction: column;
        align-items: center !important;
        gap: 0.4rem !important;
    }
    .pagination-section .text-end {
        text-align: center !important;
    }
    .pagination-section .form-select-sm {
        height: calc(1.5em + 0.5rem + 2px);
        font-size: 0.8rem;
    }
    /* Prevent pagination overflow on small screens */
    .pagination-section nav {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        justify-content: center;
    }
    .pagination-section .pagination {
        flex-wrap: nowrap;
        margin-bottom: 0;
    }
}