/*
DroneHQ Utility Drawers v144
Makes Location, Email, Calendar, and Notifications match the AI overlay behavior.
No page layout space is reserved while a drawer is open.
*/

:root {
  --dronehq-utility-drawer-width-v144: 390px;
}

/* Full-height, fixed overlay drawers. */
#dhq-location-dock-v31,
#dhq-email-dock-v32,
#dhq-calendar-dock-v21,
#dhq-notifications-dock-v23,
.dhq-location-dock-v31,
.dhq-email-dock-v32,
.dhq-calendar-dock-v21,
.dhq-notifications-dock-v23 {
  position: fixed !important;
  inset: 0 0 0 auto !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(var(--dronehq-utility-drawer-width-v144), 94vw) !important;
  min-width: 0 !important;
  max-width: 94vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border-top: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  z-index: 1210 !important;
  box-shadow: -24px 0 64px rgba(0, 0, 0, 0.42) !important;
  overflow: hidden !important;
}

/* Preserve existing hidden behavior. */
#dhq-location-dock-v31[hidden],
#dhq-email-dock-v32[hidden],
#dhq-calendar-dock-v21[hidden],
#dhq-notifications-dock-v23[hidden] {
  display: none !important;
}

/* Keep each drawer internally scrollable without scrolling the page. */
#dhq-location-dock-v31,
#dhq-email-dock-v32,
#dhq-calendar-dock-v21,
#dhq-notifications-dock-v23 {
  flex-direction: column !important;
}

#dhq-location-dock-v31 [class*="__body"],
#dhq-email-dock-v32 [class*="__body"],
#dhq-calendar-dock-v21 [class*="__body"],
#dhq-notifications-dock-v23 [class*="__body"] {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/*
Critical layout protection:
legacy drawer styles reserve right-side space. v144 explicitly cancels that
so the page remains full width underneath the overlay.
*/
body.dronehq-location-docked-open main,
body.dronehq-location-docked-open .app-main,
body.dronehq-location-docked-open .shell-main,
body.dronehq-location-docked-open .page-main,
body.dronehq-location-docked-open .workspace-main,
body.dronehq-location-docked-open .dashboard-shell,
body.dronehq-location-docked-open .content-shell,
body.dronehq-email-docked-open main,
body.dronehq-email-docked-open .app-main,
body.dronehq-email-docked-open .shell-main,
body.dronehq-email-docked-open .page-main,
body.dronehq-email-docked-open .workspace-main,
body.dronehq-email-docked-open .dashboard-shell,
body.dronehq-email-docked-open .content-shell,
body.dronehq-calendar-docked-open main,
body.dronehq-calendar-docked-open .app-main,
body.dronehq-calendar-docked-open .shell-main,
body.dronehq-calendar-docked-open .page-main,
body.dronehq-calendar-docked-open .workspace-main,
body.dronehq-calendar-docked-open .dashboard-shell,
body.dronehq-calendar-docked-open .content-shell,
body.dronehq-notifications-docked-open main,
body.dronehq-notifications-docked-open .app-main,
body.dronehq-notifications-docked-open .shell-main,
body.dronehq-notifications-docked-open .page-main,
body.dronehq-notifications-docked-open .workspace-main,
body.dronehq-notifications-docked-open .dashboard-shell,
body.dronehq-notifications-docked-open .content-shell {
  margin-right: 0 !important;
  padding-right: initial !important;
  max-width: none !important;
  width: auto !important;
  transform: none !important;
}

/* Compact full-workspace link matching the AI drawer. */
.dronehq-utility-full-link-v144 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  margin: 10px 16px 12px;
  padding: 7px 12px;
  border: 1px solid rgba(76, 157, 224, 0.38);
  border-radius: 8px;
  background: rgba(18, 63, 103, 0.26);
  color: #63bdff;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.dronehq-utility-full-link-v144:hover,
.dronehq-utility-full-link-v144:focus-visible {
  border-color: rgba(91, 184, 255, 0.68);
  background: rgba(26, 88, 140, 0.34);
}

/* Match the active utility-button treatment. */
.shell-utilities [aria-expanded="true"]:is(
  [data-location-button],
  [data-dhq-email-toggle-v32],
  [data-calendar-menu-toggle],
  [data-notification-button]
) {
  border-color: #65c1ff !important;
  box-shadow:
    0 0 0 2px rgba(58, 166, 255, 0.18),
    0 0 22px rgba(37, 153, 255, 0.24) !important;
}

@media (max-width: 760px) {
  #dhq-location-dock-v31,
  #dhq-email-dock-v32,
  #dhq-calendar-dock-v21,
  #dhq-notifications-dock-v23 {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}
