/* aggrid-custom.css - Reset to minimal, non-intrusive styles so AG Grid default header is used.
   This file intentionally avoids overriding header layout, icons, or sticky behavior.
   If you want to add safe, small tweaks later (e.g., font-family), add them here.
*/

/* Keep cell wrapping and base white background, but do not alter header */
.ag-theme-alpine .ag-cell {
  white-space: normal !important;
  line-height: 20px !important;
  padding: 8px 10px !important;
  background-color: #ffffff;
}

/* No header overrides to preserve AG Grid's default header rendering */

/* Ensure sort/filter/menu icons are visible in header (non-intrusive)
   This forces visibility and opacity only; it doesn't change layout or header positioning. */
.ag-theme-alpine .ag-header-cell .ag-header-icon,
.ag-theme-alpine .ag-header-cell .ag-sort-indicator,
.ag-theme-alpine .ag-header-cell .ag-header-cell-menu-button {
  visibility: visible !important;
  opacity: 1 !important;
}

/* 强制显示表头按钮 */
.always-show-buttons .ag-header-cell-menu-button,
.always-show-buttons .ag-header-cell-filter-button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 表头样式优化 */
.ag-header-cell-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 确保按钮有足够空间 */
.ag-header-cell {
    padding: 8px 4px;
}

/* Make header cell label align items so sort icons sit right after the header text */
.ag-theme-alpine .ag-header-cell .ag-header-cell-label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

/* Put sort indicator right after header text (inline) and make it more visible) */
.ag-theme-alpine .ag-header-cell .ag-sort-indicator {
  order: 1;
  margin-left: 6px;
  color: rgba(0,0,0,0.65);
  opacity: 1 !important;
  font-size: 12px;
}

/* Ensure header text doesn't overflow; allow wrap if necessary */
.ag-theme-alpine .ag-header-cell .ag-header-cell-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

 Tooltip styling for full text display with wrapping and max width
.ag-theme-alpine .ag-tooltip {
  white-space: normal !important;
  max-width: 600px;
  background: rgba(0,0,0,0.4);
  color: rgba(30,30,30,0.95);
  border: 1px solid #4a90e2;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
}


/* Single-line ellipsis inside cells for compact height */
.default-cell-style {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Ensure compact single-line cell style wins over global .ag-cell rules */
.ag-theme-alpine .ag-cell.default-cell-style {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Row resize handle styling */
.ag-theme-alpine .ag-row .row-resize-handle {
  opacity: 0;
  transition: opacity .15s ease;
}
.ag-theme-alpine .ag-row:hover .row-resize-handle {
  opacity: 1;
  background: rgba(0,0,0,0.08);
}

