/* ===================================
   ADVANCED FILTERS LAYOUT - STICKY SIDEBAR
   =================================== */

.filters-layout-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    position: relative;
}

/* Filtros no Topo */
.advanced-filters-sidebar {
    width: 100%;
}

.filters-sticky-wrapper {
    background: #1a1d29;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Light Theme Support */
body:not(.is_dark) .filters-sticky-wrapper {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

/* Custom Scrollbar - Mesmo estilo da página principal */
.filters-sticky-wrapper::-webkit-scrollbar {
    width: 14px;
}

.filters-sticky-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filters-sticky-wrapper::-webkit-scrollbar-thumb {
    background-color: #94b5ee;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

.filters-sticky-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94b5ee;
}

.filters-sticky-wrapper::-webkit-scrollbar-button:vertical:start:decrement,
.filters-sticky-wrapper::-webkit-scrollbar-button:vertical:end:increment {
    height: 12px;
    background: #94b5ee;
    border-radius: 10px;
}

.filters-sticky-wrapper::-webkit-scrollbar-button:vertical:start:decrement {
    height: 12px;
    background: url('/assets/images/cima.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 10px;
}

.filters-sticky-wrapper::-webkit-scrollbar-button:vertical:end:increment {
    height: 12px;
    background: url('/assets/images/baixo.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 10px;
}

/* Conteúdo Principal - Resultados */
.filters-results-content {
    width: 100%;
}

/* Header dos Filtros */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a2d39;
}

.filters-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 700;
}

/* Light Theme */
body:not(.is_dark) .filters-header {
    border-bottom-color: #e0e0e0;
}

body:not(.is_dark) .filters-header h3 {
    color: #2c3e50;
}

.btn-clear-filters {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: #e74c3c;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 16px;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.btn-clear-filters:hover {
    color: #ff5555 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

.btn-clear-filters:focus {
    outline: none !important;
    border: none !important;
    background: transparent !important;
}

/* Filters Grid Layout */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Filter Group */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Filter Label */
.filter-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

body:not(.is_dark) .filter-label {
    color: #2c3e50;
}

/* Custom Select com Dropdown de Checkboxes */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 15px;
    background: #2a2d39;
    border: 1px solid rgba(138, 138, 160, 0.3);
    border-radius: 4px;
    color: #8A8AA0;
    font-size: 16px;
    line-height: 10px;
    transition: all 0.2s ease;
}

.custom-select-trigger * {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
}

.custom-select-trigger:hover {
    background: #3a3d49;
    border-color: #5865f2;
}

.custom-select-trigger .arrow {
    transition: transform 0.2s ease;
    font-size: 12px;
}

.custom-select-wrapper.active .custom-select-trigger .arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #2a2d39;
    border: 1px solid #5865f2;
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Scrollbar customizada do dropdown - padrão do site */
.custom-select-dropdown::-webkit-scrollbar {
    width: 14px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background-color: #94b5ee;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
    background: #94b5ee;
}

.custom-select-dropdown::-webkit-scrollbar-button:vertical:start:decrement,
.custom-select-dropdown::-webkit-scrollbar-button:vertical:end:increment {
    height: 12px;
    background: #94b5ee;
    border-radius: 10px;
}

.custom-select-dropdown::-webkit-scrollbar-button:vertical:start:decrement {
    height: 12px;
    background: url('/assets/images/cima.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 10px;
}

.custom-select-dropdown::-webkit-scrollbar-button:vertical:end:increment {
    height: 12px;
    background: url('/assets/images/baixo.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    border-radius: 10px;
}

.custom-select-wrapper.active .custom-select-dropdown {
    display: block;
}

.custom-option {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #ccc;
    font-size: 16px;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.custom-option * {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: #3a3d49;
}

.custom-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #5865f2;
}

.custom-option .filter-icon-img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
}

.custom-option span {
    flex: 1;
    white-space: nowrap;
}

.custom-option input[type="checkbox"]:checked ~ span {
    color: #fff;
    font-weight: 600;
}

.custom-option-all {
    background: rgba(88, 101, 242, 0.1);
    border-bottom: 2px solid #5865f2 !important;
}

.custom-option-all:hover {
    background: rgba(88, 101, 242, 0.2);
}

/* Light Theme */
body:not(.is_dark) .custom-select-trigger {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #555;
}

body:not(.is_dark) .custom-select-trigger:hover {
    background: #e8e8e8;
    border-color: #5865f2;
}

body:not(.is_dark) .custom-select-dropdown {
    background: #fff;
    border-color: #5865f2;
}

body:not(.is_dark) .custom-option {
    color: #555;
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

body:not(.is_dark) .custom-option:hover {
    background: #f5f5f5;
}

body:not(.is_dark) .custom-option input[type="checkbox"]:checked ~ span {
    color: #2c3e50;
}

body:not(.is_dark) .custom-option-all {
    background: rgba(88, 101, 242, 0.05);
}

body:not(.is_dark) .custom-option-all:hover {
    background: rgba(88, 101, 242, 0.1);
}

/* Checkbox List Container (MVP/Boss) */
.checkbox-list {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.filter-checkbox-inline {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #2a2d39;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-size: 16px;
    color: #ccc;
}

.filter-checkbox-inline * {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
}

.filter-checkbox-inline:hover {
    background: #3a3d49;
}

.filter-checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #5865f2;
}

.filter-checkbox-inline .filter-icon-img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
}

.filter-checkbox-inline span {
    font-size: 16px;
    white-space: nowrap;
}

.filter-checkbox-inline input[type="checkbox"]:checked + .filter-icon-img + span,
.filter-checkbox-inline input[type="checkbox"]:checked + span {
    color: #fff;
    font-weight: 600;
}

body:not(.is_dark) .filter-checkbox-inline {
    background: #f5f5f5;
    color: #555;
}

body:not(.is_dark) .filter-checkbox-inline:hover {
    background: #e8e8e8;
}

body:not(.is_dark) .filter-checkbox-inline input[type="checkbox"]:checked + .filter-icon-img + span,
body:not(.is_dark) .filter-checkbox-inline input[type="checkbox"]:checked + span {
    color: #2c3e50;
}

/* Botões de Ação */
.filter-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-actions .submit {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    outline: none;
    background: #0087FF;
    color: #fff;
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
    transition: background 0.2s ease;
}

.filter-actions .submit:hover {
    background: #5865f2;
}

.filter-actions .submit:focus {
    outline: none;
    border: none;
}

/* Input fields - padrão do site */
.advanced-filters-sidebar textarea,
.advanced-filters-sidebar input[type="text"],
.advanced-filters-sidebar input[type="password"],
.advanced-filters-sidebar input[type="datetime"],
.advanced-filters-sidebar input[type="datetime-local"],
.advanced-filters-sidebar input[type="date"],
.advanced-filters-sidebar input[type="month"],
.advanced-filters-sidebar input[type="time"],
.advanced-filters-sidebar input[type="week"],
.advanced-filters-sidebar input[type="number"],
.advanced-filters-sidebar input[type="email"],
.advanced-filters-sidebar input[type="url"],
.advanced-filters-sidebar input[type="search"],
.advanced-filters-sidebar input[type="tel"],
.advanced-filters-sidebar input[type="color"],
#mob-list-table_filter input[type="search"] {
    border: 1px solid rgba(138, 138, 160, 0.3);
    outline: 0;
    -webkit-box-shadow: none;
    -moz-box-shadow: none;
    box-shadow: none;
    font-size: 16px;
    line-height: 10px;
    border-radius: 4px;
    padding: 11px 15px;
    width: 100%;
    background: transparent;
    color: #8A8AA0;
    cursor: text;
}

.advanced-filters-sidebar textarea:focus,
.advanced-filters-sidebar input[type="text"]:focus,
.advanced-filters-sidebar input[type="password"]:focus,
.advanced-filters-sidebar input[type="datetime"]:focus,
.advanced-filters-sidebar input[type="datetime-local"]:focus,
.advanced-filters-sidebar input[type="date"]:focus,
.advanced-filters-sidebar input[type="month"]:focus,
.advanced-filters-sidebar input[type="time"]:focus,
.advanced-filters-sidebar input[type="week"]:focus,
.advanced-filters-sidebar input[type="number"]:focus,
.advanced-filters-sidebar input[type="email"]:focus,
.advanced-filters-sidebar input[type="url"]:focus,
.advanced-filters-sidebar input[type="search"]:focus,
.advanced-filters-sidebar input[type="tel"]:focus,
.advanced-filters-sidebar input[type="color"]:focus,
#mob-list-table_filter input[type="search"]:focus {
    cursor: url('/assets/images/c2.png') 0 0, text;
}

/* Contador de Filtros */
.filter-count {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    background: #2a2d39;
    border-radius: 6px;
}

.filter-count small {
    color: #ccc;
    font-size: 14px;
}

/* Light Theme */
body:not(.is_dark) .filter-count {
    background: #f5f5f5;
}

body:not(.is_dark) .filter-count small {
    color: #666;
}

/* Toggle de Filtros */
.filter-toggle-container {
    text-align: center;
    margin-top: 10px;
}

.filter-toggle-btn {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding: 5px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    font-size: 14px;
}

button.filter-toggle-btn:hover {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

button.filter-toggle-btn:focus {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

button.filter-toggle-btn:active {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

button.filter-toggle-btn:focus-visible {
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.filter-toggle-btn span {
    cursor: url('/assets/images/c2.png') 0 0, pointer !important;
}

.filter-toggle-btn .toggle-arrow {
    color: #999;
    font-size: 18px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.filter-toggle-btn .text-muted {
    color: #999;
    font-size: 14px;
}

.filters-sticky-wrapper.collapsed {
    padding: 5px 15px 5px 15px;
}

.filters-sticky-wrapper.collapsed .filter-count {
    margin-top: 0;
}

.filters-sticky-wrapper.collapsed .filters-grid,
.filters-sticky-wrapper.collapsed .filter-actions {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.filters-sticky-wrapper:not(.collapsed) .filters-grid,
.filters-sticky-wrapper:not(.collapsed) .filter-actions {
    max-height: 5000px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.filters-sticky-wrapper.collapsed .toggle-arrow {
    transform: rotate(180deg);
}

/* Responsividade */
/* Padding do themesflat-container */
.flat-title-page .themesflat-container {
    padding-left: 20px;
    padding-right: 20px;
}

@media (max-width: 1024px) {
    .flat-title-page .themesflat-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .filters-layout-container {
        padding: 10px;
    }

    .filters-sticky-wrapper {
        padding: 15px;
    }

    .filters-header h3 {
        font-size: 16px;
    }

    .btn-clear-filters {
        font-size: 14px;
        padding: 6px 10px;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-select {
        min-height: 100px;
    }

    .filter-label {
        font-size: 15px;
    }

    .form-control {
        font-size: 15px;
    }
}

/* Dark Mode Enhancement */
.is_dark .filters-sticky-wrapper {
    background: #1a1d29;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.is_dark .filter-title {
    background: #2a2d39;
}

.is_dark .filter-title:hover {
    background: #3a3d49;
}

.is_dark .filter-checkbox:hover {
    background: #2a2d39;
}

/* Badge de Filtro Ativo */
.filter-active-badge {
    display: inline-block;
    background: #5865f2;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
}

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

.filters-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #2a2d39;
    border-top-color: #5865f2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===================================
   BREADCRUMB SEO
   =================================== */

.breadcrumb-seo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px 0;
    font-size: 0.9rem;
}

.breadcrumb-seo a {
    color: #5865f2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-seo a:hover {
    color: #4752c4;
    text-decoration: underline;
}

.breadcrumb-seo .separator {
    color: #999;
    user-select: none;
}

.breadcrumb-seo .current {
    color: #fff;
    font-weight: 500;
}

/* Light Theme */
body:not(.is_dark) .breadcrumb-seo .separator {
    color: #666;
}

body:not(.is_dark) .breadcrumb-seo .current {
    color: #2c3e50;
}

/* Page Title */
.page-title-section {
    margin-bottom: 30px;
}

.page-title-section h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #fff;
    font-weight: 700;
}

body:not(.is_dark) .page-title-section h1 {
    color: #2c3e50;
}

@media (max-width: 768px) {
    .page-title-section h1 {
        font-size: 2rem;
    }
}

/* ===================================
   CORREÇÕES DE TEMA DOS FILTROS
   =================================== */

/* Força consistência de tema nos filtros - Dark Mode */
.is_dark .filters-sticky-wrapper {
    background: #1a1d29 !important;
    border: none !important;
}

.is_dark .filters-header {
    border-bottom-color: #2a2d39 !important;
}

.is_dark .filters-header h3 {
    color: #fff !important;
}

.is_dark .filter-title {
    background: #2a2d39 !important;
    color: #fff !important;
}

.is_dark .filter-checkbox {
    color: #ccc !important;
}

.is_dark .filter-checkbox:hover {
    background: #2a2d39 !important;
}

.is_dark .range-labels {
    color: #ccc !important;
}

.is_dark .filter-count {
    background: #2a2d39 !important;
}

.is_dark .filter-count small {
    color: #ccc !important;
}

/* Força consistência de tema nos filtros - Light Mode */
body:not(.is_dark) .filters-sticky-wrapper {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
}

body:not(.is_dark) .filters-header {
    border-bottom-color: #e0e0e0 !important;
}

body:not(.is_dark) .filters-header h3 {
    color: #2c3e50 !important;
}

body:not(.is_dark) .filter-title {
    background: #f5f5f5 !important;
    color: #2c3e50 !important;
}

body:not(.is_dark) .filter-checkbox {
    color: #555 !important;
}

body:not(.is_dark) .filter-checkbox:hover {
    background: #f5f5f5 !important;
}

body:not(.is_dark) .range-labels {
    color: #666 !important;
}

body:not(.is_dark) .filter-count {
    background: #f5f5f5 !important;
}

body:not(.is_dark) .filter-count small {
    color: #666 !important;
}

/* Breadcrumb segue tema */
.is_dark .breadcrumb-seo a {
    color: #5865f2 !important;
}

.is_dark .breadcrumb-seo .current {
    color: #fff !important;
}

.is_dark .breadcrumb-seo .separator {
    color: #999 !important;
}

body:not(.is_dark) .breadcrumb-seo .current {
    color: #2c3e50 !important;
}

body:not(.is_dark) .breadcrumb-seo .separator {
    color: #666 !important;
}

/* Page title segue tema */
.is_dark .page-title-section h1 {
    color: #fff !important;
}

body:not(.is_dark) .page-title-section h1 {
    color: #2c3e50 !important;
}
