/**
 * @file
 * Minimal print styles for UFGS Changes and Revisions view.
 *
 * Simple, clean table printing - just the essentials.
 */

@media print {
  /* Standard letter page setup */
  @page {
    size: letter portrait;
    margin: 0.5in;
  }

  /* Hide site chrome and UI elements */
  .site-header,
  .site-footer,
  .sidebar,
  .sidebar-first,
  .sidebar-second,
  .region-sidebar-first,
  .region-sidebar-second,
  .region-header,
  .region-navigation,
  .site-branding,
  .view-filters,
  .pager,
  button,
  .btn,
  nav,
  .breadcrumb,
  .tabs,
  .messages,
  .maintenance-msg,
  #cookie-notice,
  .cookie-notice,
  .eu-cookie-compliance-banner,
  .page-header,
  .block-system-branding-block,
  .block-menu,
  .menu--main,
  .menu--account,
  header,
  footer,
  .layout-sidebar-first,
  .contextual-links-wrapper,
  .feed-icons,
  aside {
    display: none !important;
  }

  /* Full page width layout - eliminate all spacing */
  body,
  .container,
  .container-fluid,
  .main-content,
  .region-content,
  .view,
  .view-content,
  .layout-container,
  .row,
  .col,
  article,
  .node,
  .page-wrapper,
  #main-wrapper,
  #page {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    float: none !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
  }

  /* Remove borders from all divs within the view */
  .view-ufgs-cr-test * {
    border-left: none !important;
    border-right: none !important;
  }

  /* But preserve table cell borders */
  .view-ufgs-cr-test table,
  .view-ufgs-cr-test th,
  .view-ufgs-cr-test td {
    border: 1px solid #000 !important;
  }

  /* Clean table styling with optimized spacing */
  table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10pt;
    margin: 0;
  }

  th,
  td {
    border: 1px solid #000;
    padding: 6px 8px;
    text-align: left;
    font-size: 10pt;
    line-height: 1.3;
  }

  th {
    background-color: #f0f0f0;
    font-weight: bold;
    font-size: 10pt;
  }

  /* Remove link underlines */
  a {
    text-decoration: none;
    color: #000;
  }

  /* Hide page title if it duplicates */
  h1.page-title {
    font-size: 14pt;
    margin: 0 0 5px 0;
    padding: 0;
  }

  /* Hide the descriptive text below the title */
  .view-content > p,
  .view > p,
  .region-content > p {
    display: none !important;
  }

  /* Optimize column widths for better layout */
  .views-field-field-ufgs-section {
    width: 20%;
  }

  .views-field-field-nature-of-change {
    width: 35%;
  }

  /* Ensure view header (KEY legend) is visible but compact */
  .view-header {
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 9pt;
  }

  /* Style the HR rule under the KEY */
  hr {
    border: none;
    border-top: 1px solid #333;
    margin: 8px 0 12px 0;
    padding: 0;
  }

  /* Add spacing between HR and table */
  .view-content {
    margin-top: 12px;
  }
}
