/* Migo Acrylic dialogs — Windows 11 inspired surfaces for standard site modals. */
:root {
  --migo-modal-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(247, 249, 252, 0.74));
  --migo-modal-border: rgba(255, 255, 255, 0.78);
  --migo-modal-divider: rgba(82, 91, 108, 0.14);
  --migo-modal-control: rgba(255, 255, 255, 0.48);
  --migo-modal-control-hover: rgba(255, 255, 255, 0.7);
  --migo-modal-text: #20242c;
  --migo-modal-muted: #687180;
  --migo-modal-shadow: 0 32px 96px rgba(15, 23, 42, 0.28), 0 8px 28px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.modal.show,
.modal.in {
  background: transparent !important;
}

.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show,
.modal-backdrop.in {
  background: rgba(13, 18, 28, 0.44) !important;
  opacity: 1 !important;
  -webkit-backdrop-filter: blur(12px) saturate(112%);
  backdrop-filter: blur(12px) saturate(112%);
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-dialog > .modal-content {
  overflow: hidden;
  border: 1px solid var(--migo-modal-border) !important;
  border-radius: 10px !important;
  background: var(--migo-modal-surface) !important;
  color: var(--migo-modal-text);
  box-shadow: var(--migo-modal-shadow) !important;
  -webkit-backdrop-filter: blur(34px) saturate(155%);
  backdrop-filter: blur(34px) saturate(155%);
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-header,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-footer {
  background: transparent !important;
  border-color: var(--migo-modal-divider) !important;
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-title {
  color: var(--migo-modal-text);
  letter-spacing: -0.02em;
}

.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) button.close {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin: -4px -4px -4px 8px;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--migo-modal-muted);
  opacity: 1;
  text-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) button.close:hover,
.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) button.close:focus-visible {
  border-color: rgba(90, 99, 116, 0.14);
  background: rgba(255, 255, 255, 0.58);
  color: var(--migo-modal-text);
  outline: none;
}

.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) button.close svg {
  display: block;
  pointer-events: none;
}

/* Account switcher — one dedicated component across every signed-in account. */
#switch_accounts {
  --migo-switch-accent: #c64d53;
}

#switch_accounts .modal-dialog {
  width: min(626px, calc(100vw - 24px));
  max-width: 626px;
}

#switch_accounts .modal-content {
  padding: 24px !important;
}

#switch_accounts .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin: 0 0 14px !important;
  padding: 0 !important;
}

#switch_accounts .modal-title {
  margin: 0;
  font-size: 22px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
}

#switch_accounts .modal-header button.migo-switch-account-close,
#switch_accounts .modal-header button.migo-switch-account-close:hover,
#switch_accounts .modal-header button.migo-switch-account-close:focus,
#switch_accounts .modal-header button.migo-switch-account-close:focus-visible {
  display: inline-grid !important;
  place-items: center;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--migo-modal-divider) !important;
  border-radius: 10px !important;
  background: var(--migo-modal-control) !important;
  color: var(--migo-modal-muted) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
  opacity: 1 !important;
  outline: none !important;
  text-shadow: none !important;
}

#switch_accounts .modal-header button.migo-switch-account-close:hover,
#switch_accounts .modal-header button.migo-switch-account-close:focus-visible {
  border-color: rgba(82, 91, 108, 0.22) !important;
  background: var(--migo-modal-control-hover) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

#switch_accounts .migo-switch-account-close svg {
  width: 22px !important;
  height: 22px !important;
}

#switch_accounts .dropdown-switch-account {
  display: grid;
  gap: 8px;
  padding: 0 !important;
}

#switch_accounts .dropdown-switch-account > div {
  margin: 0;
}

#switch_accounts .dropdown-switch-account .user-avatar {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 12px;
  margin: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid transparent;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.2);
  color: var(--migo-modal-text);
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

#switch_accounts .dropdown-switch-account .user-avatar:hover,
#switch_accounts .dropdown-switch-account .user-avatar:focus-visible {
  border-color: var(--migo-modal-divider);
  background: var(--migo-modal-control-hover);
  color: var(--migo-modal-text);
  outline: none;
}

#switch_accounts .dropdown-switch-account .user-avatar.active {
  border-color: color-mix(in srgb, var(--migo-switch-accent) 20%, transparent) !important;
  background: color-mix(in srgb, var(--migo-switch-accent) 10%, transparent) !important;
  color: var(--migo-switch-accent) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

#switch_accounts .dropdown-switch-account .user-avatar > img {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.64), 0 5px 12px rgba(15, 23, 42, 0.12) !important;
}

#switch_accounts .dropdown-switch-account .user-avatar .info b {
  color: inherit;
  font-size: 16px !important;
  font-weight: 650 !important;
  line-height: 1.25;
}

#switch_accounts .dropdown-switch-account .user-avatar .info p {
  color: var(--migo-modal-muted);
  font-size: 15px;
  line-height: 1.3;
}

#switch_accounts .dropdown-switch-account .user-avatar.active .info p,
#switch_accounts .dropdown-switch-account .user-avatar.active > svg {
  color: var(--migo-switch-accent) !important;
}

#switch_accounts .dropdown-switch-account .btn-main {
  min-height: 46px;
  margin: 4px 0 0 !important;
  border: 1px solid color-mix(in srgb, var(--migo-switch-accent) 72%, transparent) !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--migo-switch-accent) 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
  font-weight: 650;
}

@media (max-width: 575px) {
  #switch_accounts .modal-dialog {
    margin: 12px auto;
  }

  #switch_accounts .modal-content {
    padding: 18px !important;
  }
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .form-control,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) textarea,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) select {
  border-color: rgba(82, 91, 108, 0.2) !important;
  background-color: var(--migo-modal-control) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
  -webkit-backdrop-filter: blur(12px) saturate(125%);
  backdrop-filter: blur(12px) saturate(125%);
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .form-control:focus,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) input:focus,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) textarea:focus,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) select:focus {
  border-color: color-mix(in srgb, var(--main-color, #cf4b54) 58%, transparent) !important;
  background-color: var(--migo-modal-control-hover) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-color, #cf4b54) 14%, transparent) !important;
  outline: none;
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .tag_field > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):focus,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .tag_field > textarea:focus,
.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .tag_field > select:focus {
  border-top-color: transparent !important;
  background-color: var(--migo-modal-control-hover) !important;
  background-clip: padding-box;
}

.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) .btn-default {
  border-color: rgba(82, 91, 108, 0.14) !important;
  background: rgba(255, 255, 255, 0.48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) .btn-default:hover,
.modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) .btn-default:focus-visible {
  background: rgba(255, 255, 255, 0.72) !important;
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(91, 101, 118, 0.38) transparent;
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(91, 101, 118, 0.38);
}

/* Group-chat dialogs use the same Windows 11 window language as Donation. */
.migo-group-chat-modal.show,
.migo-group-chat-modal.in {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 76px 14px 16px !important;
  overflow: hidden;
}

.migo-group-chat-modal .modal-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: 100%;
  margin: auto !important;
  transform: none !important;
}

.migo-group-chat-modal .migo-group-chat-modal-content {
  display: flex;
  max-height: calc(100vh - 96px);
  padding: 0 !important;
  flex-direction: column;
  border-radius: 10px !important;
}

.migo-group-chat-modal form {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.migo-group-chat-modal .migo-group-chat-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start !important;
  gap: 12px;
  margin: 0 !important;
  padding: 14px 16px 12px !important;
  border-bottom: 1px solid var(--migo-modal-divider) !important;
}

.migo-group-chat-modal .migo-group-chat-heading {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start !important;
  gap: 12px !important;
  min-width: 0;
}

.migo-group-chat-modal .migo-group-chat-heading > div {
  min-width: 0;
}

.migo-group-chat-modal .migo-group-chat-heading-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: 1px;
  border: 1px solid rgba(82, 91, 108, 0.14);
  border-radius: 50%;
  background: var(--migo-modal-control);
  color: var(--migo-modal-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.migo-group-chat-modal .modal-title {
  overflow: hidden;
  margin: 0 0 3px !important;
  font-size: 18px !important;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.migo-group-chat-modal .migo-group-chat-heading p {
  margin: 0;
  color: var(--migo-modal-muted);
  font-size: 13px;
  line-height: 1.38;
}

.migo-group-chat-modal .migo-group-window-controls {
  display: inline-grid;
  grid-template-columns: repeat(3, 38px);
  align-items: center;
  align-self: start;
  height: 30px;
  margin: -7px -9px 0 0;
}

.migo-group-chat-modal .migo-group-window-controls button,
.migo-group-chat-modal .migo-group-window-controls button.close {
  display: inline-grid !important;
  place-items: center;
  box-sizing: border-box;
  position: static !important;
  inset: auto !important;
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--migo-modal-text) !important;
  opacity: 1 !important;
  line-height: 1;
  box-shadow: none !important;
}

.migo-group-chat-modal .migo-group-window-controls button:hover,
.migo-group-chat-modal .migo-group-window-controls button:focus-visible {
  background: rgba(82, 91, 108, 0.11) !important;
  outline: none;
}

.migo-group-chat-modal .migo-group-window-controls .migo-window-close:hover,
.migo-group-chat-modal .migo-group-window-controls .migo-window-close:focus-visible {
  background: #c42b1c !important;
  color: #fff !important;
}

.migo-group-chat-modal .migo-group-window-controls svg {
  display: block;
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  transform: none !important;
  pointer-events: none;
}

.migo-group-chat-modal .migo-window-icon-restore {
  display: none !important;
}

.migo-group-chat-modal.migo-window-minimized .migo-window-icon-maximize,
.migo-group-chat-modal.migo-window-maximized .migo-window-icon-maximize {
  display: none !important;
}

.migo-group-chat-modal.migo-window-minimized .migo-window-icon-restore,
.migo-group-chat-modal.migo-window-maximized .migo-window-icon-restore {
  display: block !important;
}

.migo-group-chat-modal .modal-body {
  min-height: 0;
  padding: 14px 16px 15px !important;
  overflow-y: auto;
}

.migo-group-chat-modal .migo-group-chat-form-row {
  display: grid !important;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center !important;
  gap: 16px;
}

.migo-group-chat-modal .migo-group-chat-form-row > .full_width {
  min-width: 0;
}

.migo-group-chat-modal .tag_chat_grp_avtr_crt {
  width: 76px;
  min-width: 76px;
  height: 76px;
  margin: 0;
  border: 1px solid rgba(82, 91, 108, 0.14);
  background: var(--migo-modal-control);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.migo-group-chat-modal .tag_chat_grp_avtr_crt .btn-file,
.migo-group-chat-modal .tag_chat_grp_avtr_crt .btn-file img {
  width: 76px;
  height: 76px;
}

.migo-group-chat-modal .tag_field {
  display: flex;
  margin: 0 0 14px;
  flex-direction: column;
  font-size: 14px;
}

.migo-group-chat-modal .tag_field:last-child {
  margin-bottom: 0;
}

.migo-group-chat-modal .tag_field > input {
  display: block;
  width: 100%;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0;
  padding: 0 12px !important;
  border: 1px solid rgba(82, 91, 108, 0.2) !important;
  border-radius: 8px !important;
  background: var(--migo-modal-control) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46) !important;
  appearance: none;
}

.migo-group-chat-modal .tag_field > input:focus {
  border-color: color-mix(in srgb, var(--main-color, #cf4b54) 58%, transparent) !important;
  background: var(--migo-modal-control-hover) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--main-color, #cf4b54) 14%, transparent) !important;
  outline: none;
}

.migo-group-chat-modal .tag_field > input + span,
.migo-group-chat-modal .tag_field > input:not(:focus):placeholder-shown + span {
  position: static;
  inset: auto;
  order: -1;
  display: block;
  margin: 0 0 6px;
  padding: 0 2px;
  color: var(--migo-modal-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
}

.migo-group-chat-modal .tag_field > input + span::before,
.migo-group-chat-modal .tag_field > input + span::after {
  display: none !important;
  content: none !important;
}

.migo-group-chat-modal .group_chat_mbr_list {
  top: calc(100% + 4px);
  z-index: 5;
  max-height: 190px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--migo-modal-divider);
  border-radius: 8px;
  background: var(--migo-modal-surface);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(24px) saturate(145%);
}

.migo-group-chat-modal .group_chat_mbr_list:empty {
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Keep participant suggestions above the fixed action row instead of clipping
   them inside the scrollable form body. The relaxed overflow applies only
   while the suggestions popover actually contains results. */
#create_group_chat .migo-group-chat-modal-content:has(.group_chat_mbr_list:not(:empty)) {
  overflow: visible !important;
}

#create_group_chat .modal-body:has(.group_chat_mbr_list:not(:empty)) {
  position: relative;
  z-index: 3;
  overflow: visible !important;
}

#create_group_chat .tag_field:has(> .group_chat_mbr_list:not(:empty)) {
  position: relative;
  z-index: 4;
}

#create_group_chat .group_chat_mbr_list:not(:empty) {
  z-index: 30;
}

#create_group_chat .modal-footer {
  position: relative;
  z-index: 2;
}

#manage_group_chat .migo-group-member-search {
  margin-bottom: 16px;
}

#manage_group_chat .migo-group-members-list {
  display: grid;
  gap: 16px;
}

#manage_group_chat .migo-group-members-section {
  overflow: hidden;
  border: 1px solid var(--migo-modal-divider);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

#manage_group_chat .migo-group-members-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--migo-modal-divider);
  background: rgba(255, 255, 255, 0.28);
}

#manage_group_chat .migo-group-members-section-head h5 {
  margin: 0;
  color: var(--migo-modal-text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

#manage_group_chat .migo-group-members-section-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(82, 91, 108, 0.1);
  color: var(--migo-modal-muted);
  font-size: 12px;
  font-weight: 700;
}

#manage_group_chat .migo-gchat-member-row {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) 34px;
  align-items: center !important;
  gap: 10px;
  min-height: 62px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(82, 91, 108, 0.1);
  background: transparent;
}

#manage_group_chat .migo-gchat-member-row:last-child {
  border-bottom: 0;
}

#manage_group_chat .migo-gchat-member-row > .avatar,
#manage_group_chat .migo-gchat-member-row > .avatar img {
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
}

#manage_group_chat .migo-gchat-member-copy {
  min-width: 0;
}

#manage_group_chat .migo-gchat-member-copy .user-name {
  display: block;
  overflow: hidden;
  color: var(--migo-modal-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#manage_group_chat .migo-gchat-member-state,
#manage_group_chat .migo-gchat-member-copy .user-lastseen {
  display: block;
  margin-top: 2px;
  color: var(--migo-modal-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

#manage_group_chat .migo-gchat-member-state.is-pending {
  color: #9a6700;
}

#manage_group_chat .migo-group-pending-section {
  border-color: rgba(176, 116, 0, 0.22);
}

#manage_group_chat .migo-gchat-member-action {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #c42b1c;
  box-shadow: none;
}

#manage_group_chat .migo-gchat-member-action:hover,
#manage_group_chat .migo-gchat-member-action:focus-visible {
  background: rgba(196, 43, 28, 0.1);
  outline: none;
}

#manage_group_chat .migo-gchat-member-action.is-add {
  color: #16823b;
}

#manage_group_chat .migo-gchat-member-action.is-add:hover,
#manage_group_chat .migo-gchat-member-action.is-add:focus-visible {
  background: rgba(22, 130, 59, 0.1);
}

#manage_group_chat .migo-gchat-search-result {
  border: 1px solid var(--migo-modal-divider);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.34);
}

#manage_group_chat .migo-gchat-search-result + .migo-gchat-search-result {
  margin-top: 8px;
}

#manage_group_chat .migo-group-members-empty {
  padding: 18px 12px;
  color: var(--migo-modal-muted);
  font-size: 13px;
  text-align: center;
}

.migo-group-chat-modal .modal-footer {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 10px !important;
  margin: 0 !important;
  padding: 12px 16px 14px !important;
  border-top: 1px solid var(--migo-modal-divider) !important;
}

#manage_group_chat .modal-footer {
  grid-template-columns: 1fr;
}

.migo-group-chat-modal .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(82, 91, 108, 0.18) !important;
  background: var(--migo-modal-control) !important;
  color: var(--migo-modal-text) !important;
  font-weight: 600;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
  transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease;
}

.migo-group-chat-modal .modal-footer .btn:hover,
.migo-group-chat-modal .modal-footer .btn:focus-visible {
  border-color: rgba(82, 91, 108, 0.26) !important;
  background: var(--migo-modal-control-hover) !important;
  outline: none;
}

.migo-group-chat-modal .modal-footer .btn:active {
  transform: translateY(1px);
}

.migo-group-chat-modal .migo-group-secondary svg {
  color: #687180;
}

.migo-group-chat-modal .migo-group-primary svg {
  color: #c64d53;
}

html.migo-group-chat-is-minimized .modal-backdrop {
  display: none !important;
}

.migo-group-chat-modal.migo-window-minimized {
  display: block !important;
  padding: 0 !important;
  overflow: visible;
  pointer-events: none;
}

.migo-group-chat-modal.migo-window-minimized .modal-dialog {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(430px, calc(100% - 36px));
  max-height: none;
  margin: 0 !important;
  pointer-events: auto;
}

.migo-group-chat-modal.migo-window-minimized .migo-group-chat-modal-content {
  max-height: none;
}

.migo-group-chat-modal.migo-window-minimized form {
  display: none;
}

.migo-group-chat-modal.migo-window-minimized .migo-group-chat-header {
  padding: 9px 10px !important;
  border-bottom: 0 !important;
}

.migo-group-chat-modal.migo-window-minimized .migo-group-chat-heading {
  display: block !important;
  align-self: center;
}

.migo-group-chat-modal.migo-window-minimized .migo-group-chat-heading-icon,
.migo-group-chat-modal.migo-window-minimized .migo-group-chat-heading p {
  display: none;
}

.migo-group-chat-modal.migo-window-minimized .modal-title {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 30px;
  white-space: nowrap;
}

.migo-group-chat-modal.migo-window-minimized .migo-group-window-controls {
  grid-template-columns: repeat(2, 38px);
  margin: 0;
}

.migo-group-chat-modal.migo-window-minimized .migo-group-window-controls [data-migo-group-window="minimize"] {
  display: none !important;
}

.migo-group-chat-modal.migo-window-maximized {
  align-items: stretch;
  padding: 64px 8px 8px !important;
}

.migo-group-chat-modal.migo-window-maximized .modal-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0 !important;
}

.migo-group-chat-modal.migo-window-maximized .migo-group-chat-modal-content {
  width: 100%;
  height: 100%;
  max-height: none;
}

.migo-group-chat-modal.migo-window-maximized form {
  flex: 1 1 auto;
  overflow: hidden;
}

.migo-group-chat-modal.migo-window-maximized .modal-body {
  flex: 1 1 auto;
  width: min(760px, 100%);
  margin-inline: auto;
}

.migo-group-chat-modal.migo-window-maximized .modal-footer {
  width: min(760px, 100%);
  margin-inline: auto !important;
}

/* Donation dialog: preserve its hierarchy while letting the acrylic surface show through. */
#migo-profile-donation-modal .migo-donation-modal-content {
  padding: 0 !important;
  border-radius: 10px !important;
  max-height: calc(100vh - 96px);
}

#migo-profile-donation-modal.show,
#migo-profile-donation-modal.in {
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 76px 14px 16px !important;
  overflow: hidden;
}

#migo-profile-donation-modal .modal-dialog {
  width: min(520px, calc(100% - 24px));
  max-height: 100%;
  margin: auto !important;
  transform: none !important;
}

#migo-profile-donation-modal form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#migo-profile-donation-modal .migo-donation-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start !important;
  gap: 12px;
  margin: 0 !important;
  padding: 14px 16px 12px !important;
  border-bottom: 1px solid var(--migo-modal-divider) !important;
}

#migo-profile-donation-modal .migo-window-controls {
  display: inline-grid;
  grid-template-columns: repeat(3, 38px);
  align-items: center;
  align-self: start;
  height: 30px;
  margin: -7px -9px 0 0;
}

#migo-profile-donation-modal .migo-window-controls button,
#migo-profile-donation-modal .migo-window-controls button.close {
  display: inline-grid !important;
  place-items: center;
  box-sizing: border-box;
  width: 38px !important;
  height: 30px !important;
  min-width: 38px !important;
  min-height: 30px !important;
  max-width: 38px !important;
  max-height: 30px !important;
  float: none !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  vertical-align: top !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--migo-modal-text) !important;
  opacity: 1 !important;
  line-height: 1;
  box-shadow: none !important;
}

#migo-profile-donation-modal .migo-window-controls button:hover,
#migo-profile-donation-modal .migo-window-controls button:focus-visible {
  background: rgba(82, 91, 108, 0.11) !important;
  outline: none;
}

#migo-profile-donation-modal .migo-window-controls .migo-window-close:hover,
#migo-profile-donation-modal .migo-window-controls .migo-window-close:focus-visible {
  background: #c42b1c !important;
  color: #fff !important;
}

#migo-profile-donation-modal .migo-window-controls svg {
  display: block;
  position: static !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  transform: none !important;
  pointer-events: none;
}

#migo-profile-donation-modal .migo-window-icon-restore {
  display: none !important;
}

#migo-profile-donation-modal.migo-window-minimized .migo-window-icon-maximize,
#migo-profile-donation-modal.migo-window-maximized .migo-window-icon-maximize {
  display: none !important;
}

#migo-profile-donation-modal.migo-window-minimized .migo-window-icon-restore,
#migo-profile-donation-modal.migo-window-maximized .migo-window-icon-restore {
  display: block !important;
}

/* Windows 11-style controls for the compact private chat window. */
.chat-tab .online-toggle-hdr .migo-chat-header-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 30px;
  margin: -2px -5px -2px 4px;
}

.chat-tab .online-toggle-hdr .wow_chat_hdr_usr {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.chat-tab .online-toggle-hdr .wow_chat_hdr_usr > div:last-child {
  min-width: 0;
}

.chat-tab .online-toggle-hdr .migo-chat-more {
  flex: 0 0 28px;
  width: 28px;
  height: 30px;
}

.chat-tab .online-toggle-hdr .migo-chat-more > a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 30px;
  border-radius: 4px;
  color: inherit;
}

.chat-tab .online-toggle-hdr .migo-chat-more > a:hover,
.chat-tab .online-toggle-hdr .migo-chat-more > a:focus-visible {
  background: rgba(82, 91, 108, 0.11);
  outline: none;
}

.chat-tab .online-toggle-hdr .migo-chat-more > a svg {
  width: 18px;
  height: 18px;
}

.chat-tab .migo-chat-window-controls {
  display: inline-grid;
  grid-template-columns: repeat(3, 32px);
  align-items: center;
  flex: 0 0 auto;
  width: 96px;
  height: 30px;
}

.chat-tab .migo-chat-window-controls button {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: 32px;
  height: 30px;
  min-width: 32px;
  min-height: 30px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  line-height: 1;
  box-shadow: none;
  appearance: none;
}

.chat-tab .migo-chat-window-controls button:hover,
.chat-tab .migo-chat-window-controls button:focus-visible {
  background: rgba(82, 91, 108, 0.11);
  outline: none;
}

.chat-tab .migo-chat-window-controls .migo-window-close:hover,
.chat-tab .migo-chat-window-controls .migo-window-close:focus-visible {
  background: #c42b1c;
  color: #fff;
}

.chat-tab .migo-chat-window-controls svg {
  display: block;
  position: static;
  width: 16px;
  height: 16px;
  margin: 0;
  transform: none;
  pointer-events: none;
}

.chat-tab .migo-chat-window-controls .migo-window-icon-restore {
  display: none;
}

.chat-tab .chat-wrapper.migo-chat-minimized .migo-window-icon-maximize {
  display: none;
}

.chat-tab .chat-wrapper.migo-chat-minimized .migo-window-icon-restore {
  display: block;
}

.chat-tab .chat-wrapper.migo-chat-minimized .migo-chat-more {
  display: none !important;
}

.chat-tab .chat-wrapper.migo-chat-minimized .migo-chat-header-actions {
  margin-left: 8px;
}

#migo-profile-donation-modal .migo-donation-recipient {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start !important;
  gap: 12px !important;
  min-width: 0;
}

#migo-profile-donation-modal .migo-donation-recipient > div {
  min-width: 0;
}

#migo-profile-donation-modal .migo-donation-recipient img {
  width: 48px !important;
  height: 48px !important;
  margin-top: 1px;
}

#migo-profile-donation-modal .migo-donation-recipient h4 {
  margin: 0 0 3px !important;
  font-size: 18px !important;
  line-height: 1.25;
  text-wrap: balance;
}

#migo-profile-donation-modal .migo-donation-recipient p {
  max-width: 34rem;
  font-size: 13px;
  line-height: 1.38 !important;
}

#migo-profile-donation-modal .modal-body {
  min-height: 0;
  padding: 14px 16px 15px !important;
  overflow-y: auto;
}

#migo-profile-donation-modal .migo-donation-balance {
  margin-bottom: 12px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
}

#migo-profile-donation-modal .migo-donation-label {
  margin: 12px 0 7px !important;
}

#migo-profile-donation-modal .migo-donation-presets {
  gap: 7px !important;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#migo-profile-donation-modal .migo-donation-preset {
  min-height: 38px;
  padding: 8px 5px !important;
  border: 1px solid rgba(82, 91, 108, 0.15) !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--migo-modal-text) !important;
  font-weight: 600;
  box-shadow: none !important;
}

#migo-profile-donation-modal .migo-donation-preset + .migo-donation-preset {
  border-left: 1px solid rgba(82, 91, 108, 0.15) !important;
}

#migo-profile-donation-modal .migo-donation-amount-wrap,
#migo-profile-donation-modal #migo-donation-message {
  border-radius: 9px !important;
}

#migo-profile-donation-modal .migo-donation-balance,
#migo-profile-donation-modal .migo-donation-amount-wrap,
#migo-profile-donation-modal #migo-donation-message {
  border: 1px solid rgba(82, 91, 108, 0.14) !important;
  background: rgba(255, 255, 255, 0.42) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

#migo-profile-donation-modal .migo-donation-preset:hover {
  border-color: rgba(82, 91, 108, 0.24) !important;
  background: rgba(255, 255, 255, 0.22) !important;
}

#migo-profile-donation-modal .migo-donation-preset.active {
  border-color: rgba(82, 91, 108, 0.18) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: 0 1px 3px rgba(45, 53, 65, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}

#migo-profile-donation-modal .migo-donation-preset.active + .migo-donation-preset {
  border-left-color: rgba(82, 91, 108, 0.15) !important;
}

#migo-profile-donation-modal .migo-donation-recipient p,
#migo-profile-donation-modal .migo-donation-note {
  color: var(--migo-modal-muted) !important;
}

#migo-profile-donation-modal .migo-donation-note {
  margin-top: 12px !important;
}

#migo-profile-donation-modal .modal-footer {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
  margin: 0 !important;
  padding: 12px 16px 14px !important;
  border-top: 1px solid var(--migo-modal-divider) !important;
}

#migo-profile-donation-modal .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin: 0 !important;
  padding: 0 16px !important;
  border-radius: 7px !important;
  font-weight: 600;
  gap: 8px;
  transition: background-color 140ms ease, border-color 140ms ease, transform 100ms ease;
}

#migo-profile-donation-modal .modal-footer .btn svg {
  flex: 0 0 auto;
  stroke: currentColor;
}

#migo-profile-donation-modal .migo-donation-topup {
  border: 1px solid rgba(82, 91, 108, 0.18) !important;
  background: var(--migo-modal-control) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

#migo-profile-donation-modal .migo-donation-submit {
  border: 1px solid rgba(82, 91, 108, 0.18) !important;
  background: var(--migo-modal-control) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42) !important;
}

#migo-profile-donation-modal .migo-donation-topup svg {
  color: #3978a8;
}

#migo-profile-donation-modal .migo-donation-submit svg {
  color: #c64d53;
}

#migo-profile-donation-modal .migo-donation-topup:hover,
#migo-profile-donation-modal .migo-donation-topup:focus-visible,
#migo-profile-donation-modal .migo-donation-submit:hover,
#migo-profile-donation-modal .migo-donation-submit:focus-visible {
  border-color: rgba(82, 91, 108, 0.28) !important;
  background: var(--migo-modal-control-hover) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52) !important;
  outline: none;
}

#migo-profile-donation-modal .modal-footer .btn:active {
  transform: translateY(1px);
}

html.migo-donation-is-minimized .modal-backdrop {
  display: none !important;
}

#migo-profile-donation-modal.migo-window-minimized {
  display: block !important;
  padding: 0 !important;
  overflow: visible;
  pointer-events: none;
}

#migo-profile-donation-modal.migo-window-minimized .modal-dialog {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(430px, calc(100% - 36px));
  max-height: none;
  margin: 0 !important;
  pointer-events: auto;
}

#migo-profile-donation-modal.migo-window-minimized .migo-donation-modal-content {
  max-height: none;
}

#migo-profile-donation-modal.migo-window-minimized form {
  display: none;
}

#migo-profile-donation-modal.migo-window-minimized .migo-donation-header {
  padding: 9px 10px !important;
  border-bottom: 0 !important;
}

#migo-profile-donation-modal.migo-window-minimized .migo-donation-recipient {
  display: block !important;
  align-self: center;
}

#migo-profile-donation-modal.migo-window-minimized .migo-donation-recipient img,
#migo-profile-donation-modal.migo-window-minimized .migo-donation-recipient p {
  display: none;
}

#migo-profile-donation-modal.migo-window-minimized .migo-donation-recipient h4 {
  overflow: hidden;
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#migo-profile-donation-modal.migo-window-minimized .migo-window-controls {
  margin: 0;
}

#migo-profile-donation-modal.migo-window-maximized {
  align-items: stretch;
  padding: 64px 8px 8px !important;
}

#migo-profile-donation-modal.migo-window-maximized .modal-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0 !important;
}

#migo-profile-donation-modal.migo-window-maximized .migo-donation-modal-content {
  width: 100%;
  height: 100%;
  max-height: none;
}

#migo-profile-donation-modal.migo-window-maximized form {
  flex: 1 1 auto;
  overflow: hidden;
}

#migo-profile-donation-modal.migo-window-maximized .modal-body {
  flex: 1 1 auto;
  width: min(760px, 100%);
  margin-inline: auto;
}

#migo-profile-donation-modal.migo-window-maximized .modal-footer {
  width: min(760px, 100%);
  margin-inline: auto !important;
}

/* Dark theme is identified by the stylesheet dynamically added by Migo. */
html:has(#night-mode-css) {
  --migo-modal-surface: linear-gradient(145deg, rgba(38, 42, 50, 0.9), rgba(24, 27, 33, 0.82));
  --migo-modal-border: rgba(255, 255, 255, 0.16);
  --migo-modal-divider: rgba(255, 255, 255, 0.1);
  --migo-modal-control: rgba(255, 255, 255, 0.075);
  --migo-modal-control-hover: rgba(255, 255, 255, 0.12);
  --migo-modal-text: #f2f4f8;
  --migo-modal-muted: #aeb6c3;
  --migo-modal-shadow: 0 34px 110px rgba(0, 0, 0, 0.56), 0 8px 30px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

html:has(#night-mode-css) .modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) button.close:hover,
html:has(#night-mode-css) .modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) button.close:focus-visible,
html:has(#night-mode-css) .modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) .btn-default:hover,
html:has(#night-mode-css) .modal:not(:where(#watchMovieBox, #calling-modal, #re-calling-modal, #video-calling-modal)) .btn-default:focus-visible {
  background: rgba(255, 255, 255, 0.12) !important;
}

html:has(#night-mode-css) #migo-profile-donation-modal .migo-donation-balance,
html:has(#night-mode-css) #migo-profile-donation-modal .migo-donation-amount-wrap,
html:has(#night-mode-css) #migo-profile-donation-modal #migo-donation-message {
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html:has(#night-mode-css) #migo-profile-donation-modal .migo-donation-preset {
  border-color: rgba(255, 255, 255, 0.11) !important;
  background: transparent !important;
  box-shadow: none !important;
}

html:has(#night-mode-css) #migo-profile-donation-modal .migo-donation-preset.active {
  border-color: rgba(255, 255, 255, 0.18) !important;
  background: rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-dialog > .modal-content {
    background: rgba(250, 251, 253, 0.98) !important;
  }

  html:has(#night-mode-css) .modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-dialog > .modal-content {
    background: rgba(27, 30, 36, 0.98) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal .modal-dialog,
  .modal button,
  .modal input,
  .modal textarea,
  .modal select {
    transition: none !important;
  }
}

@media (max-width: 575px) {
  .modal:not(#watchMovieBox):not(#calling-modal):not(#re-calling-modal):not(#video-calling-modal) .modal-dialog > .modal-content {
    border-radius: 10px !important;
  }

  #migo-profile-donation-modal .migo-donation-header {
    padding: 13px 14px 10px !important;
  }

  #migo-profile-donation-modal .modal-body {
    padding: 12px 14px 13px !important;
  }

  #migo-profile-donation-modal .modal-footer {
    grid-template-columns: 1fr;
    padding: 10px 14px 13px !important;
  }

  .migo-group-chat-modal.show,
  .migo-group-chat-modal.in {
    align-items: flex-start;
    padding: 64px 8px 8px !important;
  }

  .migo-group-chat-modal .modal-dialog {
    width: 100%;
  }

  .migo-group-chat-modal .migo-group-chat-header {
    padding: 13px 14px 10px !important;
  }

  .migo-group-chat-modal .modal-body {
    padding: 12px 14px 13px !important;
  }

  .migo-group-chat-modal .modal-footer {
    grid-template-columns: 1fr;
    padding: 10px 14px 13px !important;
  }

  .migo-group-chat-modal .migo-group-chat-form-row {
    grid-template-columns: 1fr;
    align-items: stretch !important;
  }

  .migo-group-chat-modal .tag_chat_grp_avtr_crt {
    align-self: center;
    justify-self: center;
  }
}

@media (max-height: 720px) {
  #migo-profile-donation-modal.show,
  #migo-profile-donation-modal.in {
    align-items: flex-start;
    padding-top: 68px !important;
    overflow-y: auto;
  }

  #migo-profile-donation-modal .migo-donation-modal-content {
    max-height: calc(100vh - 84px);
  }

  .migo-group-chat-modal.show,
  .migo-group-chat-modal.in {
    align-items: flex-start;
    padding-top: 68px !important;
    overflow-y: auto;
  }

  .migo-group-chat-modal .migo-group-chat-modal-content {
    max-height: calc(100vh - 84px);
  }
}

/* Align media-only messages sent by the current user with outgoing text bubbles. */
.chat-messages-wrapper .messages-wrapper > .message.outgoing {
  margin-left: auto;
}

/* Header dropdowns — keep legacy menus below the fixed bar and give them the
   same acrylic surface language as the newer Migo dialogs. */
@media (min-width: 769px) {
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu {
    top: calc(100% + 16px) !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    min-width: 0 !important;
    max-height: calc(100dvh - 79px) !important;
    padding: 10px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    border: 1px solid var(--migo-modal-border) !important;
    border-radius: 10px !important;
    background: var(--migo-modal-surface) !important;
    color: var(--migo-modal-text) !important;
    box-shadow: 0 22px 58px rgba(15, 23, 42, 0.24), 0 7px 20px rgba(15, 23, 42, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
    -webkit-backdrop-filter: blur(34px) saturate(155%);
    backdrop-filter: blur(34px) saturate(155%);
    isolation: isolate;
    z-index: 1055 !important;
    transform-origin: top right;
    animation: migo-header-menu-enter 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(82, 91, 108, 0.34) transparent;
  }

  .tag_navbar_top_right .requests-container > .dropdown-menu,
  .tag_navbar_top_right .messages-notification-container > .dropdown-menu,
  .tag_navbar_top_right .notification-container > .dropdown-menu {
    width: min(390px, calc(100vw - 24px)) !important;
  }

  .tag_navbar_top_right .tag_main_usr_ddmenu > .tag_hdr_user_dropdown {
    width: min(410px, calc(100vw - 24px)) !important;
  }
}

@keyframes migo-header-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu {
    animation: none !important;
  }
}

@media (min-width: 769px) {
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu a,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-list,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-text,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-text > span,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-text > span a,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .ajax-time,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .header-message,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .turn-off-sound,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .empty_state,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_footer,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_footer a {
    color: var(--migo-modal-text) !important;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .ajax-time,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .header-message,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .sec_text,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_footer {
    color: var(--migo-modal-muted) !important;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-list,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .user-request-list,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .messages-list {
    margin: 2px 0 !important;
    padding: 10px !important;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 11px !important;
    background: transparent;
    transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-list::before,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .user-request-list::before,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .messages-list::before,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .show-message-link::before,
  .tag_navbar_top_right .tag_hdr_user_dropdown > li > a::before {
    display: none !important;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-list:hover,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .user-request-list:hover,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .messages-list:hover {
    border-color: var(--migo-modal-divider);
    background: var(--migo-modal-control);
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .notification-user-avatar,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .user-request-list .avatar {
    width: 52px;
    min-width: 52px;
    height: 52px;
    margin-right: 12px;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .empty_state {
    min-height: 210px;
    padding: 42px 16px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 16px;
    line-height: 1.4;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .empty_state svg {
    width: 74px;
    height: 74px;
    margin: 0 auto 14px;
    filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .show-message-link {
    margin: 9px 2px 2px !important;
    padding: 10px 12px !important;
    border: 1px solid var(--migo-modal-divider);
    border-radius: 10px !important;
    background: var(--migo-modal-control) !important;
    color: var(--migo-modal-text) !important;
    font-weight: 600;
    transition: background-color 140ms ease, border-color 140ms ease;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .show-message-link:hover,
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .show-message-link:focus-visible {
    border-color: rgba(82, 91, 108, 0.22);
    background: var(--migo-modal-control-hover) !important;
    outline: none;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_switch_noti {
    margin: 4px auto 12px !important;
    padding: 3px !important;
    border: 1px solid var(--migo-modal-divider) !important;
    border-radius: 999px !important;
    background: rgba(82, 91, 108, 0.08) !important;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_switch_noti::before {
    display: none !important;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_switch_noti > li > a {
    padding: 5px 13px !important;
    border-radius: 999px !important;
    color: var(--migo-modal-muted) !important;
  }

  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu .tag_switch_noti > li > a.active {
    background: var(--migo-modal-control-hover) !important;
    color: var(--migo-modal-text) !important;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.12) !important;
  }

  .tag_navbar_top_right .tag_hdr_user_dropdown > li > a {
    min-height: 48px;
    margin: 1px 0;
    padding: 6px 10px !important;
    border: 1px solid transparent;
    border-radius: 11px !important;
    color: var(--migo-modal-text) !important;
    line-height: 36px !important;
    transition: border-color 140ms ease, background-color 140ms ease;
  }

  .tag_navbar_top_right .tag_hdr_user_dropdown > li > a:hover,
  .tag_navbar_top_right .tag_hdr_user_dropdown > li > a:focus-visible {
    border-color: var(--migo-modal-divider);
    background: var(--migo-modal-control) !important;
    outline: none;
  }

  .tag_navbar_top_right .tag_hdr_user_dropdown > li > a > svg {
    width: 36px;
    height: 36px;
    margin-right: 14px;
    padding: 8px;
    background: rgba(82, 91, 108, 0.1) !important;
    color: var(--migo-modal-text);
  }

  .tag_navbar_top_right .tag_hdr_user_dropdown > li > a > img {
    margin-right: 14px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.74), 0 4px 12px rgba(15, 23, 42, 0.12);
  }

  .tag_navbar_top_right .tag_hdr_user_submenu {
    padding-left: 60px !important;
    margin: 3px 0 7px !important;
    gap: 7px;
  }

  .tag_navbar_top_right .tag_hdr_user_submenu a {
    margin: 0 !important;
    padding: 2px 10px !important;
    border: 1px solid var(--migo-modal-divider);
    border-radius: 999px !important;
    background: rgba(82, 91, 108, 0.08) !important;
    color: var(--migo-modal-text) !important;
  }

  .tag_navbar_top_right .tag_hdr_user_submenu a:hover,
  .tag_navbar_top_right .tag_hdr_user_submenu a:focus-visible {
    background: var(--migo-modal-control-hover) !important;
    outline: none;
  }

  .tag_navbar_top_right .tag_hdr_user_dropdown hr {
    margin: 8px 4px !important;
    border-color: var(--migo-modal-divider) !important;
  }
}

@media (min-width: 769px) and (max-height: 620px) {
  .tag_navbar_top_right .tag_hdr_right > .dropdown > .dropdown-menu {
    max-height: calc(100dvh - 71px) !important;
  }
}

/* The relative-time updater removes .ajax-time after localizing the label.
   Anchor timestamp typography to stable row structure in all three header
   lists so date labels never jump to the inherited 15px size. */
@media (min-width: 769px) {
  .tag_navbar_top_right .messages-notification-container .messages-list .notification-text > div[title]:first-child,
  .tag_navbar_top_right .notification-container .notification-list .notification-text > div[title] {
    margin: 0 !important;
    overflow: hidden;
    color: var(--migo-modal-muted) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 15.7143px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Expanded navigation and header search — use the same Migo acrylic system as
   dialogs and header dropdowns while preserving their existing behavior. */
.tag_navbar_top_side_all,
.tag_navbar_top .tag_header > .search-container .search-dropdown-container {
  border: 1px solid var(--migo-modal-border) !important;
  background: var(--migo-modal-surface) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: 0 24px 62px rgba(15, 23, 42, 0.25), 0 8px 24px rgba(15, 23, 42, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
  -webkit-backdrop-filter: blur(34px) saturate(155%);
  backdrop-filter: blur(34px) saturate(155%);
}

.side_open .tag_side_backdrop {
  background: rgba(13, 18, 28, 0.42) !important;
  -webkit-backdrop-filter: blur(8px) saturate(112%);
  backdrop-filter: blur(8px) saturate(112%);
}

.tag_toggle_sidebar_top {
  border: 1px solid var(--migo-modal-border) !important;
  background: var(--migo-modal-control-hover) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

.tag_toggle_sidebar_top:hover,
.tag_toggle_sidebar_top:focus-visible {
  background: var(--migo-modal-control) !important;
  outline: none;
}

.tag_navbar_top_side_all .sidebar_innr {
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 91, 108, 0.34) transparent;
}

.tag_navbar_top_side_all_heading {
  color: var(--migo-modal-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: 0.09em !important;
}

.tag_navbar_top_side_all_sec {
  gap: 12px 14px !important;
}

.tag_navbar_top_side_all_sec > a {
  display: flex !important;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px !important;
  border: 1px solid var(--migo-modal-divider) !important;
  border-radius: 11px !important;
  background: rgba(255, 255, 255, 0.24) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38) !important;
  line-height: 1.25 !important;
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.tag_navbar_top_side_all_sec > a:hover,
.tag_navbar_top_side_all_sec > a:focus-visible {
  border-color: rgba(82, 91, 108, 0.22) !important;
  background: var(--migo-modal-control-hover) !important;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.58) !important;
  color: var(--migo-modal-text) !important;
  outline: none;
  transform: translateY(-1px);
}

.tag_navbar_top_side_all_sec > a svg,
.tag_navbar_top_side_all_sec > a img {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  margin: 0 10px 0 0 !important;
  padding: 5px;
  border-radius: 9px;
  background: rgba(82, 91, 108, 0.1);
  color: var(--migo-modal-muted) !important;
}

.tag_navbar_top .tag_header > .search-container.show .search-input {
  border: 1px solid var(--migo-modal-divider) !important;
  background: var(--migo-modal-control-hover) !important;
  color: var(--migo-modal-text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
}

.tag_navbar_top .tag_header > .search-container.show .search-input::placeholder {
  color: var(--migo-modal-muted) !important;
  opacity: 0.88;
}

/* The browser-provided clear glyph does not match Migo's control language. */
.tag_navbar_top .search-input::-webkit-search-cancel-button {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.tag_navbar_top .search-input::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

.tag_navbar_top .search-dropdown-container .tag_srch_recent,
.tag_navbar_top .search-dropdown-container .search-dropdown-result,
.tag_navbar_top .search-dropdown-container .search-advanced-container,
.tag_navbar_top .search-dropdown-container .hashtag-search-result,
.tag_navbar_top .search-dropdown-container .empty_state {
  color: var(--migo-modal-text) !important;
}

.tag_navbar_top .search-dropdown-container .recent {
  min-height: 34px;
  margin: 0 2px 4px;
  padding: 0 3px 7px !important;
  border-bottom: 1px solid var(--migo-modal-divider);
}

.tag_navbar_top .search-dropdown-container .recent .recent-searches {
  color: var(--migo-modal-muted) !important;
  font-weight: 650;
  letter-spacing: 0.07em;
}

.tag_navbar_top .search-dropdown-container .recent .btn {
  min-height: 28px;
  padding: 3px 10px !important;
  border: 1px solid rgba(209, 73, 84, 0.16);
  border-radius: 8px;
  background: rgba(209, 73, 84, 0.11) !important;
  color: #d14954 !important;
  font-weight: 600;
  line-height: 20px !important;
}

.tag_navbar_top .search-dropdown-result {
  padding: 1px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 91, 108, 0.34) transparent;
}

.tag_navbar_top .search-dropdown-result > a,
.tag_navbar_top .hashtag-search-result > a {
  margin: 2px 0 !important;
  padding: 7px !important;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px !important;
  background: transparent;
  color: var(--migo-modal-text) !important;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.tag_navbar_top .search-dropdown-result > a::before,
.tag_navbar_top .hashtag-search-result > a::before,
.tag_navbar_top .search-advanced-container > a::before {
  display: none !important;
}

.tag_navbar_top .search-dropdown-result > a:hover,
.tag_navbar_top .search-dropdown-result > a:focus-visible,
.tag_navbar_top .hashtag-search-result > a:hover,
.tag_navbar_top .hashtag-search-result > a:focus-visible {
  border-color: var(--migo-modal-divider);
  background: var(--migo-modal-control) !important;
  outline: none;
}

.tag_navbar_top .search-dropdown-result .search-user-avatar {
  margin-right: 12px !important;
}

.tag_navbar_top .search-dropdown-result .search-user-avatar img {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.68), 0 5px 13px rgba(15, 23, 42, 0.12);
}

.tag_navbar_top .search-dropdown-result .search-user-name {
  color: var(--migo-modal-text) !important;
  font-weight: 600 !important;
}

.tag_navbar_top .search-dropdown-result .search-user-lastseen {
  color: var(--migo-modal-muted) !important;
  opacity: 1 !important;
}

.tag_navbar_top .search-dropdown-result .search_result_badge {
  background: rgba(250, 251, 253, 0.94) !important;
  box-shadow: 0 0 0 1px var(--migo-modal-divider);
}

.tag_navbar_top .search-advanced-container {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--migo-modal-divider);
}

.tag_navbar_top .search-advanced-container > a {
  margin: 0 !important;
  padding: 7px !important;
  border: 1px solid transparent;
  border-radius: 11px !important;
  color: var(--migo-modal-text) !important;
}

.tag_navbar_top .search-advanced-container > a:hover,
.tag_navbar_top .search-advanced-container > a:focus-visible {
  border-color: var(--migo-modal-divider);
  background: var(--migo-modal-control) !important;
  outline: none;
}

.tag_navbar_top .search-advanced-container > a svg {
  background: rgba(82, 91, 108, 0.09) !important;
  color: var(--migo-modal-text);
}

.tag_navbar_top .search-dropdown-container .empty_state {
  min-height: 230px;
  padding: 42px 16px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1.4;
}

.tag_navbar_top .search-dropdown-container .empty_state svg {
  width: 74px;
  height: 74px;
  margin-bottom: 14px;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.08));
}

html:has(#night-mode-css) .tag_navbar_top_side_all_sec > a {
  background: rgba(255, 255, 255, 0.045) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

html:has(#night-mode-css) .tag_navbar_top_side_all_arrow {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(34, 38, 46, 0.96) !important;
}

html:has(#night-mode-css) .tag_navbar_top .search-dropdown-result .search_result_badge {
  background: rgba(31, 35, 42, 0.96) !important;
}

@media (min-width: 769px) {
  .tag_navbar_top_side_all {
    border-radius: 10px !important;
  }

  .tag_navbar_top_side_all_arrow {
    width: 13px !important;
    height: 13px !important;
    border-top: 1px solid var(--migo-modal-border);
    border-left: 1px solid var(--migo-modal-border);
    background: rgba(250, 251, 253, 0.94) !important;
    box-shadow: -4px -4px 10px rgba(15, 23, 42, 0.06) !important;
  }

  .tag_navbar_top_side_all .sidebar_innr {
    max-height: calc(100dvh - 92px) !important;
    padding: 0 20px 20px !important;
  }

  .tag_navbar_top .tag_header > .search-container .search-dropdown-container {
    top: -4px !important;
    max-height: calc(100dvh - 68px) !important;
    padding: 51px 10px 10px !important;
    overflow: hidden !important;
    border-radius: 10px !important;
    animation: migo-header-menu-enter 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: top left;
  }

  /* Keep the search shell tight around the input until it has real content. */
  .tag_navbar_top .tag_header > .search-container .search-dropdown-container:not(:has(
    .wow_htag > *,
    .search-dropdown-result > *,
    .search-advanced-container:not([style*="display: none"])
  )) {
    padding-top: 47px !important;
    padding-bottom: 0 !important;
  }

  .tag_navbar_top .tag_header > .search-container .search-dropdown-container:not(:has(
    .wow_htag > *,
    .search-dropdown-result > *,
    .search-advanced-container:not([style*="display: none"])
  )) .search-dropdown-result {
    padding-block: 0;
  }
}

@media (max-width: 768px) {
  .tag_navbar_top_side_all {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .tag_navbar_top_side_all .sidebar_innr {
    padding: 0 14px 18px !important;
  }

  .tag_navbar_top_side_all_sec {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tag_navbar_top_side_all_sec > a {
    min-width: 0 !important;
  }
}

@media (max-width: 520px) {
  .tag_navbar_top .tag_header > .search-container .search-dropdown-container {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .tag_navbar_top_side_all_sec {
    gap: 10px !important;
  }

  .tag_navbar_top_side_all_sec > a {
    min-height: 60px;
    padding: 8px !important;
    font-size: 13px;
  }

  .tag_navbar_top_side_all_sec > a svg,
  .tag_navbar_top_side_all_sec > a img {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px;
    margin-right: 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tag_navbar_top_side_all,
  .tag_navbar_top_side_all_sec > a,
  .tag_navbar_top .tag_header > .search-container .search-dropdown-container,
  .tag_navbar_top .search-dropdown-result > a,
  .tag_navbar_top .hashtag-search-result > a {
    animation: none !important;
    transition: none !important;
  }
}
