/*
 * Golden Hub Care v10.5
 * Shared tenant-branded print output.
 *
 * The application UI remains Golden Hub Care.
 * Printed output may use tenant identity.
 */

.gh-print-brand {
  display: none !important;
}

@media print {

  @page {
    margin: 0.35in;
  }

  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /*
   * Print only the actual page content.
   * This prevents the application shell, development
   * banner, sidebar, and header from appearing.
   */
  body * {
    visibility: hidden !important;
  }

  .gh-page,
  .gh-page * {
    visibility: visible !important;
  }

  .gh-shell,
  .gh-v10-app,
  .gh-v10-workspace,
  .gh-v10-global-content {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .gh-v10-sidebar,
  .gh-v10-dashboard-header,
  .gh-topbar {
    display: none !important;
  }

  .gh-page {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .gh-page > .gh-hero {
    display: none !important;
  }

  /*
   * Tenant-branded document header.
   */
  .gh-print-brand {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom:
      3px solid
      var(--gh-print-secondary, #d0d5dd);
    break-inside: avoid;
  }

  .gh-print-brand-logo {
    width: 90px !important;
    height: auto !important;
    max-height: 58px !important;
    object-fit: contain !important;
    object-position: left center;
  }

  .gh-print-brand-copy {
    min-width: 0;
  }

  .gh-print-brand-company {
    margin: 0 0 3px;
    color:
      var(--gh-print-primary, #344054);
    font-size: 15pt;
    line-height: 1.05;
    font-weight: 800;
  }

  .gh-print-brand-title {
    margin: 0;
    color: #172033;
    font-size: 11pt;
    line-height: 1.25;
    font-weight: 700;
  }

  .gh-print-brand-powered {
    margin-top: 3px;
    color: #667085;
    font-size: 7.5pt;
  }
}


/* ============================================================
   WEEKLY SCHEDULE GROUP PRINTING

   One schedule group = one landscape page.
   ============================================================ */

.gh-schedule-print-host {
  display: none;
}

@media print {

  /*
   * Weekly Schedule uses its dedicated print document.
   * Do not print the screen-oriented schedule DOM.
   */
  .gh-schedule-page
    > :not(.gh-schedule-print-host) {
    display: none !important;
  }

  .gh-schedule-print-host {
    display: block !important;
    width: 100% !important;
  }

  .gh-schedule-print-page {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;

    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .gh-schedule-print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .gh-schedule-print-page
    .gh-print-brand {
    display: flex !important;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  .gh-schedule-print-page
    .gh-print-brand-logo {
    width: 72px !important;
    max-height: 46px !important;
  }

  .gh-schedule-print-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;

    margin: 0 0 8px;
    padding: 0 0 6px;

    border-bottom:
      1px solid
      #d8e0e8;
  }

  .gh-schedule-print-group {
    color:
      var(
        --gh-tenant-primary,
        #15b8a6
      );

    font-size: 12pt;
    line-height: 1;
    font-weight: 800;
  }

  .gh-schedule-print-week {
    color: #172033;
    font-size: 9pt;
    line-height: 1.1;
    font-weight: 700;
    text-align: right;
  }

  .gh-schedule-print-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;

    font-size:
      var(
        --gh-schedule-print-font,
        8.5pt
      );

    line-height: 1.08;
  }

  .gh-schedule-print-table th,
  .gh-schedule-print-table td {
    padding:
      var(
        --gh-schedule-print-pad,
        4px
      );

    border:
      1px solid
      #d8e0e8;

    vertical-align: top;
  }

  .gh-schedule-print-table th {
    color: #12324a;
    background: #f7f9fb;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .035em;
  }

  .gh-schedule-print-table th strong,
  .gh-schedule-print-table th span {
    display: block;
  }

  .gh-schedule-print-table th span {
    margin-top: 1px;
    color: #667085;
    font-size: .9em;
  }

  .gh-schedule-print-table tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .gh-schedule-print-name {
    font-weight: 700;
  }

  .gh-schedule-print-cell {
    min-height: 0 !important;
    line-height: 1.08;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .gh-schedule-print-empty {
    padding: 18px !important;
    color: #667085;
    text-align: center;
  }
}


/* ============================================================
   SHARED TENANT REPORT FOUNDATION

   Operational reports belong to the tenant.
   Golden Hub application branding is never used as a
   fallback identity on printed customer records.
   ============================================================ */

.gh-print-brand-logo[hidden] {
  display: none !important;
}

@media print {

  /*
   * Backward-compatibility guard for older report templates
   * that still contain a Golden Hub fallback image.
   */
  .gh-print-brand-logo[
    src*="goldenhub-default-logo.png"
  ],
  .gh-print-brand-logo[
    src*="goldenhub-care.png"
  ],
  .gh-print-brand-logo[
    src="/shared/assets/logo.png"
  ] {
    display: none !important;
  }


  /*
   * Legacy vendor attribution is intentionally omitted from
   * tenant operational reports. Modules may use the neutral
   * .gh-print-brand-meta class for dates/ranges/context.
   */
  .gh-print-brand-powered {
    display: none !important;
  }


  .gh-print-brand-meta {
    margin-top: 3px;
    color: #667085;
    font-size: 7.5pt;
    line-height: 1.25;
  }
}
