/** agenda **/
:root { 
  --row: 130px; 
  --col: 9 /* amount of columns in the schedule grid  */
}
/* .bar.stream-a { border-color: var(--nerd-red) }
.bar.stream-b { border-color: var(--nerd-blue) }
.bar.workshop-virtual { border-color: var(--nerd-dark-blue) }
.bar.konex-gransala { border-color: var(--nerd-purple) }
.bar.konex-auditorio { border-color: var(--nerd-green) }
.bar.konex-abasto { border-color: var(--nerd-black) }
.bar.konex-container { border-color: var(--nerd-lightgreen) }
.bar.konex-antesala { border-color: var(--nerd-gray) }
.bar.konex-envivo { border-color: var(--nerd-orange) } */

.bar.infrastructure { border-color: var(--nerd-blue) }
.bar.nerd { border-color: var(--nerd-purple) }
.bar.datascience-ai { border-color: var(--nerd-mustard) }
.bar.management { border-color: var(--nerd-lightblue) }
.bar.softskills { border-color: var(--nerd-orange) }
.bar.development { border-color: var(--nerd-red) }
.bar.opensource { border-color: var(--nerd-lightgreen) }
.bar.kids { border-color: var(--nerd-mustard) }
.bar.security { border-color: var(--nerd-dark-blue) }
.bar.ux { border-color: var(--nerd-gray) }
.bar.testing { border-color: var(--nerd-green) }

.agenda {
  background-color: var(--nerd-mustard);
  color: black;
  position: relative;
}
.agenda-wrapper {
  background-color: var(--nerd-yellow);
  border: 1px solid;
  margin: 0 1rem;
  padding: 2rem 0;
}
.agenda-top {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-block-end: 1rem;
  padding: 0 1rem;
}
.agenda h2 {
  flex: 1 1 100%;
  letter-spacing: .06em;
  padding-inline-start: 8rem;
}
.agenda-nav {
  display: flex;
  gap: .5rem;
  flex: 1 1 100%;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  font-size: .9rem;
  gap: 1rem;
  letter-spacing: -0.02em;
  padding-inline-start: 8rem;
  margin-left: auto;
}
.legend span {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: .2rem;
}
.legend span:hover, .legend span.active {
  text-decoration: underline;
}
.legend-tracks a {
  align-items: center;
  color: initial;
  display: inline-flex;
  gap: .3rem;
  justify-content: space-between;
  line-height: 1;
  text-decoration: none;
}
.legend-tracks a:hover {
  text-decoration: underline;
}
.agenda-nav .btn {
  background-color: transparent;
  border: 1px solid black;
  border-radius: 2px;
  color: black;
  font-size: 1.2rem;
  padding: .4rem .8rem;
}
.agenda-nav .btn.active {
  background-color: var(--nerd-orange);
  border-color: var(--nerd-orange);
  color: black;
}

/** agenda grid **/
.agenda-grid {
  border: 1px solid;
  border-width: 0 1px 1px 0;
  display: grid;
  max-height: 80vh;
  margin: 1rem;
  overflow-x: auto;
  text-align: center;
}
.agenda-grid::-webkit-scrollbar {
  width: 1rem;
  height: 1rem;
}
.agenda-grid::-webkit-scrollbar-thumb {
  background: var(--nerd-yellow);
  border: 4px solid #dfa300;
  border-radius: 8px;
}
.agenda-grid::-webkit-scrollbar-track {
  background-color: #dfa300;
  border: 2px solid #dfa300;
}
.agenda-grid::-webkit-scrollbar-button {
  background-color: var(--nerd-yellow);
  border: 1px solid #dfa300;
  border-radius: 2px;
}
.agenda-grid::-webkit-scrollbar-button:hover {
  background-color: var(--nerd-mustard);
}
.agenda-grid::-webkit-scrollbar-corner {
  background-color: #dfa300;
}
.row-wrapper {
  min-height: 460px;
  width: 260%;
}
.row-time {
  background-color: var(--nerd-mustard);
  display: grid;
  font-size: 1.2rem;
  font-weight: 600;
  grid-template-columns: var(--row) repeat(var(--col), 1fr);
  position: sticky;
  top: 0;
  text-align: center;
  width: 260%;
  z-index: 4;
}
.row-time span {
  line-height: 1.2;
  padding: 1rem;
}
.row-time span:not(.first):last-child {
  border-right: 0;
}
.row-time .first {
  background-color: var(--nerd-yellow);
  border: 1px solid;
  border-width: 0 1px 1px 0;
  font-size: 1.4rem;
  line-height: 1;
  position: sticky;
  left: 0;
  text-align: right;
  z-index: 3;
}
.row-time span:not(.first) {
  border: 1px solid;
  border-left: 0;
  position: relative;
}
.row {
  align-items: center;
  border-bottom: 1px solid;
  display: grid;
  grid-template-columns: var(--row) repeat(calc(var(--col) * 12), 1fr);
  grid-template-rows: 1fr auto;
  grid-auto-flow: dense;
  text-align: left;
  position: relative;
}
.row::after {
  background-image: repeating-linear-gradient(to right, black, black 0, transparent 1px, transparent);
  background-size: calc(100% / var(--col));
  content: "";
  height: 100%;
  width: calc(100% - var(--row) - 1px);
  pointer-events: none;
  position: absolute;
  top: 0;
  left: var(--row);
}
.row:last-child {
  border-bottom: 0;
}
.sala {
  align-self: stretch;
  align-items: center;
  border: 1px solid;
  border-width: 0 1px;
  background-color: var(--nerd-lightgreen);
  display: grid;
  font-size: 0.8rem;
  font-weight: 600;
  grid-row: 1 / 5;
  line-height: 1;
  height: 100%;
  padding: .5rem;
  position: sticky;
  left: 0;
  z-index: 3;
}
.bar {
  background-color: white;
  border: 1px solid;
  border-radius: 4px;
  border-left-width: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-size: .9rem;
  gap: .2rem;
  height: 4.5rem;
  line-height: 1;
  letter-spacing: -.02em;
  margin: .1rem;
  min-width: 10px;
  overflow: clip;
  padding: .2rem .3rem .3rem;
  position: relative;
  transition: .2s ease-in;
  z-index: 1;
}
.bar-small-card {
  min-height: 7.5em !important;
}
.bar.bar-hidden {
  display: none;
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% - 3px);
  z-index: 2;
}
.bar:hover + .bar.bar-hidden {
  background-color: #fef7e9;
  display: flex;
  overflow: visible;
  min-width: 240px;
}
.bar-container { position: relative; }
.bar-container > a { color: initial; text-decoration: none; }
.bar-container > a:hover + .bar.bar-hidden { 
  background-color: #fef7e9;
  display: flex;
  overflow: visible;
  min-width: 240px;
}

/* .bar::before {
  background-color: white;
  content: attr(data-title);
  font-weight: 500;
  min-width: 155px;
  padding: .2rem .3rem;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: none;
}
.bar::after {
  content: attr(data-time);
  font-size: 0.75rem;
  font-weight: 400;
  min-width: 155px;
  position: absolute;
  top: 78.5%;
  left: .3rem;
  display: none;
}  */
.bar strong {
  font-weight: 500;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: clip;
}
.bar small {
  font-weight: 400;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  margin-block-start: auto;
  overflow: clip;
}
.dia-group {
  display: none;
}
.dia-group.active {
  display: block;
}
/* Agenda full */
.agenda-full {
  background-color: var(--nerd-mustard);
  color: black;
  position: relative;
}
.agenda-full .agenda-wrapper {
  border-top: 0;
  padding: 2rem;
}
.btn-wrapper {
  margin-block: 2rem;
  text-align: center;
}
.agenda-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.agenda-flex h4 {
  border-bottom: 1px solid;
  margin-block-end: .5rem;
}
.agenda-flex h4 + h4 {
  background-color: var(--nerd-yellow);
  border: 0;
  margin-block-start: -2.16rem;
  position: relative;
}
.agenda-flex .agendra-flex-dia h4:last-child  {
  display: none;
}
.agenda-flex .agendra-flex-dia {
  flex: 1 1 calc(20% - 1rem);
  /* max-width: 600px; */
}
.agenda-flex .agendra-flex-dia h3 {
  background-color: var(--nerd-mustard);
  border: 1px solid;
  border-radius: 4px;
  padding: .5rem;
  text-align: center;
}
.agenda-flex .bar {
  font-size: 1rem;
  height: auto;
  letter-spacing: 0;
  line-height: 1.1;
  margin-block-end: .5rem;
  padding: .5rem;
}
.agenda-flex .bar:hover {
  background-color: #fef7e9;
}
.agenda-flex .bar span {
  color: var(--nerd-dark-blue);
  font-size: .9rem;
}
.agenda-flex .bar strong {
  color: black;
  font-size: 1rem;
  margin-block-end: .2rem;
  -webkit-line-clamp: initial;
  overflow: clip;
}
.agenda-flex .bar small {
  align-items: flex-end;
  display: flex;
  gap: .5rem;
}
.agenda-flex .bar small img {
  border-radius: 50%;
}
.agenda-flex .bar .track {
  background-color: white;
  border: 1px solid var(--nerd-gray);
  border-radius: 4px;
  display: inline-block;
  flex: 0;
  font-weight: 500;
  margin-block-end: .5rem;
  padding: .2rem .2rem .1rem;
}
.agenda-flex .bar .thumbnail {
  display: block;
  margin-block: 0 .5rem;
  max-width: 660px;
}
/* .show {
  align-self: flex-start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid;
  color: var(--nerd-blue);
  cursor: pointer;
  font-size: .9rem;
  font-weight: bold;
  line-height: 1;
  padding: .2rem;
}
.show:hover {
  border-color: transparent;
  color: black;
} */
.agenda-flex .bar .categories {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.agenda-flex .bar .categories span.pill {
  border: 1px solid var(--nerd-yellow);
  border-radius: 1rem;
  color: black;
  padding: .4rem .8rem;
}
.agenda-flex .bar .categories span.pill::before {
  color: var(--nerd-yellow);
  content: "#";
  display: inline-block;
  font-size: 1rem;
  font-weight: bold;
  margin-inline-end: .2rem;
  vertical-align: middle;
}
.btn-agenda {
  align-items: center;
  color: black;
  display: inline-flex;
  justify-content: space-between;
}
#loader {  display: none; }

.btn.close {
  background-color: black;
  border:1px solid black;
  color: white;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 1rem;
  transition: all ease .2s;
}
.btn.close:hover {
  background-color: white;
  color: black;
}
.icon-close {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  outline: 0;
}
.icon-close:hover svg {
  stroke: var(--nerd-blue);
}
dialog[open] {
  opacity: 1;
  transform: scale(1);
  display: block;
}

dialog {
  background: transparent;
  border: 0;
  display: none;
  max-width: 800px;
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 0.2s ease-out,
    transform 0.1s ease-out,
    overlay 0.2s ease-out allow-discrete,
    display 0.2s ease-out allow-discrete;
  width: 90vw;
}

.agenda-flex dialog .bar {
  cursor: auto;
  padding: 2rem;
}
.agenda-flex dialog .bar:hover {
  background-color: white;
}
.agenda-flex dialog .bar p {
  color: var(--nerd-dark-blue);
  line-height: 1.2;
}
.main-schedule-link {
  color: initial;
  font-size: 1.2em;
}
.sponsor-logo-card-expanded {
  border-block-start: 1px solid #CCC;
  margin: 0 auto;
  text-align: center;
  padding-block-start: 1rem;
  width: 100%;
}
.sponsor-logo-card-expanded img {
  margin-block-start: .5rem;
  max-width: 150px;
  max-height: 3rem;
}
.agenda-flex .bar img.sponsor-logo-small-card {
  border-radius: 0;
}
.bar img.sponsor-logo-small-card {
  border-radius: 0;
  position: absolute;
  max-height: 2rem;
  max-width: 4.5rem;
  bottom: .5rem; /* Align to the bottom */
  right: .5rem; /* Align to the right */
}
.agenda-grid .bar img.sponsor-logo-small-card {
  max-height: 1.8rem;
  max-width: 5rem;
  bottom: .3rem;
  right: .3rem;
}
.agenda-grid .bar:has(.sponsor-logo-small-card) small {
  padding-inline-end: 5.5rem;
}


/*   Before-open state  */
/* Needs to be after the previous dialog[open] rule to take effect,
    as the specificity is the same */
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scale(0);
  }
}

/* Transition the :backdrop when the dialog modal is promoted to the top layer */
dialog::backdrop {
  background-color: rgb(0 0 0 / 0%);
  transition:
    display 0.2s allow-discrete,
    overlay 0.2s allow-discrete,
    background-color 0.2s;
  /* Equivalent to
  transition: all 0.7s allow-discrete; */
}

dialog[open]::backdrop {
  background-color: rgb(0 0 0 / 25%);
}

/* This starting-style rule cannot be nested inside the above selector
because the nesting selector cannot represent pseudo-elements. */

@starting-style {
  dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 0%);
  }
}


@media screen and (max-width: 40em) /* 640px */{
  :root { --row: 100px; }
  .legend { padding-inline-start: 0;}
  .agenda h2 {
    font-size: 5rem;
    padding-inline-start: 0;
  }
  .agenda-nav { justify-content: flex-start; }
  .sala {
    font-size: 1rem;
    word-break: break-word;
  }
  .agenda-full .agenda-wrapper { padding: 1rem; }
  .agenda-grid .bar img.sponsor-logo-small-card {
    max-height: 1.1rem;
  }
}
