/* Z-index fixes: ensure dropdown menus are always above application windows */
.dropdown {
  z-index: 10000 !important;
}

/* Optional: keep navbar relative but with modest z-index (higher than default windows) */
.navbar {
  position: relative;
  z-index: 9999;
}

/* === Root Exit Dialog Styles === */
.root-exit-overlay {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
}

.root-exit-dialog {
  background: rgba(0, 0, 0, 0.92);
  color: #e6e6e6;
  border-radius: 8px;
  /* Solid white border to emphasise the dialog */
  border: 2px solid #ffffff;
  padding: 24px 28px;
  max-width: 90%;
  width: 480px;
  font-family: 'Ubuntu Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.root-exit-dialog p {
  margin: 0 0 18px 0;
  font-size: 1.1rem;
  line-height: 1.5;
}

.root-exit-actions {
  /* Center the action buttons horizontally within the dialog */
  display: flex;
  justify-content: center;
  gap: 12px;
}

.root-exit-btn {
  font-family: 'Ubuntu Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform .1s ease, filter .1s ease;
  text-transform: capitalize;
  user-select: none;
}

.root-exit-btn.no {
  background: #1067b5;
  color: #ffffff;
  border: 1px solid #1067b5;
}

.root-exit-btn.yes {
  background: #000000;
  color: #ffffff;
  border: 1px solid #333333;
}

.root-exit-btn:hover {
  filter: brightness(1.15);
}

.root-exit-btn:active {
  transform: scale(0.95);
}

/*
 * Responsive adjustment for the login note: when the viewport width
 * is below 800px, reduce the size of the note (note.png) to 40% of
 * its default size. This prevents the note graphic from dominating
 * small screens. We use a CSS transform to scale the image relative
 * to its top‑left corner so that the image shrinks in place without
 * disturbing surrounding layout.
 */
@media (max-width: 800px) {
  #login-screen .login-note img {
    /* Reset any transforms applied previously and scale by using width */
    transform: none !important;
    width: 100%;
    max-width: 120px; /* 40% of the original 300px */
    height: auto;
    display: block;
  }
  /*
   * Prevent the note element from intercepting clicks on mobile. We also give
   * it a lower z-index so the login container stays above. The width is
   * restricted to 120px (40% of 300px) to keep the bounding box small.
   */
  #login-screen .login-note {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    z-index: 0 !important;
    width: 120px;
  }
  /* Ensure the login container sits above the note on mobile */
  #login-screen .main-container {
    /* Preserve the absolute positioning and margin:auto from login.css */
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
    z-index: 1;
    /* Do not apply transform on mobile; default centering from margin:auto works */
    transform: none;
  }
}