/*
    Use this stylesheet to modify the layout of your
    conference.
*/

/* ----------- Styles for the conference header ----------- */

/*
The wrapper of the whole conference page.
*/
.conf {
  width: 100%;
  border: none;
  margin: auto;
}

/*
Wraps around the upper part of the conference header.
*/
.confTitleBox {
  color: white;
  min-height: 90px;
  border-top: 3px solid #234173;
  border-bottom: 1px solid #0f4c80;
  background: #23468c;
}

/*
Sets the width of the upper part of the conference header.
Is set to 950px and centered by default.
*/
.confTitle {
  width: 950px;
  margin: 0 auto;
}

/*
The box containing the logo. By the default the logo is placed
on the left of the conference title.
*/
.confLogoBox {
  float: left;
  padding-right: 10px;
}

/*
The style for the title text.
*/
.conference-title-link {
  font-size: 22pt;
  display: block;
  padding: 25px 0;
  color: white;
}

/*
Wrapper around the bottom part of the conference header
*/
.confSubTitleBox {
  background: #f5faff;
  border-bottom: 1px solid #d5e4f1;
  border-top: 1px solid #d5e4f1;
  padding: 0.5rem 0;
}

/*
The content of the lower part of the header. Is by default
centered and has a fixed width.
*/
.confSubTitleContent {
  width: 950px;
  margin: 0 auto;
  font-size: 11pt;
  color: #24425a;
}

/*
Style for links in the lower part of the header
*/
.confSubTitle a {
  font-size: 11pt;
}

/*
Styles for the date and place information.
*/
.datePlace {
  font-size: 12pt;
}

/*
Announcement styles
*/
.simpleTextAnnouncement {
  background: #f5faff url(/images/conf/sprites_blue.png) repeat-x scroll 0 -400px;
  border-top: 1px solid #c2d6e7;
  font-family: Verdana, sans-serif;
  font-weight: bold;
  font-size: 10pt;
  text-align: center;
  color: #0f283d;
  padding: 8px 0;
}

/* ----------- Styles for the main content ----------- */

/*
The wrapper around the menu and the page content.
By default centered with a fix width.
*/
#confSectionsBox {
  width: 950px;
  margin: 0 auto;
  margin-top: 30px;
}

/* ----------- Styles for the menu ----------- */

/* Styles for all menu Items */

/*
Wrapper around the menu
*/
.conf_leftMenu {
  float: left;
  width: 200px;
}

/*
Styles for the menu box
*/
#outer {
  border: 1px solid #ccc;
  background: #f6f6f6;
}

/*
The menu item
*/
#outer li a {
  font-family: verdana, arial, sans-serif;
  font-size: 10pt;
}

/*
The menu item when doing mouseover
*/
#outer li a:hover {
  background: #e0e0e0;
}

/*
A non selected menu item
*/
.menuConfTitle {
  text-align: left;
}

.menuConfTitle a {
  color: #275c86;
  padding: 7px 12px;
}

/*
A selected menu item
*/

.menuConfTitle.selected > a,
.menuConfMiddleCell.selected > a {
  color: #bd891a;
  background: #dadada;
  border-bottom: 1px solid #d0d0d0;
  border-top: 1px solid #d0d0d0;
}

/*
sub menu item
*/
li ul.inner li a {
  padding: 3px 12px 3px 30px;
  background: transparent url(/images/conf/left_menu_bullet.png) scroll no-repeat 15px center;
}

/*
Support box
*/

.support_box {
  background: #f6f6f6;
  border: 1px solid #ccc;
}

.support_box > h3 {
  color: #f3f3f3;
  background: #1a64a0;
}

/* ----------- Styles for the page content ----------- */

/*
Wrapper around the content
*/
.confBodyBox {
  margin-left: 230px;
}

/* Make banner half size */
.confLogoBannerBox {
	width: 50%;
	min-width: 100px;
}

/* Keep the logo (banner or not) to at most 400px wide */
.confLogoBannerBox,
.confLogoBox {
	max-width: 400px;
}
img.confLogo {
	max-width: 100%;
	height: auto;
}
/* Hide Call for Abstracts box on conference overview page 
div.conference-page div.conferenceDetails div.action-box {
  display: none;
}
*/


/* Responsive design - Experimental */
div#confSectionsBox {
	width: clamp(500px, 95%, 950px);
}

@media only screen and (max-width: 550px) {
  body, body * {
  	max-width: 550px;
  	overflow-wrap: normal;
  }
  div#confSectionsBox {
	  width: clamp(0px, 100%, 550px);
  }

  div.confBodyBox {
	  clear: left;
	  margin-inline: 3%;
  }
  
  div.conf_leftMenu {
	  float: unset;
	  width: 95%;
	  margin-left: 2%;
  }

  .flexrow, #move-timetable-entry-dialog .item, #form-group-recipients .recipients-smaller, .conference-page section .header-row, .rule-list .rule, .rule-list .rule .rule-condition, .sortable-list ul li, .sortable-list.two-columns, .categorynav .category-list .spinner-wrapper, .categorynav .category-list .item, .categorynav .category-list .item .button-wrapper, .categorynav .category-list .item.subcategory, .categorynav .category-list .item.subcategory .icon-wrapper, .categorynav .category-list .placeholder, .categorynav .category-list .search-result-info, .item-picker-qbubble .dropdown-container .dropdown-items-container .dropdown-item, table.palette-picker .palette-color .background-box, .i-timeline-item, .list-filter .list-column, .list-filter .list-column > .filter, .list-filter ul.i-dropdown > li, .info-message-box, .message-message-box, .info-message-box .message-box-content, .message-message-box .message-box-content, .highlight-message-box, .highlight-message-box .message-box-content, .success-message-box, .success-message-box .message-box-content, .warning-message-box, .warning-message-box .message-box-content, .error-message-box, .error-message-box .message-box-content, .danger-message-box, .danger-message-box .message-box-content, .i-has-action, .toolbar .group, .banner, .layout-side-menu, .action-box > .section {
	  flex-flow: row wrap;
  }

  div.confSubTitleContent {
    display: block;
    width: 100%;
  }

}




/* The old timetable block styles ("Make timetable blocks great again")
   are replaced by the timetable section at the end of this file. */

/* START CSS for Anonymous Abstract review */
div.reviewing-page div.info-line:has(ul.author-list),
div.reviewing-page div.abstract-authorship-block  {
    display: none !important;
}

div.reviewing-page div.review-summary-content strong,
div.reviewing-page div.i-box-header strong,
div.reviewing-page div.abstract-authorship-label,
div.reviewing-page div.abstract-authorship-list,
div.reviewing-page ul.author-list,
div.reviewing-page .i-box-content.submission-info > .info-line:nth-child(3),
div.reviewing-page .i-box-content.submission-info > .info-line:nth-child(4) {
    display: none !important;
}

/* Remove avatar for submitter*/
div.reviewing-page div.i-timeline div.avatar-div img {
    visibility: hidden !important;
}

/* END CSS for Anonymous Abstract review */


/* ======================== Timetable ======================== */

/*
 * Readable conference timetable -- custom stylesheet for Indico 3.3.
 * Upload under Management > Layout > Custom CSS, and switch on
 * "Use custom CSS" and "Show detailed view".
 *
 * Keeps the timetable a timetable: times run down the left, and entries
 * that happen at the same time sit side by side. Indico draws it 710px wide
 * whatever the screen, so with many parallel talks each column is a few
 * pixels wide. This stretches the drawing sideways (and a little
 * downwards), shrinks each entry's text back to its normal size, and lets
 * the timetable scroll sideways inside its own box, with the hour labels
 * pinned on the left. Every rule is scoped to the timetable page (and to
 * its full-screen mode, which replaces the page with the bare timetable),
 * so the other conference pages keep their usual look.
 *
 * Phones: Indico's conference pages have no viewport tag, so phones lay
 * them out about 980px wide and shrink them. The phone rules switch on by
 * device, not by window width, and use bigger sizes to survive that shrink.
 */

body:has(#timetable_canvas) {
  --tt-u: 13px;                  /* entry text size */
  /* Sideways stretch. Indico draws the whole timetable 710px wide, so a
     day with 50 parallel talks gets 13px columns; 11.5 makes those 150px.
     Days with fewer parallel talks get wider columns. Tune to the busiest
     day: 150 / (its narrowest column's width in px). */
  --tt-sx: 11.5;
  --tt-sy: 2.5;                  /* vertical stretch: <1% of entries clipped */
  --tt-box: 78vh;                /* height of the scrolling timetable box */
  --tt-gutter: 55px;             /* room on the left for the hour labels */
  --tt-text-max: 36em;           /* widest an entry's text runs */
  --tt-drawn: 710px;             /* width Indico draws the timetable at */
  --tt-ink: #1f2933;
  --tt-muted: #52606d;
  --tt-line: rgba(15, 23, 42, 0.14);
  --tt-accent: #1a64a0;
  --tt-glow: rgba(26, 140, 255, 0.85);  /* outline of an entry under the pointer */
  --tt-surface: #ffffff;
  --tt-page: #f4f6f8;
  --tt-radius: 10px;
  /* Location line on each entry. Off, because without rooms on the
     sessions it only repeats the venue name. Set rooms on the sessions,
     then change this to "block" to show them. */
  --tt-location: none;
  background: var(--tt-page);
}

/* ---------- Page frame: give the timetable the room it needs ---------- */

body:has(#timetable_canvas) .confTitle,
body:has(#timetable_canvas) .confSubTitleContent,
body:has(#timetable_canvas) #confSectionsBox {
  width: auto;
  max-width: none;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

body:has(#timetable_canvas) .conf_leftMenu {
  width: 190px;
}

body:has(#timetable_canvas) .confBodyBox {
  margin-left: 214px;
}

/* Themes that cap element widths on small screens must not clip the grid */
:is(#timetable, body:has(> #timetable_canvas)),
:is(#timetable, body:has(> #timetable_canvas)) * {
  max-width: none;
}

/* ---------- The timetable widget ---------- */

/* Wrappers that the script fixes at 710px wide: let them fill the page */
:is(#timetable, body:has(> #timetable_canvas)),
:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs,
:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-panel,
:is(#timetable, body:has(> #timetable_canvas)) div:has(#timetable_canvas),
#timetable_canvas {
  width: auto !important;
}

:is(#timetable, body:has(> #timetable_canvas)),
:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs,
:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-panel {
  height: auto !important;
  min-height: 0 !important;
}

:is(#timetable, body:has(> #timetable_canvas)) {
  color: var(--tt-ink);
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs,
:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-panel {
  border: 0;
  background: transparent;
  padding: 0;
}

/* Day tabs: wrap as pills instead of a scrolling strip */
:is(#timetable, body:has(> #timetable_canvas)) .tab-scroll-button {
  display: none !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs > div:has(> .ui-tabs-nav) {
  white-space: normal !important;
  overflow: visible !important;
  width: auto !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin: 0 0 0.75em !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  font-size: 14px;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav::before,
:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav::after {
  display: none;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav li {
  display: block !important;     /* the script hides tabs it thinks won't fit */
  float: none !important;
  margin: 0 !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: 999px !important;
  background: var(--tt-surface) !important;
  white-space: nowrap;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav li a {
  display: block;
  padding: 0.45em 1em !important;
  font-size: 1em;
  font-weight: 600;
  color: var(--tt-ink) !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav li.ui-tabs-active {
  background: var(--tt-accent) !important;
  border-color: var(--tt-accent) !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav li.ui-tabs-active a {
  color: #fff !important;
}

/* Print / PDF / Full screen / Detailed view / Filter */
:is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4em;
  float: none !important;
  position: static !important;
  margin: 0 0 1em !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-size: 14px;
}

:is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons button {
  margin: 0 !important;
  padding: 0.4em 0.9em !important;
  font-size: 0.9em !important;
  line-height: 1.3;
  color: var(--tt-accent) !important;
  background: var(--tt-surface) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer;
}

:is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons button:hover,
:is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons button:focus-visible {
  border-color: var(--tt-accent) !important;
}

/* Session colour legend: a wrapping row of chips, in the flow */
:is(#timetable, body:has(> #timetable_canvas)) #wholeLegend {
  position: relative;
  margin: 0 0 1em;
  font-size: 14px;
}

:is(#timetable, body:has(> #timetable_canvas)) #legendMainToggle {
  position: static !important;
  display: inline-block;
  padding: 0.35em 0.8em;
  font-size: 0.85em;
  color: var(--tt-accent);
  background: var(--tt-surface);
  border: 1px solid var(--tt-line);
  border-radius: 6px;
  cursor: pointer;
}

:is(#timetable, body:has(> #timetable_canvas)) #legendMainToggle.active {
  display: none;
}

:is(#timetable, body:has(> #timetable_canvas)) .timeTableLegend {
  position: relative !important;
  inset: auto !important;
  width: auto !important;
  padding: 0.6em 2.4em 0.6em 0.8em !important;
  background: var(--tt-surface) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius) !important;
  box-shadow: none !important;
  font-size: 0.85em;
}

:is(#timetable, body:has(> #timetable_canvas)) #legendItemContainer,
:is(#timetable, body:has(> #timetable_canvas)) #legendItemContainer > div {
  width: auto !important;
  height: auto !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

:is(#timetable, body:has(> #timetable_canvas)) #legendItemContainer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em 1em;
}

:is(#timetable, body:has(> #timetable_canvas)) .legendItem {
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  height: auto !important;
  max-width: none !important;
  overflow: visible !important;
  line-height: 1.3 !important;
  align-items: center;
  gap: 0.45em;
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .legendItem:not([style*="none"]) {
  display: inline-flex !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .legendItem span {
  display: inline !important;
  width: auto !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  float: none !important;
  white-space: nowrap;
}

:is(#timetable, body:has(> #timetable_canvas)) .timeTableItemColour {
  flex: none;
  float: none !important;
  width: 0.9em !important;
  height: 0.9em !important;
  margin: 0 !important;
  border-radius: 3px;
  border: 1px solid var(--tt-line);
}

:is(#timetable, body:has(> #timetable_canvas)) .legendCloseButton {
  position: absolute !important;
  top: 0.6em !important;
  right: 0.6em !important;
  left: auto !important;
  margin: 0 !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .showMoreLink {
  position: static !important;
  display: inline-block;
  margin: 0.35em 0 0;
  font-size: 0.85em;
  color: var(--tt-accent);
  cursor: pointer;
}

/* Day headings in "All days" */
:is(#timetable, body:has(> #timetable_canvas)) .timetableHeader {
  margin: 1.5em 0 0.5em !important;
  padding: 0.4em 0 !important;
  width: auto !important;
  font-size: 18px !important;
  font-weight: 700;
  text-align: left !important;
  color: var(--tt-ink) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid var(--tt-accent) !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableHeader:first-child {
  margin-top: 0 !important;
}

/* ---------- The time grid ---------- */

/*
 * The scrolling box. Scroll down for later times, sideways for more
 * parallel talks; the page itself keeps its own scroll.
 */
#timetable_canvas {
  height: var(--tt-box) !important;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--tt-surface);
  border: 1px solid var(--tt-line);
  border-radius: var(--tt-radius);
}

/*
 * The stretch is a fixed setting (--tt-sx, at the top), not measured from
 * the page: rules that read the entries' widths make the browser re-check
 * them every time Indico adds an entry, and slowed drawing a busy day
 * several-fold.
 */

/* Full screen: Indico swaps the page for the bare timetable, drawn as wide
   as the window less 50px, so it needs about half the stretch */
body:has(> #timetable_canvas) {
  --tt-drawn: calc(100vw - 50px);
  --tt-sx: 6;
}

body:has(> #timetable_canvas) .timetableFullScreenHeader {
  width: auto !important;
  margin: 0 0 0.75em;
  font-size: 18px;
  font-weight: 700;
  color: var(--tt-ink);
}

/* "All days" stacks the days in boxes whose heights Indico fixes for the
   unstretched drawing; stretched downwards, each day would spill into the
   next. So no vertical stretch there (hover still shows a whole entry). */
:is(#timetable, body:has(> #timetable_canvas)) .timetableHeader + div {
  --tt-sy: 1;
}

/* Hour rows: lines across the full stretched width. Drawn over the
   entries so the pinned labels stay visible, but they never catch a click */
:is(#timetable, body:has(> #timetable_canvas)) #timetable_grid {
  z-index: 1;
  transform: scaleY(var(--tt-sy));
  transform-origin: 0 0;
  pointer-events: none;
}

:is(#timetable, body:has(> #timetable_canvas)) .hourLine {
  width: calc(var(--tt-gutter) + (var(--tt-drawn) - 55px) * var(--tt-sx)) !important;
  font-size: 0 !important;       /* the label is redrawn below, unstretched */
  color: var(--tt-muted) !important;
  border-top: 1px solid var(--tt-line) !important;
  background: transparent !important;
}

/* Hour labels: pinned to the left edge while the grid scrolls sideways */
:is(#timetable, body:has(> #timetable_canvas)) .hourLine::before {
  position: sticky;
  left: 0;
  z-index: 30;
  display: inline-block;
  vertical-align: top;
  width: calc(var(--tt-gutter) - 5px);
  height: calc(100% * var(--tt-sy));   /* a solid column, the hour's full height */
  padding: 3px 0 3px 6px;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  color: var(--tt-ink);
  background: var(--tt-surface);
  box-shadow: 1px 0 0 var(--tt-line);
  transform: scaleY(calc(1 / var(--tt-sy)));
  transform-origin: 0 0;
}

:is(#timetable, body:has(> #timetable_canvas)) #hourLine_0::before { content: "00:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_1::before { content: "01:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_2::before { content: "02:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_3::before { content: "03:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_4::before { content: "04:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_5::before { content: "05:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_6::before { content: "06:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_7::before { content: "07:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_8::before { content: "08:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_9::before { content: "09:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_10::before { content: "10:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_11::before { content: "11:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_12::before { content: "12:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_13::before { content: "13:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_14::before { content: "14:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_15::before { content: "15:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_16::before { content: "16:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_17::before { content: "17:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_18::before { content: "18:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_19::before { content: "19:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_20::before { content: "20:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_21::before { content: "21:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_22::before { content: "22:00"; }
:is(#timetable, body:has(> #timetable_canvas)) #hourLine_23::before { content: "23:00"; }

/* The entries' layer: stretched to match. Indico leaves 55px for labels,
   which the stretch would widen too; shift it back to the gutter's width */
:is(#timetable, body:has(> #timetable_canvas)) div:has(> .timetableBlock) {
  width: var(--tt-drawn) !important;   /* else its empty width is stretched too */
  transform: translateX(calc(var(--tt-gutter) - 55px * var(--tt-sx))) scale(var(--tt-sx), var(--tt-sy));
  transform-origin: 0 0;
}

/* ---------- One entry ---------- */

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlock {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  cursor: pointer;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlock > span:empty {
  display: none;
}

/* The content is laid out at the stretched size, then shrunk back, so its
   text is the normal size and wraps to the column's real width. It also
   spans 2 of the 3px Indico leaves between columns, which the stretch
   would otherwise turn into a wide gap. */
:is(#timetable, body:has(> #timetable_canvas)) .timetableBlock .entry-content {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  gap: 0.3em;
  width: calc((100% + 2px) * var(--tt-sx)) !important;
  height: calc(100% * var(--tt-sy)) !important;
  padding: 0.45em 0.55em;
  box-sizing: border-box;
  max-width: var(--tt-text-max); /* keeps a full-width entry's text in view */
  overflow: hidden;
  font-size: var(--tt-u);
  background: inherit;
  transform: scale(calc(1 / var(--tt-sx)), calc(1 / var(--tt-sy)));
  transform-origin: 0 0;
}

/* Pointing at (or tabbing to) an entry shows all of its text */
:is(#timetable, body:has(> #timetable_canvas)) .timetableBlock:is(:hover, :focus-within) {
  z-index: 20;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlock:is(:hover, :focus-within) .entry-content {
  height: auto !important;
  min-height: calc(100% * var(--tt-sy));
  /* A glowing outline, so an expanded entry stands clear of its neighbours */
  outline: 2px solid var(--tt-glow);
  outline-offset: 0;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 0 14px 6px var(--tt-glow), 0 8px 22px rgba(15, 23, 42, 0.35);
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockWrapper {
  display: flex !important;
  flex-direction: column;
  gap: 0.2em;
  margin: 0 !important;
  white-space: normal !important;
  overflow: visible !important;
}

/* Time first, then title, then presenters, then location */
:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockWrapper:has(.timetableBlockTime) {
  order: -1;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockTime {
  order: -1;
  font-size: 0.85em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
  white-space: nowrap;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockTitle {
  order: -1;
  font-size: 1em !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: break-word;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockPresenters,
:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockConvener {
  float: none !important;
  max-width: none !important;
  font-style: normal;
  font-size: 0.9em;
  line-height: 1.3;
  opacity: 0.85;
  white-space: normal !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockLocation {
  display: var(--tt-location);
  font-size: 0.85em;
  opacity: 0.85;
  white-space: normal !important;
}

:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockLocation:empty,
:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockPresenters:empty,
:is(#timetable, body:has(> #timetable_canvas)) .timetableBlockConvener:empty {
  display: none;
}

/* ---------- Phones ---------- */

@media (max-width: 640px), (hover: none) and (pointer: coarse) and (max-device-width: 640px) {
  body:has(#timetable_canvas) {
    --tt-u: 30px;
    --tt-sx: 25;
    --tt-sy: 5.6;
    --tt-box: 82vh;
    --tt-gutter: 120px;
    --tt-text-max: 27em;
  }

  body:has(#timetable_canvas) .confTitle,
  body:has(#timetable_canvas) .confSubTitleContent,
  body:has(#timetable_canvas) #confSectionsBox {
    padding-left: 4vw;
    padding-right: 4vw;
  }

  body:has(#timetable_canvas) .confTitle h1 {
    font-size: 6.4vw !important;
    line-height: 1.2;
  }

  body:has(#timetable_canvas) .confSubTitleContent {
    font-size: 4vw;
  }

  body:has(#timetable_canvas) #event-search-box {
    display: none;
  }

  /* Top bar: let its timezone / language / login group wrap */
  body:has(#timetable_canvas) .main-action-bar,
  body:has(#timetable_canvas) #session-bar,
  body:has(#timetable_canvas) #session-bar .toolbar {
    display: flex;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
  }

  /* Menu: a wrapping row of links above the timetable */
  body:has(#timetable_canvas) .conf_leftMenu {
    float: none;
    width: auto;
    margin: 0 0 3vw;
    font-size: 4vw;
  }

  body:has(#timetable_canvas) .conf_leftMenu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    border: 0;
    background: transparent;
  }

  body:has(#timetable_canvas) .conf_leftMenu li {
    border: 1px solid var(--tt-line) !important;
    border-radius: 999px;
    background: var(--tt-surface);
  }

  body:has(#timetable_canvas) .conf_leftMenu li a {
    display: block;
    padding: 0.45em 0.9em !important;
    font-size: 0.9em !important;
  }

  body:has(#timetable_canvas) .confBodyBox {
    margin-left: 0;
  }

  body:has(#timetable_canvas) .conference-page > header h2 {
    font-size: 5.6vw !important;
  }

  :is(#timetable, body:has(> #timetable_canvas)) .ui-tabs-nav,
  :is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons,
  :is(#timetable, body:has(> #timetable_canvas)) #wholeLegend {
    font-size: 3.4vw;
  }

  :is(#timetable, body:has(> #timetable_canvas)) .timetableHeader {
    font-size: 5vw !important;
  }

  /* Print, PDF and Full screen are of little use on a phone */
  :is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons .printButtonWhite,
  :is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons button:nth-child(2),
  :is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons button:nth-child(3) {
    display: none !important;
  }

  :is(#timetable, body:has(> #timetable_canvas)) .tabExtraButtons {
    justify-content: flex-start;
  }

  /* Wider label gutter to fit the bigger labels */
  :is(#timetable, body:has(> #timetable_canvas)) .hourLine::before {
    padding: 6px 0 6px 10px;
    font-size: 28px;
  }

  /* The pop-up for an entry: a panel along the bottom of the screen */
  body:has(#timetable_canvas) .qtip.balloon-qtip {
    position: fixed !important;
    inset: auto 3vw 3vw 3vw !important;
    width: auto !important;
    max-width: none !important;
    max-height: 75vh;
    overflow: auto;
    font-size: 4vw !important;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.35);
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .qtip-tip {
    display: none !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .qtip-content,
  body:has(#timetable_canvas) .qtip.balloon-qtip .qtip-content * {
    font-size: inherit !important;
    line-height: 1.4 !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .qtip-content {
    padding: 0.9em 1em !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .title {
    font-size: 1.15em !important;
    font-weight: 700;
  }

  /* A few lines of the abstract; tapping it opens the contribution page */
  body:has(#timetable_canvas) .qtip.balloon-qtip .description {
    max-height: 6.5em !important;
    margin: 0.4em 0 0.2em;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .description::before {
    background: linear-gradient(transparent 55%, #fff) !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip :is(.balloon, .row, .expand, .title, .description, .i-data-list) {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .title-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75em;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .title {
    flex: 1;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .i-data-list {
    display: grid !important;
    grid-template-columns: auto 1fr;
    gap: 0.35em 0.8em;
    margin: 0.6em 0 !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .i-data-list :is(dt, dd) {
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body:has(#timetable_canvas) .qtip.balloon-qtip .i-data-list dt {
    font-weight: 600;
    color: var(--tt-muted);
  }

  /* Filter bar along the bottom */
  body:has(#timetable_canvas) .timetableFilter {
    left: 3vw !important;
    right: 3vw !important;
    width: auto !important;
    font-size: 3.4vw !important;
  }

  body:has(#timetable_canvas) .timetableFilter * {
    font-size: inherit !important;
  }

  body:has(#timetable_canvas) .timetableFilter td {
    width: auto !important;
    padding: 0.5em 0.6em !important;
  }

  /* The filter's Sessions / Rooms checkbox lists */
  body:has(#timetable_canvas) div:has(> .popupListCheckboxes) {
    left: 3vw !important;
    right: 3vw !important;
  }

  body:has(#timetable_canvas) .popupListCheckboxes {
    max-height: 55vh !important;
    font-size: 3.6vw;
  }

  body:has(#timetable_canvas) .popupListCheckboxes li {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.45em 0.6em !important;
  }

  body:has(#timetable_canvas) .popupListCheckboxes input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    margin: 0;
  }
}

/* ---------- Print: back to Indico's own layout ---------- */

@media print {
  body {
    --tt-sx: 1 !important;
  }

  #timetable_canvas {
    height: auto !important;
    overflow: visible;
  }
}