/* --- Variáveis para facilitar a manutenção --- */
:root {
    --primary-color: #E96332;
    --primary-hover: #e67e00;
    --bg-light: #f9f9f9;
    --border-color: #ddd;
    --text-main: #333;
    --text-muted: #666;
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* --- Container Principal --- */
.filter-wrapper {
    width: 100%;
    background: #ffffff;
    padding: 24px;
    box-sizing: border-box;
    margin-bottom: 30px;
    border-radius: 12px; /* Cantos arredondados no container */
}

/* --- Grid Responsivo --- */
.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 80%;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .filter-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .filter-grid { grid-template-columns: repeat(4, 1fr); }
    .span-2 { grid-column: span 2; }
}

/* --- Grupos de Filtro --- */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.filter-group label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* --- Elementos de Formulário --- */
.standard-input, 
.standard-select, 
.select-trigger {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background-color: var(--bg-light);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.standard-input:focus, 
.standard-select:focus,
.custom-select-wrapper.active .select-trigger {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

/* --- Custom Select (Dropdowns) --- */
.custom-select-wrapper {
    position: relative;
}

/* Melhorei o feedback de desabilitado */
.custom-select-wrapper.disabled-fade,
.custom-select-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
    pointer-events: none;
}

.select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.select-trigger i.arrow-down {
    border: solid var(--text-muted);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-select-wrapper.active .select-trigger i.arrow-down {
    transform: rotate(-135deg) translateY(-2px);
    border-color: var(--primary-color);
}

/* --- Dropdown Otimizado --- */
.select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 999;
    box-shadow: var(--shadow);
    padding: 12px;
    box-sizing: border-box;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* --- Busca Interna Otimizada --- */
.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    background: #fdfdfd;
	margin: 0 auto;
}

.options-list {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Customização da barra de scroll para ficar elegante */
.options-list::-webkit-scrollbar {
    width: 6px;
}
.options-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.option-item:hover {
    background-color: #fff5e6;
    color: var(--primary-color);
}

.option-item input {
    margin-right: 12px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* --- Botões e Ações --- */
.filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-clear {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s;
}

.btn-clear:hover {
    color: #ff4444;
}

.btn-filter {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-filter:hover {
    transform: translateY(-2px);
}

.btn-filter:active {
    transform: translateY(0);
}
.active-filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    margin-bottom: 10px;
}

.filter-tag {
    display: flex;
    align-items: center;
    background: #fff5e6; /* Laranja suave */
    border: 1px solid #FF8C00;
    color: #FF8C00;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.filter-tag span {
    font-weight: 400;
    margin-right: 5px;
    opacity: 0.8;
}

.remove-tag {
    margin-left: 10px;
    cursor: pointer;
    background: #FF8C00;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.remove-tag:hover {
    background: #e67e00;
}