/* CSS Module cho tab Filter Effects */

/* Container chính cho tab filter */
#tab-filter-effects {
    padding: 8px 5px;
}

/* Nhóm các điều khiển */
#tab-filter-effects .style-group {
    margin-bottom: 12px;
}

/* Hàng điều khiển */
#tab-filter-effects .style-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* Label cho các điều khiển */
#tab-filter-effects .style-label {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: #495057;
    font-weight: 500;
    flex: 0 0 auto;
    min-width: 100px;
}

/* Icon trong label */
#tab-filter-effects .style-icon {
    margin-right: 6px;
    font-size: 0.9rem;
}

/* Container cho thanh trượt */
#tab-filter-effects .style-slider-container {
    width: 100%;
    flex: 1;
    max-width: calc(100% - 110px);
    margin-left: 10px;
}

/* Container cho dropdown */
#tab-filter-effects .style-select-container {
    width: 100%;
    flex: 1;
    max-width: calc(100% - 110px);
    margin-left: 10px;
}

/* Dropdown select */
#tab-filter-effects .style-select {
    width: 100%;
    padding: 6px 8px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    font-size: 0.8rem;
    color: #495057;
    transition: all 0.2s ease;
}

#tab-filter-effects .style-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Thanh trượt */
#tab-filter-effects .style-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

#tab-filter-effects .style-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
    transition: all 0.2s ease;
}

#tab-filter-effects .style-slider::-webkit-slider-thumb:hover {
    background: #0056b3;
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0,123,255,0.4);
}

#tab-filter-effects .style-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* Tabs cho các danh mục filter */
.filter-categories {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
}

.filter-category-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 4px;
    font-size: 0.75rem;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-weight: 500;
}

.filter-category-btn:hover {
    color: #007bff;
}

.filter-category-btn.active {
    color: #007bff;
}

.filter-category-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007bff;
}

/* Grid container */
.filter-grid-container {
    position: relative;
    margin-bottom: 15px;
    min-height: 200px;
}

/* Grid hiển thị các filter */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    display: none;
}

.filter-grid.active {
    display: grid;
}

/* Item trong grid */
.filter-item {
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
}

.filter-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.filter-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

/* Preview cho filter */
.filter-preview {
    width: 100%;
    height: 60px;
    background-size: cover;
    background-position: center;
}

/* Tên filter */
.filter-name {
    padding: 4px;
    text-align: center;
    font-size: 0.7rem;
    color: #495057;
    background-color: rgba(255, 255, 255, 0.9);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* Color picker */
#tab-filter-effects .style-color-picker {
    width: 30px;
    height: 30px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    background: none;
    margin-left: auto;
}

#tab-filter-effects .style-color-picker:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

/* Nút reset */
#tab-filter-effects .reset-btn {
    display: block;
    margin: 15px auto 5px;
    padding: 6px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #495057;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#tab-filter-effects .reset-btn:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

/* Hiệu ứng loading khi đang áp dụng bộ lọc */
.filter-loading {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: auto;
    height: auto;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.filter-loading.active {
    opacity: 0.8;
    pointer-events: none; /* Vẫn cho phép tương tác với các phần tử bên dưới */
}

.filter-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 123, 255, 0.2);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hiển thị giá trị */
#filterIntensityValue {
    display: inline-block;
    font-size: 0.8rem;
    color: #495057;
    margin-right: 10px;
    width: 40px;
    text-align: right;
}

/* Responsive cho màn hình nhỏ */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
} 