/* V36.7.163 — landscape date picker layout and natural vertical scrolling
   for the complete Activity Log panel. */

/* Landscape: give the date/time dialog enough horizontal room for a true
   calendar + clock layout. Keep the action row visible beneath both columns. */
@media (orientation: landscape) and (min-width: 650px) {
  .cp-picker-overlay {
    align-items: center !important;
    justify-content: center !important;
    padding: 3vh 3vw !important;
  }
  .cp-picker-panel {
    width: min(94vw, 1040px) !important;
    max-width: 1040px !important;
    max-height: 90dvh !important;
    border-radius: 22px !important;
  }
  .cp-picker-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1.12fr) minmax(270px, .88fr) !important;
    align-items: center !important;
    gap: 12px 18px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 14px 18px !important;
  }
  .cp-calendar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    padding: 2px 0 8px !important;
  }
  .cp-clock {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    border-top: 0 !important;
    border-left: 1px solid var(--border-color) !important;
    padding: 8px 0 8px 16px !important;
  }
  .cp-clock-face {
    width: min(34vw, 270px) !important;
    max-width: 270px !important;
  }
  .cp-picker-actions {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    padding-top: 10px !important;
  }
}

/* Activity Log: the whole pane follows the page's vertical scroll. The table
   wrapper only captures horizontal movement, so a vertical swipe anywhere
   inside the filter, heading, or history panel scrolls the page naturally. */
html body #tab-admin #admin-pane-audit.active {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  flex: none !important;
  overscroll-behavior: auto !important;
}
html body #tab-admin #admin-pane-audit .audit-pane-heading {
  position: relative !important;
  flex: none !important;
}
html body #tab-admin #admin-pane-audit .audit-filter-bar {
  position: relative !important;
  max-height: none !important;
  overflow: visible !important;
  flex: none !important;
  touch-action: pan-y !important;
}
html body #tab-admin #admin-pane-audit .audit-log-frame {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  flex: none !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: clip !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-x: contain !important;
  overscroll-behavior-y: auto !important;
  touch-action: pan-x pan-y !important;
  scrollbar-gutter: auto !important;
}
html body #tab-admin #admin-pane-audit .audit-log-scroll .custom-table {
  width: max-content !important;
  min-width: 100% !important;
}
@media (orientation: landscape) and (max-height: 620px) {
  html body #tab-admin #admin-pane-audit .audit-filter-bar {
    grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  }
}
