@keyframes blink-animation {
  0% { opacity: 1; }
  50% { opacity: 0; } /* Diventa invisibile */
  100% { opacity: 1; }
}
  
h1:has(> div) {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1ch;
  align-items: baseline;
}

.programme {
  background-image: url(assets/shared/tile-bulbs.jpg);
  background-size: 250px;
}

.grid-container--programme {
  background-image: url(assets/home/background-home-mobile.jpg);
  background-size: 100%;
  background-position: 25%;
  padding-top: 8rem;
  width: 100%;
  height: 415px;
}

@media (min-width: 35rem) {
  .grid-container--programme {
    background-image: url(assets/home/background-home-tablet.jpg);
  }
}

@media (min-width: 60em) {
  .grid-container--programme {
    background-image: url(assets/home/background-home-desktop.jpg);
    align-items: center;
  }
  .grid-container--programme > :first-child {
    grid-column: 2;
  }
  .grid-container--programme > :last-child {
    grid-column: 3;
  }
}

.info-box {
    padding-bottom: 0.5rem;
}

.programme-tabs {
  margin-top: 1.5rem;
}

.programme-tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 3;
}

.programme-tab,
.programme-action {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0c0e18;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.programme-print-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.programme-bw-toggle {
  display: none;
  align-items: center;
}

.print-icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

.programme-print-intro {
  display: none;
  padding: 0.5rem 0 1rem;
}

.programme-print-subtitle {
  margin-top: 0.35rem;
  font-weight: 700;
  color: #333;
}

.programme-tab:focus-visible,
.programme-action:focus-visible {
  outline: 2px solid var(--strong-color, rgb(178, 15, 15));
  outline-offset: 2px;
}

.programme-tab.is-active,
.programme-action.is-active {
  background: var(--strong-color, rgb(178, 15, 15));
  color: white;
  border-color: var(--strong-color, rgb(178, 15, 15));
}

.programme-tab .label-short,
.programme-action .label-short {
  display: none;
}

.programme-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  
  border-color: var(--strong-color, rgb(178, 15, 15));
  border-top: 2px solid var(--strong-color, rgb(178, 15, 15));
  box-shadow: 0 0 15px var(--strong-color, rgb(178, 15, 15));
  color: var(--strong-color, rgb(178, 15, 15));
}

.programme-action .label-long,
.programme-action .label-short {
  animation: blink-animation 1s linear infinite;
}

.programme-action.is-hidden {
  display: none;
}

@media (max-width: 40rem) {
  .programme-tab .label-long,
  .programme-action .label-long {
    display: none;
  }
  .programme-tab .label-short,
  .programme-action .label-short {
    display: inline;
  }
}

.programme-tabpanel {
  display: none;
}

.programme-tabpanel.is-active {
  display: block;
}

/* ---- Printable layout ---- */

.printable {
  background: white;
}

.printable .grid-container--programme,
.printable .site-header,
.printable .site-footer {
  display: none;
}

.printable .programme-tablist {
  display: flex;
  justify-content: flex-end;
}

.printable .programme-tablist .programme-tab {
  display: none;
}

.printable .programme-tablist .programme-print-toggle,
.printable .programme-tablist .programme-bw-toggle {
  display: inline-flex;
}

.printable .programme-action {
  display: none;
}

.printable .programme-print-intro {
  display: block;
}

.printable .programme-tabpanel {
  display: block;
}

.printable .programme-tabpanel[hidden] {
  display: block;
}

.printable .programme-tabs {
  margin-top: 0;
}

.printable .activity-box,
.printable .talk-box {
  page-break-inside: avoid;
  break-inside: avoid;
  box-shadow: none;
  border-radius: 0;
}

.printable {
  font-size: 0.92rem;
  background: white;
}

.printable .info-container--programme {
  padding: 1rem;
}

.printable .activity-box {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  gap: 0.25rem;
  border-color: rgba(0, 0, 0, 0.2);
  display: block;
}


.printable .activity-meta {
  gap: 0.5rem;
  font-size: 0.9rem;
}

.printable .activity-title {
  font-size: 1rem;
}

.printable .session-talks__list,
.printable .roundtable-discussants__list {
  margin-top: 0.25rem;
  padding-left: 1rem;
  padding-right: 0.25rem;
}

.printable .talk-box {
  padding: 0.4rem 0.75rem;
  margin-bottom: 0.4rem;
  background: transparent;
  border-color: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.printable .talk-meta {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  width: auto;
  order: 1;
  flex: 1 1 auto;
}

.printable .talk-info {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.5rem;
  order: 2;
  flex: 0 0 auto;
}

.printable .talk-type,
.printable .talk-time {
  padding-top: 0;
}

.printable .talk-box .talk-title {
  width: 100%;
  border-top: none;
  border-left: none;
  border-right: none;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  order: 3;
  font-style: italic;
}

.printable .talk-box .talk-title::before,
.printable .talk-box .talk-title::after {
  content: none;
}

.printable #tab-monday,
.printable #tab-tuesday {
  break-after: page;
  page-break-after: always;
}

.printable #talks {
  break-before: page;
  page-break-before: always;
}

.printable .activity-box {
  flex-wrap: wrap;
  align-items: flex-start;
}

.printable .activity-meta {
  display: inline-flex;
  margin-right: 0.5rem;
}

.printable .activity-title {
  display: inline;
  margin-right: 0.35rem;
  white-space: normal;
}

.printable .activity-extra {
  display: inline;
}

.printable details.session-talks,
.printable details.roundtable-discussants {
  display: inline;
}

.printable details.session-talks > summary,
.printable details.roundtable-discussants > summary {
  margin-left: 0;
}

.printable details.session-talks > .session-talks__list,
.printable details.roundtable-discussants > .roundtable-discussants__list {
  display: block;
  width: 100%;
}

.printable details.session-talks,
.printable details.roundtable-discussants {
  display: contents;
}

.printable details.session-talks > summary,
.printable details.roundtable-discussants > summary {
  display: inline;
  margin-left: 0.5rem;
  border: none;
  background: transparent;
  padding: 0;
  min-width: 0;
  font-weight: 400;
  color: inherit;
}

.printable .session-talks__toggle::before,
.printable .roundtable-discussants__toggle::before {
  content: none !important;
  position: static;
  left: auto;
  top: auto;
  transform: none;
}

.printable .session-talks[open] .session-talks__toggle::before,
.printable .roundtable-discussants[open] .roundtable-discussants__toggle::before {
  content: none !important;
}

.printable .session-talks__list,
.printable .roundtable-discussants__list {
  width: 100%;
  flex-basis: 100%;
  flex: 0 0 100%;
  display: block;
  margin-top: 0.35rem;
}


.printable .session-talks__toggle,
.printable .roundtable-discussants__toggle {
  border-color: #666;
  background: #f0f0f0;
}

.printable .talk-title-link {
  color: inherit;
}

.printable {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.printable.black-and-white .activity--registration,
.printable.black-and-white .activity--coffee,
.printable.black-and-white .activity--lunch,
.printable.black-and-white .activity--other {
  background: #f0f0f0;
  border-color: #b5b5b5;
}

.printable.black-and-white .activity--session {
  background: #e6e6e6;
  border-color: #9f9f9f;
}

.printable.black-and-white .activity--session-long {
  background: #dddddd;
  border-color: #8f8f8f;
}

.printable.black-and-white .activity--session-short {
  background: #f5f5f5;
  border-color: #bdbdbd;
}

.printable.black-and-white .activity--special {
  background: white;
  border-color: #333;
}

.printable.black-and-white .activity-meta,
.printable.black-and-white .activity-room,
.printable.black-and-white .activity-duration,
.printable.black-and-white .talk-type,
.printable.black-and-white .talk-time,
.printable.black-and-white .talk-discussant,
.printable.black-and-white .chair .chair-name,
.printable.black-and-white .discussant .discussant-name,
.printable.black-and-white .talk-person .talk-name {
  color: #333;
}

.printable.black-and-white .talk-box .talk-title {
  border-color: rgba(0, 0, 0, 0.25);
}

@media print {
  body {
    background: white;
  }

  #main-header,
  .site-header,
  .site-footer,
  .programme-tablist,
  .programme-action {
    display: none !important;
  }

  .programme-print-intro {
    display: block !important;
  }

  .programme-tabpanel,
  .programme-tabpanel[hidden] {
    display: block !important;
  }

  .programme-tabs {
    margin-top: 0;
  }

  .activity-box,
  .talk-box {
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none;
  }

  .activity-box {
    display: block !important;
  }

  .activity-meta {
    display: inline-flex !important;
  }

  .activity-title {
    display: inline !important;
  }

  .activity-extra {
    display: inline !important;
  }

  body {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.hide-on-print {
  display: block;
}

.only-on-print {
  display: none;
}

.printable .hide-on-print {
  display: none !important;
}

.printable .only-on-print {
  display: block !important;
}

@media print {
  .hide-on-print {
    display: none !important;
  }

  .only-on-print {
    display: block !important;
  }
}


.activity-box {
  border-top: 1px solid hsla(0, 0%, 100%, 0.1);
  background-color: white;
  border-radius: 15px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.now.activity-box {
  border-color: var(--strong-color, rgb(178, 15, 15));
  border-top: 2px solid var(--strong-color, rgb(178, 15, 15));
  box-shadow: 0 0 15px var(--strong-color, rgb(178, 15, 15));
}

.activity-meta {
  display: flex;
  gap: 0.75rem;
  font-weight: 700;
  color: #555d50;
}

.activity-time {
  display: flex;
  gap: 0;
}

.activity-start-time {
  display: inline-block;
}

.activity-end-time {
  display: inline-block;
  min-width: 5ch;
}

.activity-end-time::before {
  content: "\a0-\a0";
}

.activity-duration {
  font-weight: 400;
  color: #333;
}

.activity-duration--empty {
  visibility: hidden;
  min-width: 7ch;
}

.activity-end-time--empty {
  visibility: hidden;
}

.activity-end-time--empty::before {
  content: "";
}

.activity-room {
  font-weight: 400;
  color: #333;
}

.activity-room--empty {
  visibility: hidden;
  display: inline-block;
  min-width: 9ch;
}

.activity-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.activity-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.activity-social-location {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  white-space: normal;
}

.activity-social-restaurant {
  color: var(--strong-color, rgb(178, 15, 15));
}

.activity-social-address {
  font-style: italic;
}

.activity-extra {
  display: flex;
  gap: 1rem;
  color: #333;
  font-size: 0.95rem;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.session-talks {
  margin: 0;
}

.roundtable-discussants__toggle,
.session-talks__toggle {
  cursor: pointer;
  list-style: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
  padding: 0.15rem 0.6rem 0.15rem 1.6rem;
  position: relative;
  background: #f5f5f5;
  min-width: 9.5rem;
}

.roundtable-discussants__toggle::-webkit-details-marker,
.session-talks__toggle::-webkit-details-marker {
  display: none;
}

.roundtable-discussants__toggle::before,
.session-talks__toggle::before {
  content: "\a0+\a0\a0";
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
}

.roundtable-discussants[open] .roundtable-discussants__toggle::before,
.session-talks[open] .session-talks__toggle::before {
  content: "\a0-\a0\a0";
}

.roundtable-discussants__list,
.session-talks__list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  padding-right: 0.5rem;
  color: #333;
  white-space: normal;
  background-color: white;
  border-radius: 9px;
}

.activity--registration,
.activity--coffee,
.activity--lunch,
.activity--other
{
  background: #e1f0ff;
  border-color: #99c5f5;
}

.activity--session {
  background: #e1f3e8;
  border-color: #8bbf9f;
}

.activity--session .activity-title::before {
  content: "Session: ";
}

.activity--session.activity--session-contributed .activity-title::before {
  content: "Contrib. Session: ";
}

.activity--session-long {
  background: #d1e7d8;
  border-color: #5fa174;
}

.activity--session-short {
  background: #e8f8ee;
  border-color: #a6d4b6;
}

.activity--special {
  background: white;
  border-color: #333;;
}

.daily_location { 
  font-size: medium;
  display: inline-block;
  margin-bottom: 4px;
}

.daily_location .location {
  text-decoration: none;
  white-space: nowrap;
  background-color: white;
  font-size: x-large;
  border-radius: 12px;
  padding: 0.6rem;
  margin-left: 1ch;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0c0e18;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}


@media (min-width: 60em) {
  .activity-box {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .activity-meta {
    flex-direction: row;
    align-items: center;
    min-width: 29ch;
  }

  .activity-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .activity-title-group {
    flex: 1;
    min-width: 0;
  }

  .now .activity-title, 
  .now .activity-time {
    color: var(--strong-color, rgb(178, 15, 15));
  }

  .now .activity-time {
    animation: blink-animation 1s linear infinite;
  }

  .session-talks {
    display: inline-block;
  }

  .activity-room {
    min-width: 9ch;
  }
}

/* ---- Talks list ---- */

.talk-box {
  border-top: 1px solid hsla(0, 0%, 100%, 0.1);
  background-color: white;
  border-radius: 15px;
  padding-top: 0.5rem;
  padding-right: 1rem;
  padding-left: 1rem;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;

  display: flex;
  flex-direction: column;
  /*gap: 0.5rem;*/
}

.talk-meta {
  display: flex; 
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  align-items: baseline;
  width: 100%;
}

.talk-discussant {
  color: #555d50;
}

.talk-discussant .discussant-name {
  color: black;
}

.chair .chair-name,
.discussant .discussant-name,
.talk-person .talk-name{
  color: #555D50;
}

.chair .chair-surname,
.discussant .discussant-surname,
.talk-person .talk-surname{
  font-weight: 700;
  color: #0c0e18;
}

.talk-box .talk-person {
  font-weight: 700;
}

.roundtable-discussant .discussant,
.roundtable-discussant .discussant-affiliation,
.talk-item .talk-person {
  display: inline-block;
}

.talk-item .talk-title {
  display: inline-block;
  padding-left: 1ch;
  font-style: italic;
}

.roundtable-discussant .discussant{
  min-width: 9ch;
}

.chair .chair-affiliation,
.discussant .discussant-affiliation{
  display: inline-block;
}

.chair .chair-surname:has(+.chair-affiliation) {
  margin-right: 2ch;
}
.chair .chair-affiliation::before {
  content: "(";
}
.chair .chair-affiliation::after {
  content: ")";
}

.roundtable-discussant .discussant {
  min-width: 15ch;
}

.roundtable-discussant .discussant-affiliation::before {
  padding-left: 2ch;
  padding-right: 1ch;
  content: "-";
}

.talk-person .talk-name,
.talk-person .talk-surname {
  display: inline-block;
}

.chair .chair-name,
.discussant .discussant-name,
.talk-person .talk-name {
  margin-right: 0.25rem;
}

.talk-affiliation {
  font-style: italic;
  padding-right: 0.5rem;
}

.talk-box .talk-title {
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  padding-top: 0.5rem;
  margin-right: auto;
}

.talk-title-link {
  color: inherit;
  text-decoration: none;
}

.talk-title-link:hover,
.talk-title-link:focus-visible {
  text-decoration: underline;
}

.talk-type {
  color: #555d50;
  padding-top: 0.4rem;
  display: inline-block;
}

.talk-time {
  font-weight: 700;
  color: #555d50;
  padding-top: 0.4rem;
  display: inline-block;
}

.talk-time::before {
  content: "\a0-\a0";
}


@media (min-width: 60em) {
  .talk-box {
    flex-direction: row;
    margin-bottom: 0.75rem;
  }
    
  .talk-meta {
    flex: 0 0 30%;
  }
    
  .talk-box .talk-title {
    width: 70%;
    padding-bottom: 0;
    padding-top: 0;
    border-top: none;
    border-left: 1px solid rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(0, 0, 0, 0.15);
    padding-left: 0.5rem;
    padding-right: 10rem;
  }

  .talk-box .talk-title::before {
    content:  "\201C"; /* Left double quotation mark */;
  }

  .talk-box .talk-title::after {
    content: "\201D"; /* Right double quotation mark */;
  }

  .talk-info {
    height: 100%;
    min-width: fit-content;
  }

  .talk-type {
    padding-top: 0;
    text-align: center;
    width: 4ch;
  }

  .talk-time {
    padding-top: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.15);
    text-align: left;
    padding-left: 0.5rem;
    width: 10ch;
  }

  .talk-time::before {
    content: none;
  }
}
