.language-selector {
	position: relative;
	cursor: pointer;
}

.language-selector img.flag-icon {
	object-fit: cover;
	width: 24px;
    height: 24px;
    min-width: 24px;
    line-height: 24px;
    font-size: 12px;
	display: block;
}

.language-menu {
	position: absolute;
	top: 100%;              /* positions it directly below the icon */
	margin-top: 5px;        /* margin between icon and menu */
	background-color: white;
	color: black;
	border: 1px solid #ccc;
	border-radius: 5px;
	display: none;
	flex-direction: column;
	min-width: 180px;
	z-index: 1000;
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.language-selector.active .language-menu {
  display: flex;
}

.language-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 10px;
  cursor: pointer;
}

.language-option:hover {
  background-color: #f0f0f0;
}

.language-option img.flag-icon {
  width: 24px;
  height: 16px;
  border: 1px solid #ccc;
}

.checkmark {
  margin-left: auto;
  color: green;
  font-size: 16px;
}

#current-language-flag {
  transition: opacity 0.05s ease-in;
  opacity: 0;
}

/* Mobile & small tablet adjustments */
/@media (max-width: 992px) {
  .language-selector {
    width: 100%;                  /* full width to align with nav items */
    align-items: flex-start;      /* align flag to left if needed */
    padding: 0 16px;
    box-sizing: border-box;
  }

  .language-menu {
    right: auto;                 /* remove right alignment */
    left: 0;                     /* align to left of full-width container */
    width: 100%;                 /* full width under flag */
    box-shadow: none;
    border-radius: 0;
  }
  .language-selector {
    justify-content: center;
  }
}

td.preview-cell {
  white-space: nowrap;   /* prevents cell expansion */
  width: 1%;             /* let it shrink to fit content */
  padding: 10px 30px 10px 8px;      /* margin around the image */
  vertical-align: middle;
}

.select2-container {
    z-index: 2000 !important;
}
.select2-dropdown {
    z-index: 2100 !important;
}
.modal-open {
    overflow: scroll;
}
.dropdown-item {
    white-space: normal;     /* allow wrapping */
    word-wrap: break-word;   /* break long words */
    max-width: 300px;        /* prevent super wide items */
    line-height: 1.3;        /* tighter line spacing for readability */
}
.dropdown-item.disabled {
    pointer-events: none;  /* prevent clicking */
    opacity: 0.5;          /* visually show disabled */
    cursor: default;
}
.dropdown-item.unread {
    font-weight: bold;       /* bold text for unread */
    background-color: #c7ebb5; /* light blue background */
}
.dropdown-item small {
    display: block;          /* put body text on its own line */
    color: #666;
}