/* ==========================================================================
   Xphias LLC Guest Speaker Manager
   08-print.css
   Print / PDF engine for the seven pre-production sections.
   ========================================================================== */

/* The copyright symbol used to be a hidden mode switch and this rule kept it
   clickable even while read-only froze everything else. The mode is changed in
   exactly one place now -- Options ▸ Read Only System-Wide -- so the symbol is
   a symbol again. This stylesheet loads last, which is why the rule had to be
   removed here rather than merely overridden. */
body.read-only-system .secret-ro-toggle-link,
.secret-ro-toggle-link {
  pointer-events: none !important;
  cursor: default !important;
  text-decoration: none !important;
}


/* ========================================================= */
/* ========================================================= */
/* 🖨️ STRICT PRE-PRODUCTION PRINT & PDF ENGINE               */
/* - HIDE ALL UNWANTED UI BUTTONS, DOCKS & CONTROLS          */
/* - HIDE ALL GOOGLE CLOUD SYNC MENTIONS & BADGES            */
/* - INCLUDE & ACTIVATE BUTTONS/LINKS IN THE 7 SECTIONS:      */
/*   1. Pre-Production Video                                 */
/*   2. Training                                             */
/*   3. Run of Show / Shot List                              */
/*   4. Admin Resources                                      */
/*   5. Supplemental                                         */
/*   6. Post Production                                      */
/*   7. Tech Note                                            */
/* ========================================================= */
@media print {
  @page {
    /* Half an inch, which is what a printer driver defaults to and what a
       binder expects. A quarter inch put the outer column within a few
       millimetres of the edge, where cheap printers clip. */
    margin: 0.5in;
    size: auto;
  }
  body, .main-wrap {
    background: #0b1120 !important;
    color: #fff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    padding: 0 !important;
  }

  /* 1. HIDE ALL GENERAL NAVIGATION, TOOLBARS, DOCKS & OVERLAYS */
  .toolbar,
  #options-panel,
  #options-panel-overlay,
  #side-panel,
  #side-panel-overlay,
  #roster-dock-btn,
  #options-dock-btn,
  #landing-screen,
  #calendar-overlay,
  .c-search,
  .module-card::after {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 2. HIDE ALL GOOGLE CLOUD SYNC BADGES, BANNERS, AND MENTIONS */
  .cloud-badge,
  #cloud-sync-badge,
  #landing-cloud-sync-badge,
  .workspace-action-row,
  [class*="cloud-badge"],
  [id*="cloud-sync"],
  .cloud-sync-banner,
  .cs-badge,
  .cs-actions,
  .header-action-group,
  .header-action-row,
  div[onclick*="GoogleSheetsSync"],
  span[onclick*="GoogleSheetsSync"],
  a[onclick*="GoogleSheetsSync"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  /* 3. HIDE MODE BADGES, RO BANNERS, TIMERS & HUD ELEMENTS */
  .mode-badge,
  #workspace-mode-badge,
  #landing-mode-badge,
  #cal-mode-badge,
  .curate-ro-banner,
  .cd-wrap,
  .ros-cd-prominent,
  .maint-cd-badge,
  .cd-bar,
  .c-t,
  .countdown-wrapper,
  .countdown-container {
    display: none !important;
    visibility: hidden !important;
  }

  /* THE PORTRAIT RING ON PAPER.
     The ring is a countdown, and a countdown frozen at the moment somebody
     hit Print is not information -- it is a half-drawn circle that looks
     like a printing fault. So the arc goes and the portrait keeps a plain,
     complete ring instead. The face stays; only the timer leaves. */
  .xp-pring-svg { display: none !important; }
  .xp-pring .speaker-portrait {
    border: 2.5px solid #7a7a7a !important;
    box-shadow: none !important;
  }

  /* 4. HIDE GENERAL EDITING & ACTION BUTTONS BY DEFAULT */
  button:not(.active-pdf-link),
  input[type="button"]:not(.active-pdf-link),
  input[type="submit"]:not(.active-pdf-link),
  input[type="reset"],
  #btn-save,
  #btn-save-header,
  #btn-save-toolbar,
  #btn-export-excel,
  #btn-generate-pdf,
  #btn-home,
  #btn-auto-curate,
  #btn-search-editor,
  #btn-help-editor,
  #btn-options-editor,
  #btn-roster-toggle,
  .module-card button[onclick*="oP"],
  .section-bar-light button,
  .section-bar-blue button,
  .section-bar-dark button,
  .card-header button {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
  }

  /* ========================================================================= */
  /* 🌟 ACTIVATED BUTTONS & HYPERLINKS IN THE 7 PRE-PRODUCTION SECTIONS        */
  /* ========================================================================= */
  /* 1. Pre-Production Video */
  #card-prepro,
  #pp-prepro-section,
  #card-prepro a,
  .btn-prepro-video,
  a.btn-prepro-video,
  /* 2. Training */
  #card-tr a,
  #pp-tr a,
  .btn-tr-link,
  /* 3. Run of Show / Shot List */
  #card-ros a,
  #pp-ros a,
  .btn-ros-link,
  .btn-ros-item-link,
  /* 4. Admin Resources */
  #card-ad a,
  #pp-ad a,
  .btn-admin-link,
  /* 5. Supplemental */
  #card-su a,
  #pp-su a,
  .btn-su-link,
  .btn-su-view,
  .btn-su-down,
  /* 6. Post Production */
  #card-pp a,
  #pp-pp a,
  .btn-pp-link,
  /* 7. Tech Note */
  #card-tn a,
  .tech-note-link,
  .active-pdf-link {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    text-decoration: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    height: auto !important;
    width: auto !important;
    cursor: pointer !important;
  }

  /* Polished Button Styling for Generated PDF Output */
  .btn-prepro-video,
  a.btn-prepro-video {
    background: #c9a84c !important;
    color: #000000 !important;
    font-weight: 800 !important;
    padding: 8px 18px !important;
    font-size: 11px !important;
    border-radius: 5px !important;
    border: 1.5px solid #c9a84c !important;
    box-shadow: none !important;
    gap: 6px !important;
    align-items: center !important;
  }
  .prepro-print-url {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 4px !important;
    font-size: 8.5pt !important;
    color: #00b4d8 !important;
    font-family: monospace !important;
    word-break: break-all !important;
  }
  .btn-su-down {
    background: #c9a84c !important;
    color: #000000 !important;
    font-weight: 800 !important;
    padding: 6px 14px !important;
    font-size: 10px !important;
    border-radius: 4px !important;
    border: 1px solid #c9a84c !important;
  }
  .btn-su-view,
  .btn-admin-link,
  .btn-tr-link,
  .btn-pp-link,
  .btn-ros-link,
  .btn-ros-item-link,
  .tech-note-link {
    background: rgba(0, 180, 216, 0.15) !important;
    color: #00b4d8 !important;
    border: 1.5px solid #00b4d8 !important;
    font-weight: 700 !important;
    padding: 5px 12px !important;
    font-size: 10px !important;
    border-radius: 4px !important;
    gap: 5px !important;
    align-items: center !important;
  }

  /* Clean Document Layout for Single-Page PDF Output */
  #editor-screen {
    display: flex !important;
    height: auto !important;
    overflow: visible !important;
  }
  .split-view {
    display: block !important;
    overflow: visible !important;
  }
  .card {
    break-inside: avoid !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    background: rgba(30, 41, 59, 0.5) !important;
    box-shadow: none !important;
  }
  .document-grid {
    display: grid !important;
    grid-template-columns: var(--grid-cols, 2fr 4.2fr 4.8fr) !important;
    grid-template-areas: var(--grid-areas, "c2 c1 c3") !important;
  }
}

/* ==========================================================================
   CREW ROSTER IN PRINT / PDF
   The printed note keeps the same three-column page layout, so a department
   card is only about an inch and a half wide on paper. The tables therefore
   keep their fixed proportions and drop to a small type size -- the goal is
   that every name and role is readable and COMPLETE, never cut off at the
   card edge or broken one letter per line.
   ========================================================================== */
@media print {
  #crew-hovercard { display: none !important; }

  .crew-tbl-wrap {
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border-color: #334155 !important;
    background: transparent !important;
  }

  .crew-tbl { table-layout: fixed !important; width: 100% !important; font-size: 6pt !important; }
  .crew-tbl thead { position: static !important; background: #1e293b !important; }
  .crew-tbl thead tr { color: #00b4d8 !important; font-size: 4.6pt !important; letter-spacing: 0 !important; }
  .crew-tbl th { padding: 3px 2px !important; font-size: 4.6pt !important; }
  .crew-tbl td { padding: 3px 2px !important; }
  .crew-tbl.cols-5 th,
  .crew-tbl.cols-5 td { padding: 3px 2px !important; }
  .crew-tbl tbody tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
    border-bottom: 1px solid rgba(255,255,255,.12) !important;
  }
  .crew-row { cursor: default !important; }
  .crew-row:hover { background: transparent !important; }

  .crew-tbl .crew-num   { color: #94a3b8 !important; font-size: 4.6pt !important; }
  .crew-tbl .crew-last  { color: #c9a84c !important; font-weight: 700 !important; font-size: 6pt !important; }
  .crew-tbl .crew-first { color: #fff    !important; font-size: 6pt !important; }
  .crew-tbl .crew-role-cell { color: #00b4d8 !important; font-size: 5.6pt !important; }

  /* On paper: one combined "Surname, Given" column instead of two. */
  .crew-tbl .c-name-print { display: table-cell !important; }
  .crew-tbl .c-last,
  .crew-tbl .c-first     { display: none !important; }

  .crew-tbl.cols-4 .c-num { width: 16px !important; }
  .crew-tbl.cols-4 .c-name-print { width: 46% !important; }

  .crew-tbl.cols-5 .c-num        { width: 14px !important; }
  .crew-tbl.cols-5 .c-name-print { width: 40% !important; }
  .crew-tbl.cols-5 .c-role       { width: 33% !important; }
  .crew-tbl.cols-5 .c-status     { width: 27% !important; }

  .crew-remote-pill,
  .crew-key-pill {
    font-size: 4pt !important;
    letter-spacing: 0 !important;
    padding: 0 1.5px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ==========================================================================
   THE YEAR-END REGISTER                                           v3.27.0
   Built into its own overlay so the app underneath is never torn down. Off
   screen until printing, and the only thing on the page when it is.
   ========================================================================== */
#yearend-register { display: none; }

@media print {
  body.printing-register > *:not(#yearend-register) { display: none !important; }
  body.printing-register #yearend-register {
    display: block !important;
    position: static !important;
    background: #fff !important;
    color: #111 !important;
  }
  body.printing-register { background: #fff !important; }

  .reg-page { font-family: Georgia, 'Times New Roman', serif; font-size: 9.5pt; color: #111; }
  .reg-head { border-bottom: 2.5px solid #111; padding-bottom: 9px; margin-bottom: 14px; }
  .reg-head h1 { margin: 0; font-size: 20pt; letter-spacing: .4px; }
  .reg-sub  { font-size: 9pt; color: #444; margin-top: 3px; }
  .reg-meta { font-size: 8.5pt; color: #666; margin-top: 5px; }

  .reg-summary { display: flex; gap: 26px; margin-bottom: 18px; }
  .reg-summary div { font-size: 8.5pt; color: #444; text-transform: uppercase; letter-spacing: .5px; }
  .reg-n { display: block; font-size: 21pt; font-weight: bold; color: #111; letter-spacing: 0; }

  .reg-page h2 {
    font-size: 12pt; margin: 18px 0 7px; padding-bottom: 3px;
    border-bottom: 1px solid #999; break-after: avoid; page-break-after: avoid;
  }
  .reg-table { width: 100%; border-collapse: collapse; font-size: 8pt; }
  .reg-table thead { display: table-header-group; }   /* repeat on every page */
  .reg-table th {
    text-align: left; border-bottom: 1.5px solid #111;
    padding: 4px 5px; font-size: 7.5pt; text-transform: uppercase; letter-spacing: .4px;
  }
  .reg-table td { padding: 3.5px 5px; border-bottom: .5px solid #ccc; vertical-align: top; }
  .reg-table tr { break-inside: avoid; page-break-inside: avoid; }
  .reg-doom td { background: #f3f3f3; font-weight: bold; }

  .reg-empty { font-style: italic; color: #666; }
  .reg-foot {
    margin-top: 20px; padding-top: 9px; border-top: 1px solid #999;
    font-size: 7.5pt; color: #444; line-height: 1.45;
  }
}


/* ==========================================================================
   THE ANALYTICS MASTHEAD

   body.printing-analytics turns the Analytics dialog into a plain document
   (see css/04-components.css). This gives that document a letterhead, so a
   page that leaves the printer says what it is, what made it, and when.
   ========================================================================== */
@media print {
  body.printing-analytics .ao-brand {
    display: block !important;
    border-right: none !important;
    padding: 0 !important;
    margin-bottom: 2px !important;
  }
  body.printing-analytics .ao-brand-name {
    display: block !important;
    font-size: 18pt !important;
    color: #0f172a !important;
    letter-spacing: .6px !important;
  }
  body.printing-analytics .ao-brand-what {
    display: block !important;
    font-size: 8pt !important;
    color: #334155 !important;
  }
  body.printing-analytics .ao-brand-who {
    display: block !important;
    font-size: 6pt !important;
    color: #64748b !important;
  }
  /* The heading sits under the name, not beside it, and the whole block
     gets a rule so it reads as a letterhead rather than a stray line. */
  body.printing-analytics #ao .modal-header {
    display: block !important;
    border-bottom: 1.5pt solid #0f172a !important;
    padding: 0 0 6pt 0 !important;
    margin-bottom: 12pt !important;
  }
  body.printing-analytics #ao-title {
    display: block !important;
    font-size: 12pt !important;
    color: #0f172a !important;
    margin: 6pt 0 0 0 !important;
  }
  body.printing-analytics .ao-print-stamp {
    display: block !important;
    font-size: 7pt !important;
    color: #64748b !important;
    margin-top: 2pt !important;
  }
  /* The masthead repeats at the top of every page of a long roster. */
  body.printing-analytics #ao .modal-header { break-after: avoid; }
}


/* ==========================================================================
   THE ALL APPEARANCES MASTHEAD

   Same letterhead, on the general dialog. #mo already carries the branding
   in its header for the screen; printing turns that quiet mark into the
   top of a document, with the list's own name, the filter it was run under
   and the date underneath.

   IN THE THEME'S OWN COLOURS. This block used to be dark ink on white --
   see the note over body.printing-allapp in css/04-components.css for why
   it is not any more. Gold for the name, white for the heading, muted grey
   for the small print: the same three the dialog uses on screen.
   ========================================================================== */
@media print {
  body.printing-allapp .mod-brand {
    display: block !important;
    border-right: none !important;
    padding: 0 !important;
    margin-bottom: 2px !important;
  }
  body.printing-allapp .mod-brand-name {
    display: block !important;
    font-size: 18pt !important;
    color: #c9a84c !important;
    letter-spacing: .6px !important;
  }
  body.printing-allapp .mod-brand-what {
    display: block !important;
    font-size: 8pt !important;
    color: #94a3b8 !important;
  }
  body.printing-allapp .mod-head-left {
    display: block !important;
  }
  body.printing-allapp #mo .modal-header {
    display: block !important;
    border-bottom: 1.5pt solid #c9a84c !important;
    padding: 0 0 6pt 0 !important;
    margin-bottom: 10pt !important;
    break-after: avoid;
  }
  body.printing-allapp #mh {
    display: block !important;
    font-size: 12pt !important;
    color: #ffffff !important;
    margin: 6pt 0 0 0 !important;
  }
  body.printing-allapp .aa-print-stamp {
    display: block !important;
    font-size: 7pt !important;
    color: #94a3b8 !important;
    margin: 0 0 8pt 0 !important;
  }
  /* The credit line stays with the document, at the foot of the last sheet,
     the same as it sits at the foot of the dialog. */
  body.printing-allapp .modal-foot-wrap {
    display: block !important;
    border-top: 1pt solid rgba(255, 255, 255, .22) !important;
    margin-top: 10pt !important;
    padding-top: 5pt !important;
  }
  body.printing-allapp .modal-credit,
  body.printing-allapp .modal-year {
    display: inline-block !important;
    font-size: 7pt !important;
    color: #94a3b8 !important;
    margin-right: 10pt !important;
  }
  /* The count line -- "48 appearances matching ..." -- is the last word on
     the sheet and worth keeping. */
  body.printing-allapp .aa-foot {
    display: block !important;
    font-size: 8pt !important;
    color: #ffffff !important;
    margin-top: 6pt !important;
  }

  /* The page itself. @page cannot take a background, so the ground has to
     come from the elements -- and the body rule at the top of this file
     already paints navy. These keep the table on it rather than letting the
     generic print rules bleach the rows, and make sure the browser is told,
     on each one, that the colour is not decoration. */
  body.printing-allapp,
  body.printing-allapp #mo,
  body.printing-allapp #mo .aa-table,
  body.printing-allapp #mo .aa-table thead,
  body.printing-allapp #mo .aa-table tbody,
  body.printing-allapp #mo .aa-table tr,
  body.printing-allapp #mo .aa-table th,
  body.printing-allapp #mo .aa-table td {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.printing-allapp #mo .aa-table th {
    color: #00b4d8 !important;
    background: #1e293b !important;
    border-bottom: 1pt solid rgba(255, 255, 255, .25) !important;
  }
  body.printing-allapp #mo .aa-table td {
    border-bottom: .5pt solid rgba(255, 255, 255, .10) !important;
  }
  /* A zebra would be the obvious thing here and it is deliberately absent:
     the rows are grouped by speaker, and alternating the bands cuts across
     the grouping, which is the one thing this sheet is sorted by. */
}
