/**
 * LZ Location Selector Styles
 * 
 * All classes are prefixed with 'lz-location-selector' for easy customization.
 * Override these styles in your theme as needed.
 */

/* ==========================================================================
   Wrapper
   ========================================================================== */

.lz-location-selector-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 300px;
    font-family: inherit;
}

/* ==========================================================================
   Main Selector Container
   ========================================================================== */

.lz-location-selector {
    position: relative;
    width: 100%;
}

/* ==========================================================================
   Selected Display (The clickable area)
   ========================================================================== */

.lz-location-selector__selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background-color: #ffffff;
    border: 3px solid #dfdfdf;
    border-radius: 40px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.lz-location-selector__selected:hover {
    border-color: #c0c0c0;
}

.lz-location-selector--open .lz-location-selector__selected {
    border-color: #c0c0c0;
}

/* ==========================================================================
   Icon (Left)
   ========================================================================== */

.lz-location-selector__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lz-location-selector__icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ==========================================================================
   Selected Text (Middle)
   ========================================================================== */

.lz-location-selector__text {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #231f20;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Dropdown Arrow (Right)
   ========================================================================== */

.lz-location-selector__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.lz-location-selector__arrow-img {
    width: 12px;
    height: 12px;
    object-fit: contain;
}

/* Rotate arrow when open */
.lz-location-selector--open .lz-location-selector__arrow {
    transform: rotate(180deg);
}

/* ==========================================================================
   Dropdown Container
   ========================================================================== */

.lz-location-selector__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #ffffff;
    border: 3px solid #dfdfdf;
    border-radius: 20px 6px 6px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    max-height: 280px;
    overflow-y: auto;
}

.lz-location-selector--open .lz-location-selector__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==========================================================================
   Dropdown List
   ========================================================================== */

.lz-location-selector__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

/* ==========================================================================
   Dropdown Item
   ========================================================================== */

.lz-location-selector__item {
    margin: 0;
    padding: 0;
}

.lz-location-selector__item-link {
    display: block;
    padding: 10px 16px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #231f20!important;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.lz-location-selector__item-link:hover {
    background-color: #f5f5f5;
    color: #231f20!important;
    text-decoration: none;
}

/* Active/Current item */
.lz-location-selector__item--active .lz-location-selector__item-link {
    background-color: #fff5f2;
    color: #ff6632!important;
    font-weight: 600;
}

.lz-location-selector__item--active .lz-location-selector__item-link:hover {
    background-color: #ffebe5;
}

/* Empty state */
.lz-location-selector__item--empty {
    padding: 10px 16px;
    font-size: 14px;
    color: #999999;
    font-style: italic;
}

/* ==========================================================================
   Item Text
   ========================================================================== */

.lz-location-selector__item-text {
    display: block;
}

/* ==========================================================================
   Scrollbar Styling (Optional)
   ========================================================================== */

.lz-location-selector__dropdown::-webkit-scrollbar {
    width: 6px;
}

.lz-location-selector__dropdown::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.lz-location-selector__dropdown::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 3px;
}

.lz-location-selector__dropdown::-webkit-scrollbar-thumb:hover {
    background: #999999;
}