#favourites-widget[v-cloak] {
  display: none !important;
}

/* Make sure the container is relative for absolute positioning */
#favourites-widget {
  position: relative; /* already done via .position-relative but reinforce if needed */
  display: inline-block; /* same */
}

/* Style the button to look like Bootstrap btn-outline-primary */
#favourites-widget .dropdown-toggle {
  cursor: pointer;
  user-select: none;
  color: #0d6efd;
  background-color: transparent;
  border: 1px solid #0d6efd;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s ease-in-out;
  white-space: nowrap; /* you already have this */
  display: inline-flex; /* to align content if needed */
  align-items: center;
}

/* Position dropdown menu absolutely below button */
#favourites-widget .dropdown-menu {
  position: absolute;
  top: 100%; /* directly below the button */
  left: 0;
  z-index: 1000;
  min-width: 300px; /* keep your min-width */
  margin-top: 0.125rem; /* small gap */
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15); /* stronger shadow */
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 0.375rem; /* rounded corners */
  background-color: #fff; /* keep your background */
  padding: 0.25rem 0; /* your existing padding */
  max-height: 300px; /* your existing */
  overflow-y: auto; /* your existing */
  display: block; /* show/hide controlled by Vue v-if or class */
}

/* Optional little arrow pointing to button */
#favourites-widget .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 15px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #fff;
  filter: drop-shadow(0 -1px 1px rgba(0,0,0,.1));
  z-index: 1001;
}

/* Dropdown items hover */
#favourites-widget .dropdown-item:hover {
  background-color: #0d6efd;
  color: white;
}

.favourites-dropdown-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem; /* optional */
  width: 100%;
  box-sizing: border-box;
}

.right-buttons {
  display: flex;
  align-items: flex-start; /* Align close button to top */
  gap: 0.5rem;
}

/* Common styles for gear and close buttons */
.right-buttons .btn {
  font-size: 1rem;        /* same font size */
  line-height: 1;
  padding: 0;               /* remove default padding */
  height: 24px;
  width: 24px;
  border-radius: 50%;       /* circular */
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Specific color for close button */
.close-btn {
  background-color: #dc3545;  /* Bootstrap danger red */
  color: white;
  border: none;
  cursor: pointer;
}

/* Specific color for settings button */
.settings-link {
  background-color: #0d6efd;  /* Bootstrap primary blue */
  color: white;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* Optional: Hover effect */
.right-buttons .btn:hover,
.right-buttons .settings-link:hover {
  opacity: 0.85;
}


#favourites-widget .btn-danger {
    padding: 0 0.5rem;
    font-size: 1.2rem;
    line-height: 1;
}

#favourites-widget .dropdown-menu {
	max-height: 300px;
	overflow-y: auto;
	min-width: 300px;
	background: #fff;
	border-radius: 0.3rem;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	padding: 0.25rem 0;
}

#favourites-widget .dropdown-menu strong {
	font-size: 1rem;
}

#favourites-widget .dropdown-item {
	padding-left: 1.5rem;
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#favourites-widget .dropdown-item:hover {
	background-color: #e9ecef;
}

#favourites-widget .font-weight-bold {
	font-weight: 600;
	padding: 0.25rem 1rem;
	border-bottom: 1px solid #eee;
}

#favourites-widget .font-italic {
	font-style: italic;
	padding: 0.25rem 1rem;
}

#favourites-widget .pl-4 {
	padding-left: 1.5rem !important;
}

#favourites-widget button.btn-sm {
	font-size: 0.8rem;
	line-height: 1;
	padding: 0.25rem 0.5rem;
}

#favourites-widget .settings-link {
	float: right;
}

#favourites-widget .position-relative {
    position: relative !important;
}
#favourites-widget .d-inline-block {
    display: inline-block !important;
}

#favourites-widget .dropdown-toggle {
    white-space: nowrap;
}

#favourites-widget .mt-2 {
    margin-top: .5rem !important;
}
#favourites-widget .px-3 {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
}
#favourites-widget .mb-2 {
    margin-bottom: .5rem !important;
}
#favourites-widget .align-items-center {
    align-items: center !important;
}
#favourites-widget .justify-content-between {
    justify-content: space-between !important;
}
#favourites-widget .d-flex {
    display: flex !important;
}
#favourites-widget .mb-3 {
    margin-bottom: 1rem !important;
}
#favourites-widget .py-1 {
    padding-top: .25rem !important;
    padding-bottom: .25rem !important;
}
#favourites-widget .dropdown-item {
    display: block;
    width: 100%;
    padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
    clear: both;
    font-weight: 400;
    color: var(--bs-dropdown-link-color);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    border-radius: var(--bs-dropdown-item-border-radius, 0);
}


.custom-modal-overlay {
	position: fixed;
	top: 0; left: 0;
	width: 100vw; height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1050;
}
.custom-modal {
	background: white;
	border-radius: 6px;
	padding: 20px;
	width: 400px;
	max-width: 95vw;
	box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.custom-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}
.custom-close-btn {
	background: none;
	border: none;
	font-size: 1.25rem;
	cursor: pointer;
}
.custom-modal-body {
	margin-bottom: 1rem;
}
