/* styles.css */
.multi-select-container {
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}

.multi-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 8px;
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    height: 45px;
    min-height: 45px;
    cursor: text;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    align-items: center;
}

.multi-select:focus-within {
    border-color: #009E60;
    box-shadow: 0 0 0 2px rgba(0, 158, 96, 0.1);
}

.multi-select .tag {
    background-color: #009E60;
    color: white;
    border-radius: 20px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    margin: 2px 0;
    height: 29px;
    box-sizing: border-box;
}

.multi-select .tag:hover {
    background-color: #007a4a;
}

.multi-select .tag .remove-tag {
    cursor: pointer;
    font-size: 14px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.multi-select .tag .remove-tag:hover {
    background: rgba(255, 255, 255, 0.3);
}

.multi-select .input-field {
    border: none;
    outline: none;
    flex: 1;
    padding: 0 8px;
    height: 29px;
    line-height: 29px;
    font-size: 14px;
    min-width: min(120px, 30vw); /* Responsive min-width */
    margin: 2px 0;
}

/* Enhanced Dropdown List Styling */
.dropdown-list {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
}

.dropdown-list.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

.dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #333;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-item:not(.language-item)::after {
    content: '';
    position: absolute;
    right: 15px;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.dropdown-item:not(.language-item):hover::after {
    opacity: 1;
}

.dropdown-item:hover {
    background-color: #f5f9ff;
    color: #009E60;
}

.dropdown-item.selected {
    background-color: #e6f7ef;
    color: #009E60;
    font-weight: 500;
}

.dropdown-item.selected::before {
    content: '✓';
    margin-right: 8px;
    font-size: 14px;
}

/* Custom Scrollbar */
.dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: #dadada;
    border-radius: 10px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #009E60;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .dropdown-list {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        max-height: 60vh;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.15);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .dropdown-list::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: #e0e0e0;
        border-radius: 2px;
        margin: 8px auto;
    }

    .dropdown-item {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Standardized Form Controls - Add or update these styles */
.form-group input,
.form-group select,
.multi-select,
.upload-btn,
.delete-btn {
    width: 100%;
    height: 45px; /* Standardized height */
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
    box-sizing: border-box; /* Ensure padding is included in width/height */
}

/* Ensure select elements maintain consistent styling */
.form-group select {
    padding-right: 40px; /* Space for dropdown arrow */
}

/* Adjust button heights to match inputs */
.next-btn, 
.prev-btn, 
.submit-btn {
    height: 45px;
    line-height: 45px;
    padding: 0 25px;
}

/* Update mobile styles */
@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .multi-select,
    .upload-btn,
    .delete-btn,
    .next-btn, 
    .prev-btn, 
    .submit-btn {
        height: 45px; /* Keep consistent height on mobile */
        font-size: 16px;
    }
}

/* Language specific adjustments */
.multi-select.language-select {
    height: auto;
    min-height: 45px;
    max-height: none;
    overflow: visible;
}
