/* Cobone Style Location Dropdown */
.dropdown.locations {
    position: relative;
    display: inline-block;
}

.location-cta {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 50px;
    text-decoration: none;
    color: #333;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    min-width: 180px;
    height: 38px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.triangle-down {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #888;
  border-radius: 10px;

}

.location-cta:hover {
    background: #fff;
    color: #333;
    text-decoration: none;
}

.location-cta .flag {
    display: flex;
    align-items: center;
    margin-right: 16px;
}

.location-cta .flag-icon {
    width: 18px;
    height: 14px;
    object-fit: cover;
    border-radius: 1px;
}

.location-cta .label {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.location-cta .caret {
    margin-left: 8px;
    font-size: 12px;
    color: #666;
    transition: none;
}

.location-cta[aria-expanded="true"] .caret {
    transform: none;
}

.location-dropdown-menu {
    min-width: 240px;
    max-width: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    background: white;
    margin-top: 8px;
    display: none !important;
}

.dropdown.locations.show .location-dropdown-menu {
    display: block !important;
}

.dropdown-menu.show {
    display: block !important;
}

.location-popup {
    width: 100%;
}

.location-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
}

.location-popup-header h5 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.location-popup-header .title {
    color: #333;
}

.close-btn {
    font-size: 16px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 10;
}

.close-btn:hover {
    color: #333;
    background: #f0f0f0;
    border-radius: 50%;
}

.close-btn i {
    pointer-events: none;
}

.location-popup-content {
    max-height: 300px;
    overflow-y: auto;
}

.location-items {
    display: flex;
    flex-direction: column;
}

.location-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.location-item:hover {
    color:  #16a64f;
    text-decoration: none;
}

.location-item.item-active {
    color: #16a64f;
    font-weight: 500;
}

.location-item .location-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    margin-right: 12px;
}

.location-item .location-label {
    font-size: 14px;
    font-weight: 400;
}

.location-item.item-active .location-label {
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .location-dropdown-menu {
        min-width: 280px;
        max-width: 85vw;
        left: 50% !important;
        transform: translateX(-50%) !important;
        position: fixed !important;
    }
    
    .mobile-location-dropdown .location-dropdown-menu {
        width: 85vw;
        max-height: 70vh;
    }
    
    .mobile-location-dropdown .location-popup-content {
        max-height: 50vh;
    }
    
    .location-cta {
        min-width: 160px;
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Ensure dropdown stays open when clicked */
.dropdown.locations.show .location-dropdown-menu {
    display: block;
}

/* Custom scrollbar for location items */
.location-popup-content::-webkit-scrollbar {
    width: 6px;
}

.location-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.location-popup-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.location-popup-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}