/*
 * Fixed-header clearance for the specialized administrator workspaces.
 *
 * These pages use their own layout modules, some of which set `padding` with
 * !important. Loading this file last lets those modules retain their intended
 * horizontal and bottom spacing without allowing content to slip beneath the
 * 66px application header.
 */
.activity-log-workspace,
.email-log-workspace,
.performance-monitoring-workspace,
.content-review-workspace,
.admin-review-workspace {
  padding-top: 94px !important;
}

@media (max-width: 850px) {
  .activity-log-workspace,
  .email-log-workspace,
  .performance-monitoring-workspace,
  .content-review-workspace,
  .admin-review-workspace {
    padding-top: 82px !important;
  }
}

/* A public navigation bar adds another row above the fixed app header. */
body:has(.site-navigation) .activity-log-workspace,
body:has(.site-navigation) .email-log-workspace,
body:has(.site-navigation) .performance-monitoring-workspace,
body:has(.site-navigation) .content-review-workspace,
body:has(.site-navigation) .admin-review-workspace {
  padding-top: 148px !important;
}

@media (max-width: 700px) {
  body:has(.site-navigation) .activity-log-workspace,
  body:has(.site-navigation) .email-log-workspace,
  body:has(.site-navigation) .performance-monitoring-workspace,
  body:has(.site-navigation) .content-review-workspace,
  body:has(.site-navigation) .admin-review-workspace {
    padding-top: 136px !important;
  }
}

/* The User profile is the longest administrator dialog. The dialog itself
 * never scrolls: its account context remains fixed and only the detail area
 * scrolls below it. This file is deliberately loaded last. */
.admin-user-modal[open] {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  width: min(780px, calc(100vw - 32px));
  max-height: min(780px, calc(100vh - 32px)) !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0;
  border-radius: 16px;
  background: #fffefa;
}

.admin-user-modal[open] .dialog-heading {
  position: relative !important;
  z-index: 4;
  display: block !important;
  margin: 0;
  padding: 28px 84px 16px 28px !important;
  background: #fffefa;
}

.admin-user-modal[open] .dialog-close {
  position: absolute !important;
  top: 22px !important;
  right: 28px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 5;
  margin: 0 !important;
}

.admin-user-modal[open] .admin-user-modal-context {
  z-index: 3;
  margin: 0;
  padding: 0 28px 18px;
  border-bottom: 1px solid #dce7e3;
  background: #fffefa;
}

.admin-user-modal[open] .admin-user-modal-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 28px 28px;
}

@media (max-width: 560px) {
  .admin-user-modal[open] .dialog-heading { padding: 22px 72px 14px 22px !important; }
  .admin-user-modal[open] .dialog-close { top: 18px !important; right: 22px !important; }
  .admin-user-modal[open] .admin-user-modal-context { padding: 0 22px 14px; }
  .admin-user-modal[open] .admin-user-modal-scroll { padding: 16px 22px 22px; }
}
