/**
 * Estilos para os componentes de select personalizados
 * Meu Controle - Sistema de Controle Financeiro Pessoal
 * Inspirado no modelo Listbox
 */

/* Estilos para o select simples */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.custom-select-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.625rem 1rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    color: #1f2937;
    line-height: 1.25rem;
}

.custom-select-button:hover {
    background-color: #f9fafb;
}

.custom-select-button:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.custom-select-button-icon {
    color: #6b7280;
    margin-left: 0.75rem;
    flex-shrink: 0;
}

.custom-select-options {
    position: absolute;
    z-index: 50;
    margin-top: 0.25rem;
    width: 100%;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 15rem;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    padding: 0.25rem;
}

.custom-select-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 0.375rem;
    margin: 0.125rem 0;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #1f2937;
}

.custom-select-option:hover {
    background-color: #f3f4f6;
}

.custom-select-option.bg-blue-50 {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

.custom-select-option.bg-blue-50 .custom-select-check {
    display: inline-flex;
}

.custom-select-check {
    display: none;
    margin-right: 0.5rem;
    color: #2563eb;
}

/* Estilos para o select múltiplo */
.custom-multi-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.custom-multi-select-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 42px;
    width: 100%;
    padding: 0.625rem 1rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    color: #1f2937;
    line-height: 1.25rem;
}

.custom-multi-select-container:hover {
    background-color: #f9fafb;
}

.custom-multi-select-container:focus-within {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.8);
}

.custom-multi-select-search {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 0.25rem;
    font-size: 0.875rem;
    background-color: transparent;
    color: #1f2937;
    min-width: 120px;
}

.custom-multi-select-dropdown {
    position: absolute;
    z-index: 50;
    margin-top: 0.25rem;
    width: 100%;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: 15rem;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    padding: 0.25rem;
}

.custom-multi-select-option {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 0.375rem;
    margin: 0.125rem 0;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #1f2937;
}

.custom-multi-select-option:hover {
    background-color: #f3f4f6;
}

.custom-multi-select-option.focused {
    background-color: #f3f4f6;
}

.custom-multi-select-option.bg-blue-50 {
    background-color: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

.custom-multi-select-item {
    display: inline-flex;
    align-items: center;
    background-color: #eff6ff;
    color: #1e40af;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    border: 1px solid #dbeafe;
}

.custom-multi-select-item-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.375rem;
    color: #3b82f6;
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    transition: all 0.15s ease;
}

.custom-multi-select-item-remove:hover {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.custom-multi-select-no-options,
.custom-multi-select-no-results {
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    text-align: center;
    font-size: 0.875rem;
}
