
.dropdown-container {
    position: relative;
    width: 100%;
}

.material-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 16px;
}

/* Button showing selected material */
.dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: var(--space-1);
    background-color:var(--color-white);
    color: #333;
    border: var(--border-width-thick) solid var(--border-grey);
    font-size: 16px;
    cursor: pointer;
    border-radius: var(--radius-lg);
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
}

.dropdown-btn:hover {
    border-color: var(--border-grey);
}

.dropdown-btn:focus {
    outline: none;
    border-color: var(--border-grey);
}

.selected-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.dropdown-btn img {
    width: 50px;
    height: 50px;
    border: var(--border-width-thick) solid var(--border-grey);
    border-radius: var(--radius-md);
    object-fit: cover;
}

.dropdown-btn .material-name {
    font-weight: 500;
    font-size: 16px;
}

.dropdown-btn .material-icons {
    color: #757575;
    transition: transform 0.3s ease;
}

.dropdown-btn.open .material-icons {
    transform: rotate(180deg);
    color: #2196F3;
}

/* Dropdown itself */
.dropdown-menu01 {
    position: absolute;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    z-index: 100;
    margin-top: 8px;
    /* max-height: 300px; */
    overflow-y: auto;
    transition: all 0.3s ease;
}

.dropdown-menu01.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background-color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.material-item:last-child {
    margin-bottom: 0;
}

.material-item:hover {
    background-color: #f5f7fa;
}

.material-item.selected {
    background-color: #e3f2fd;
}

.material-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.material-item h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Scrollbar styling */
.dropdown-menu01::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu01::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

.dropdown-menu01::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Instructions */
.instructions {
    margin-top: 24px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    text-align: center;
    padding: 0 10px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .dropdown-btn {
        padding: 14px;
    }
    
    .material-item {
        padding: 10px;
    }
    
    .dropdown-menu01 {
        max-height: 260px;
    }
}








.material-selector-error {
    border: 2px solid red !important;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.3);
}

.dropdown-container {
    border: 2px solid transparent;
    padding: 0 10px;
    transition: border-color 0.3s ease;
    position: relative;
}

.material-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 5px;
    border: 2px solid var(--text-secondary);
    border-radius: 8px;
    background: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-btn:hover {
    border-color: #007bff;
}

.dropdown-btn.open {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.selected-content {
    display: flex;
    align-items: center;
    gap: 12px;
}


.selected-content img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.material-name {
    font-weight: 600;
    color: #333;
}

.dropdown-menu01 {
    display: none;
    flex-direction: column;
    position: absolute;
    overflow-y: auto;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 4px;
}

.dropdown-menu01.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu01.top {
    bottom: 100%;
    top: auto;
    margin-top: 0;
    margin-bottom: 4px;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.material-item:hover {
    background-color: #f8f9fa;
}

.material-item.selected {
    background-color: #e3f2fd;
}

.material-item img {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
}

.material-item h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

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







