/*!
 * FullCalendar v3.9.0
 * Docs & License: https://fullcalendar.io/
 * (c) 2018 Adam Shaw
 */
/*!
 * FullCalendar v3.9.0 Print Stylesheet
 * Docs & License: https://fullcalendar.io/
 * (c) 2018 Adam Shaw
 */
/*
 * Include this stylesheet on your page to get a more printer-friendly calendar.
 * When including this stylesheet, use the media='print' attribute of the <link> tag.
 * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
 */
.fc
{
   max-width: 100% !important;
}

/* Global Event Restyling
--------------------------------------------------------------------------------------------------*/
.fc-event
{
   background: #fff !important;
   color: #000 !important;
   page-break-inside: avoid;
}

.fc-event .fc-resizer
{
   display: none;
}

/* Table & Day-Row Restyling
--------------------------------------------------------------------------------------------------*/
.fc th,
.fc td,
.fc hr,
.fc thead,
.fc tbody,
.fc-row
{
   border-color: #ccc !important;
   background: #fff !important;
}

/* kill the overlaid, absolutely-positioned components */
/* common... */
.fc-bg,
.fc-bgevent-skeleton,
.fc-highlight-skeleton,
.fc-helper-skeleton,
.fc-bgevent-container,
.fc-business-container,
.fc-highlight-container,
.fc-helper-container
{
   display: none;
}

/* don't force a min-height on rows (for DayGrid) */
.fc tbody .fc-row
{
   height: auto !important;
   /* undo height that JS set in distributeHeight */
   min-height: 0 !important;
   /* undo the min-height from each view's specific stylesheet */
}

.fc tbody .fc-row .fc-content-skeleton
{
   position: static;
   /* undo .fc-rigid */
   padding-bottom: 0 !important;
   /* use a more border-friendly method for this... */
}

.fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td
{
   /* only works in newer browsers */
   padding-bottom: 1em;
   /* ...gives space within the skeleton. also ensures min height in a way */
}

.fc tbody .fc-row .fc-content-skeleton table
{
   /* provides a min-height for the row, but only effective for IE, which exaggerates this value,
     making it look more like 3em. for other browers, it will already be this tall */
   height: 1em;
}

/* Undo month-view event limiting. Display all events and hide the "more" links
--------------------------------------------------------------------------------------------------*/
.fc-more-cell,
.fc-more
{
   display: none !important;
}

.fc tr.fc-limited
{
   display: table-row !important;
}

.fc td.fc-limited
{
   display: table-cell !important;
}

.fc-popover
{
   display: none;
   /* never display the "more.." popover in print mode */
}

/* TimeGrid Restyling
--------------------------------------------------------------------------------------------------*/
/* undo the min-height 100% trick used to fill the container's height */
.fc-time-grid
{
   min-height: 0 !important;
}

/* don't display the side axis at all ("all-day" and time cells) */
.fc-agenda-view .fc-axis
{
   display: none;
}

/* don't display the horizontal lines */
.fc-slats,
.fc-time-grid hr
{
   /* this hr is used when height is underused and needs to be filled */
   display: none !important;
   /* important overrides inline declaration */
}

/* let the container that holds the events be naturally positioned and create real height */
.fc-time-grid .fc-content-skeleton
{
   position: static;
}

/* in case there are no events, we still want some height */
.fc-time-grid .fc-content-skeleton table
{
   height: 4em;
}

/* kill the horizontal spacing made by the event container. event margins will be done below */
.fc-time-grid .fc-event-container
{
   margin: 0 !important;
}

/* TimeGrid *Event* Restyling
--------------------------------------------------------------------------------------------------*/
/* naturally position events, vertically stacking them */
.fc-time-grid .fc-event
{
   position: static !important;
   margin: 3px 2px !important;
}

/* for events that continue to a future day, give the bottom border back */
.fc-time-grid .fc-event.fc-not-end
{
   border-bottom-width: 1px !important;
}

/* indicate the event continues via "..." text */
.fc-time-grid .fc-event.fc-not-end:after
{
   content: "...";
}

/* for events that are continuations from previous days, give the top border back */
.fc-time-grid .fc-event.fc-not-start
{
   border-top-width: 1px !important;
}

/* indicate the event is a continuation via "..." text */
.fc-time-grid .fc-event.fc-not-start:before
{
   content: "...";
}

/* time */
/* undo a previous declaration and let the time text span to a second line */
.fc-time-grid .fc-event .fc-time
{
   white-space: normal !important;
}

/* hide the the time that is normally displayed... */
.fc-time-grid .fc-event .fc-time span
{
   display: none;
}

/* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */
.fc-time-grid .fc-event .fc-time:after
{
   content: attr(data-full);
}

/* Vertical Scroller & Containers
--------------------------------------------------------------------------------------------------*/
/* kill the scrollbars and allow natural height */
.fc-scroller,
.fc-day-grid-container,
.fc-time-grid-container
{
   /* */
   overflow: visible !important;
   height: auto !important;
}

/* kill the horizontal border/padding used to compensate for scrollbars */
.fc-row
{
   border: 0 !important;
   margin: 0 !important;
}

/* Button Controls
--------------------------------------------------------------------------------------------------*/
.fc-button-group,
.fc button
{
   display: none;
   /* don't display any button-related controls */
}

.no-print,
.no-print *
{
   display: none !important;
   visibility: hidden !important;
}

.custom-select-filters,
.custom-select-filters *
{
   display: none !important;
   visibility: hidden !important;
}

.nav
{
   display: none !important;
   visibility: hidden !important;
}

/*
.cal-legend
{
   break-before: page;
   display: none !important;
   visibility: hidden !important;
}
*/

header,
footer
{
   break-before: page;
   display: none !important;
   visibility: hidden !important;
}

/*header,
footer,
.nav,
.no-print,
.no-print *
{
   display: none !important;
   visibility: hidden !important;
}*/


/* ====================== END ORIGINAL; BEGIN CONSOLIDATED MERGE ====================== */

/* ====================== BEGIN MERGE PATCH v4 (Portrait/general) ====================== */
/* Hide hero/banner in print */
.head-banner,
.hero,
.page-hero,
.page-hero * {
  display: none !important;
  visibility: hidden !important;
}

/* Keep only legend + calendar in the main content container */
.white-shadow > *:not(fieldset.cal-legend):not(.cal-legend):not(.m-v-2) {
  display: none !important;
}

/* Inside the calendar wrapper, keep only #calendar */
.white-shadow > .m-v-2 > *:not(#calendar) {
  display: none !important;
}

/* Strong keep-together rules */
fieldset.cal-legend,
.m-v-2,
#calendar,
#calendar .fc,
#calendar .fc-header-toolbar,
#calendar .fc-toolbar,
#calendar .fc-toolbar .fc-toolbar-chunk,
#calendar .fc-toolbar-title,
#calendar .fc-view-harness,
#calendar .fc-view-harness-active,
#calendar .fc-scroller,
#calendar .fc-daygrid {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}
.white-shadow > fieldset.cal-legend + .m-v-2 {
  break-before: avoid-page !important;
  page-break-before: avoid !important;
}
#calendar .fc-header-toolbar,
#calendar .fc-toolbar {
  break-after: avoid-page !important;
  page-break-after: avoid !important;
}

/* Center the Month Year title and hide side chunks/buttons */
#calendar .fc-header-toolbar,
#calendar .fc-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 0.5rem !important;
}
#calendar .fc-toolbar .fc-toolbar-chunk { flex: 1 1 0 !important; text-align: center !important; }
#calendar .fc-toolbar .fc-toolbar-chunk:first-child,
#calendar .fc-toolbar .fc-toolbar-chunk:last-child { display: none !important; }
#calendar .fc-toolbar-title { display: inline-block !important; margin: 0 auto !important; font-weight: 700 !important; }

/* Print tidying */
#calendar, #calendar .fc { max-width: 100% !important; }
#calendar { font-size: 11pt; }
#calendar .fc-scroller, #calendar .fc-view-harness { overflow: visible !important; height: auto !important; }
#calendar .fc-theme-standard td, #calendar .fc-theme-standard th { border-color: #000 !important; }

@page { margin: 0.5in; }
/* ====================== END MERGE PATCH v4 ====================== */

/* ====================== BEGIN MERGE PATCH v5 (Landscape) ====================== */
@media print and (orientation: landscape) {

  @page { margin: 0.35in 0.5in; }

  .stretch, .container, .white-shadow, .m-v-2,
  #calendar, #calendar .fc, #calendar .fc-view-harness,
  #calendar .fc-view-harness-active, #calendar .fc-scroller {
    overflow: visible !important;
  }

  #calendar .fc-header-toolbar,
  #calendar .fc-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    padding-top: 0.15in !important;
    break-before: avoid-page !important;
    page-break-before: avoid !important;
    break-after: avoid-page !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  #calendar .fc-toolbar .fc-toolbar-chunk { flex: 1 1 0 !important; text-align: center !important; }
  #calendar .fc-toolbar .fc-toolbar-chunk:first-child,
  #calendar .fc-toolbar .fc-toolbar-chunk:last-child { display: none !important; }
  #calendar .fc-toolbar-title { display: inline-block !important; margin: 0 auto !important; line-height: 1.2 !important; }

  .white-shadow > fieldset.cal-legend + .m-v-2 {
    page-break-before: avoid !important;
    break-before: avoid-page !important;
  }

  #calendar .fc-view-harness {
    page-break-before: avoid !important;
    break-before: avoid-page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}
/* ====================== END MERGE PATCH v5 ====================== */

/* ====================== BEGIN MERGE PATCH v7 (Firefox conservative top spacer) ====================== */
@-moz-document url-prefix() {
  @media print {

    .stretch, .container, .white-shadow, .m-v-2,
    #calendar, #calendar .fc, #calendar .fc-view-harness,
    #calendar .fc-view-harness-active, #calendar .fc-scroller {
      overflow: visible !important;
    }

    /* Conservative top spacer for Firefox to prevent title clipping */
    .white-shadow > .m-v-2::before {
      content: "";
      display: block;
      height: 0.4in;
    }

    #calendar .fc-header-toolbar,
    #calendar .fc-toolbar {
      padding-top: 0.15in !important;
      break-before: avoid-page !important;
      page-break-before: avoid !important;
      break-after: avoid-page !important;
      page-break-after: avoid !important;
      break-inside: avoid !important;
      page-break-inside: avoid !important;
    }

    #calendar .fc-toolbar .fc-toolbar-chunk { flex: 1 1 0 !important; text-align: center !important; }
    #calendar .fc-toolbar .fc-toolbar-chunk:first-child,
    #calendar .fc-toolbar .fc-toolbar-chunk:last-child { display: none !important; }
    #calendar .fc-toolbar-title { display: inline-block !important; margin: 0 auto !important; line-height: 1.3 !important; }
  }
}
/* ====================== END MERGE PATCH v7 ====================== */


/* ====================== BEGIN MERGE PATCH v8 (Firefox landscape first page fix) ====================== */
@-moz-document url-prefix() {
  @media print and (orientation: landscape) {

    /* Remove the spacer to prevent pushing content to page 2 */
    .white-shadow > .m-v-2::before {
      height: 0 !important;
    }

    /* Use padding on the toolbar instead (avoids margin collapse and blank page) */
    #calendar .fc-header-toolbar,
    #calendar .fc-toolbar {
      padding-top: 0.25in !important;
    }

    /* Ensure the first calendar block does not request a new page */
    .white-shadow > fieldset.cal-legend + .m-v-2 {
      page-break-before: auto !important;
      break-before: auto !important;
    }

    /* Trim the top margin for the first printed page in FF landscape */
    @page { margin: 0.35in 0.5in; }
    @page :first { margin-top: 0.25in; }

    /* Keep overflow visible to avoid clipping */
    .stretch, .container, .white-shadow, .m-v-2,
    #calendar, #calendar .fc, #calendar .fc-view-harness,
    #calendar .fc-view-harness-active, #calendar .fc-scroller {
      overflow: visible !important;
    }
  }
}
/* ====================== END MERGE PATCH v8 ====================== */


/* ====================== BEGIN MERGE PATCH v9 (Firefox landscape: keep title + grid together) ====================== */
@-moz-document url-prefix() {
  @media print and (orientation: landscape) {

    /* Make sure the toolbar doesn't push the grid to the next page */
    #calendar .fc-header-toolbar,
    #calendar .fc-toolbar {
      padding-top: 0.15in !important;   /* smaller than v8 */
      margin-bottom: 0.1in !important;
      break-after: avoid-page !important;
      page-break-after: avoid !important;
    }

    /* Absolutely forbid a break between the toolbar and the view harness */
    #calendar .fc-header-toolbar + .fc-view-harness,
    #calendar .fc-toolbar + .fc-view-harness {
      break-before: avoid-page !important;
      page-break-before: avoid !important;
      margin-top: 0 !important;
    }

    /* Keep the entire harness on the same page when possible */
    #calendar .fc-view-harness,
    #calendar .fc-view-harness-active {
      break-inside: avoid !important;
      page-break-inside: avoid !important;
      overflow: visible !important;
    }

    /* Ensure all ancestors allow overflow in FF */
    .stretch, .container, .white-shadow, .m-v-2,
    #calendar, #calendar .fc, #calendar .fc-scroller {
      overflow: visible !important;
    }
  }
}
/* ====================== END MERGE PATCH v9 ====================== */


/* ====================== BEGIN MERGE PATCH v10 (Firefox landscape: reduce overall print scale) ====================== */
@-moz-document url-prefix() {
  @media print and (orientation: landscape) {

    /* Slightly smaller overall calendar typography to fit title + grid on one page */
    #calendar {
      font-size: 10.5pt !important;  /* was 11pt in general rules */
    }

    /* Tighten header and grid vertical rhythm */
    #calendar .fc-header-toolbar,
    #calendar .fc-toolbar {
      padding-top: 0.12in !important;   /* down from 0.15in */
      margin-bottom: 0.08in !important;
    }

    /* Compact column headers and day numbers */
    #calendar .fc-col-header-cell-cushion { padding: 3px 0 !important; }
    #calendar .fc-daygrid-day-top { padding: 2px 4px !important; }
    #calendar .fc-daygrid-day-number { font-size: 0.95em !important; }

    /* Compact event rendering */
    #calendar .fc-daygrid-event {
      font-size: 0.92em !important;
      line-height: 1.15 !important;
      margin: 1px 2px !important;
      padding: 1px 2px !important;
    }

    /* Slightly slimmer cell padding for the grid frame */
    #calendar .fc-daygrid-day-frame {
      padding: 2px !important;
    }

    /* Keep everything together; no breaks introduced by compaction */
    #calendar .fc-header-toolbar + .fc-view-harness,
    #calendar .fc-toolbar + .fc-view-harness {
      break-before: avoid-page !important;
      page-break-before: avoid !important;
      margin-top: 0 !important;
    }
    #calendar .fc-view-harness { break-inside: avoid !important; page-break-inside: avoid !important; }
  }
}
/* ====================== END MERGE PATCH v10 ====================== */
