/* Material Selector - Estilos para selector múltiple de materiales */

.material-selector {
    position: relative;
}

.material-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.material-dropdown__item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--gray-100);
}

.material-dropdown__item:last-child {
    border-bottom: none;
}

.material-dropdown__item:hover {
    background-color: var(--gray-50);
}

.material-dropdown__item--active {
    background-color: var(--primary-50);
}

.material-dropdown__item--selected {
    background-color: var(--success-50);
    color: var(--success-700);
}

.material-dropdown__item--disabled {
    color: var(--gray-400);
    cursor: default;
    pointer-events: none;
    text-align: center;
}

.material-dropdown__item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.material-dropdown__item-name {
    flex: 1;
    font-weight: 500;
}

.material-dropdown__item-cost {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

.selected-materials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 2rem;
}

.material-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background-color: var(--primary-100);
    color: var(--primary-700);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.material-tag__text {
    display: inline-flex;
    align-items: center;
}

.material-tag__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    color: var(--primary-700);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: color 0.15s ease;
}

.material-tag__remove:hover {
    color: var(--primary-900);
}

.material-tag__remove i {
    display: block;
}

/* Scrollbar personalizada para dropdown */
.material-dropdown::-webkit-scrollbar {
    width: 8px;
}

.material-dropdown::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.material-dropdown::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

.material-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
