/**
 * Program schedule for /programm-1-grid (Views programm page_6 only).
 * Does not affect /programm or /programm-1.
 */

.programm-grid {
  display: flex;
  flex-direction: column;
  margin: 0 10px;
  width: auto;
  max-width: none;
}

.programm-grid__row,
.programm-grid__complex {
  border-bottom: 1px solid #cccccc;
}

.programm-grid__cell {
  margin: 0;
  padding: 12px 8px 4px;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

/* Full description popup: the cell is the positioning context and must not
 * clip the absolutely positioned .descript_programm block. */
.programm-grid__cell:has(.descript_programm) {
  position: relative;
  overflow: visible;
}

.programm-grid__cell.is-open {
  z-index: 30;
}

.programm-grid__cell .descript_programm {
  top: 70px;
  left: 0;
  right: 0;
  width: auto;
  min-width: 300px;
  max-width: 554px;
  z-index: 20;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .programm-grid__cell .descript_programm {
    position: fixed;
    top: 8%;
    left: 4%;
    right: 4%;
    width: auto;
    max-width: none;
    z-index: 100;
  }
}

.programm-grid__cell.sections-row {
  width: auto;
  max-width: 100%;
}

.programm-grid__row {
  display: flex;
  flex-direction: column;
}

.programm-grid__row .programm-grid__cell + .programm-grid__cell,
.programm-grid__row-cells .programm-grid__cell + .programm-grid__cell {
  border-top: 1px solid #cccccc;
}

/* Shared title row (Обед / Кофе-брейк): one header, then section details. */
.programm-grid__same-title {
  padding: 12px 8px 4px;
}

.programm-grid__same-title .sections-item__name {
  font-weight: 600;
}

.programm-grid__row--same-title .programm-grid__row-cells {
  display: flex;
  flex-direction: column;
}

.programm-grid__row--same-title .programm-grid__cell--same-title-detail .views-field-field-end-minute,
.programm-grid__row--same-title .programm-grid__cell--same-title-detail .sections-item__time,
.programm-grid__row--same-title .programm-grid__cell--same-title-detail .views-field-title,
.programm-grid__row--same-title .programm-grid__cell--same-title-detail .sections-item__name {
  display: none;
}

@media (min-width: 768px) {
  .programm-grid__row:not(.programm-grid__row--same-title) {
    flex-direction: row;
    align-items: stretch;
  }

  .programm-grid__row:not(.programm-grid__row--same-title) .programm-grid__cell {
    flex: 1 1 0;
    border-top: 0;
    border-right: 1px solid #cccccc;
  }

  .programm-grid__row:not(.programm-grid__row--same-title) .programm-grid__cell:last-child {
    border-right: none;
  }

  .programm-grid__row--length-1 .programm-grid__cell,
  .programm-grid__row--full .programm-grid__cell {
    flex: 1 1 100%;
    border-right: none;
  }

  .programm-grid__row--same-title .programm-grid__row-cells {
    flex-direction: row;
    align-items: stretch;
  }

  .programm-grid__row--same-title .programm-grid__row-cells .programm-grid__cell {
    flex: 1 1 0;
    border-top: 0;
    border-right: 1px solid #cccccc;
  }

  .programm-grid__row--same-title .programm-grid__row-cells .programm-grid__cell:last-child {
    border-right: none;
  }
}

.programm-grid__complex {
  display: grid;
  grid-template-columns: repeat(var(--programm-grid-columns, 1), minmax(0, 1fr));
  align-items: stretch;
}

.programm-grid__complex .programm-grid__cell {
  border-right: 1px solid #cccccc;
  border-bottom: 1px solid #cccccc;
}

@media (min-width: 768px) {
  .programm-grid__complex--cols-2 .programm-grid__cell[style*="grid-column: 2"],
  .programm-grid__complex--cols-3 .programm-grid__cell[style*="grid-column: 3"],
  .programm-grid__complex--cols-4 .programm-grid__cell[style*="grid-column: 4"] {
    border-right: none;
  }
}

@media (max-width: 767px) {
  .programm-grid__complex {
    display: flex;
    flex-direction: column;
  }

  .programm-grid__complex .programm-grid__cell {
    grid-column: auto !important;
    grid-row: auto !important;
    border-right: none;
  }
}

.presenter-event-wrapper {
  font-size: 0;
}

.presenter-event-wrapper a,
.presenter-event-wrapper span {
  display: inline;
  hyphens: auto;
  font-size: 14px;
}

.archive-btn a {
  border: 3px solid #fd2a3c;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 48px;
  text-align: center;
  padding: 0 2rem;
  cursor: pointer;
  text-transform: uppercase;
  font-family: Fact;
  text-decoration: none;
  font-size: 1.25rem;
}

.archive-btn a:hover {
  background-color: #fd2a3c;
  color: #ffffff;
}