/* Custom Dropdown Styles */
.custom-dropdown-wrapper {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.custom-dropdown-button {
    width: 100%;
    background-color: white;
    border: 1px solid #e2d5c4;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #333;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.custom-dropdown-button:hover {
    border-color: var(--block-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.custom-dropdown-button.active {
    border-color: var(--block-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.custom-dropdown-button.active svg {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.custom-dropdown-menu.show {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
}

.custom-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

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

.custom-dropdown-item:hover {
    background-color: #f8f3ee;
}

.custom-dropdown-item.selected {
    background-color: var(--block-lighter-beige);
    font-weight: 600;
    color: var(--block-dark-red);
}

.restaurant-name {
    font-weight: 500;
}

.restaurant-address {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Searchable Dropdown */
.searchable-dropdown-wrapper {
    position: relative;
    width: 100%;
    font-family: inherit;
}

.searchable-dropdown-input-wrapper {
    position: relative;
    width: 100%;
}

.searchable-dropdown-input {
    width: 100%;
    background-color: white;
    border: 1px solid #e2d5c4;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem; /* Space for the icon */
    font-size: 1rem;
    color: #333;
    display: block;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.searchable-dropdown-input:focus {
    border-color: var(--block-red);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.searchable-dropdown-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.searchable-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 0;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.searchable-dropdown-menu.show {
    max-height: 300px;
    opacity: 1;
    visibility: visible;
    padding: 0.5rem 0;
}

.searchable-dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.searchable-dropdown-item:not(:last-child) {
    border-bottom: 1px solid #f5f5f5;
}

.searchable-dropdown-item:hover {
    background-color: #f8f3ee;
}

.searchable-dropdown-item.selected {
    background-color: var(--block-lighter-beige);
    font-weight: 600;
    color: var(--block-dark-red);
}

.searchable-dropdown-item .item-primary {
    font-weight: 500;
}

.searchable-dropdown-item .item-secondary {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.searchable-dropdown-no-results {
    padding: 1rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

.searchable-dropdown-input-clear {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
}

.searchable-dropdown-input-clear.show {
    display: block;
}

.searchable-dropdown-input-clear:hover {
    color: #333;
}

/* Mobile Enhancements */
@media (max-width: 640px) {
    .custom-dropdown-button {
        padding: 0.625rem 0.875rem;
        font-size: 0.925rem;
    }
    
    .custom-dropdown-menu {
        max-height: 250px;
    }
    
    .custom-dropdown-item {
        padding: 0.625rem 0.875rem;
    }
    
    .searchable-dropdown-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.925rem;
    }
    
    .searchable-dropdown-menu {
        max-height: 250px;
    }
    
    .searchable-dropdown-item {
        padding: 0.625rem 0.875rem;
    }
}