.calendar-container {
  --deep-blue: #00214a;
  --active-blue: #00214a;
  --gray: #cdcfce;
  --light-gray: #f1f1f1;
  --lightest-gray: #e0e0e0;
  --border-gray: #9ea4ac;
  --green: #00d37e;
  --text-gray: #929292;
  --font-calendar-table: 14px;
  --line-height-calendar-table: 22px;
  --font-calendar-days-day: 27px;
  --font-calendar-days-month: 18px;
  --font-calendar-days-day-name: 18px;
  --font-calendar-no-results: 18px;
  --font-calendar-table-header: 15px;
}

.dark-mode .calendar-container {
  --deep-blue: #f1f1f1;
  --active-blue: #00214a;
  --gray: #00214a;
  --light-gray: #1a385d;
  --border-gray: #00214a;
  --green: #00d37e;
  --text-gray: inital;
  --font-calendar-table: 14px;
  --line-height-calendar-table: 22px;
  --font-calendar-days-day: 27px;
  --font-calendar-days-month: 18px;
  --font-calendar-days-day-name: 18px;
  --font-calendar-no-results: 18px;
  --font-calendar-table-header: 15px;
}

.dark-mode {
  background: #00214a;
  color: #fff;

  .node--type-static-block {
    p:last-of-type {
      margin-bottom: 0 !important;
      .paragraph--latest-articles;
    }
  }

  .calendar-container {
    padding-top: 50px;

    @media (max-width: 768px) {
      padding-top: 0;
    }

    .block-title {
      margin-bottom: 40px;
    }

    .date-wrapper {
      padding: 18px 32px;
      border: 1px solid #d3d3d5;
      width: fit-content;
    }
  }

  .calendar-slider {
    border: 2px solid var(--lightest-gray);

    .calendar-slider__next:before,
    .calendar-slider__prev:before {
      border-left: 2px solid var(--lightest-gray);
      border-bottom: 2px solid var(--lightest-gray);
    }
  }

  .accordion-content__last-publication h3,
  .accordion-content__last-publication h4 {
    color: var(--deep-blue) !important;
  }

  .accordion-content .chart__wrapper h3,
  .chart__buttons button {
    color: var(--active-blue);
  }

  .calendar-entry:not(.calendar-entry--striped) {
    &:hover {
      background-color: var(--lightest-gray) !important;
    }
  }

  .accordion-content__last-publication {
    @media (max-width: 1023px) {
      background-color: transparent;
    }
  }

  .calendar-dropdown:hover,
  .calendar-entry--striped:not(.calendar-entry):hover {
    background-color: var(--light-gray) !important;

    .accordion-content__description,
    .accordion-content__last-publication h3,
    .accordion-content__last-publication h4,
    .accordion-content__last-publication p {
      color: var(--deep-blue) !important;
    }
  }
}

.calendar-container {
  @media (min-width: 1200px) {
    max-width: 1170px !important;
  }

  .block-title {
    color: var(--deep-blue);
  }
}

.calendar-slider {
  width: 745px;
  height: 110px;
  display: flex;
  justify-content: space-between;
  border: 2px solid var(--gray);
  overflow: visible;
  margin-bottom: 50px;
  margin-top: 40px;

  @media (max-width: 768px) {
    width: 100%;
    border: 2px solid var(--light-gray);
  }
}

.calendar-slider__prev,
.calendar-slider__next {
  width: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-gray);
  cursor: pointer;
}

.calendar-slider__prev:before,
.calendar-slider__next:before {
  display: block;
  content: "";
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--border-gray);
  border-bottom: 2px solid var(--border-gray);
  transform: rotateZ(45deg);
}

.calendar-slider__next:before {
  transform: rotateZ(-135deg);
}

.calendar-slider__block {
  width: 220px;
  padding: 14px 0;
  position: relative;
  cursor: pointer;
  background: transparent;
}

.calendar-slider__block span {
  display: block;
  margin: 0 auto 10px;
  text-align: center;
  line-height: 1;
}

.calendar-slider__day {
  font-size: var(--font-calendar-days-day);
  color: var(--green);
  font-weight: 700;
}

@media (max-width: 800px) {
  .calendar-slider__day {
    font-size: var(--font-calendar-days-day) - 6px;
  }
}

.calendar-slider__month {
  font-size: var(--font-calendar-days-month);
  color: var(--deep-blue);
  font-weight: 700;
}

@media (max-width: 800px) {
  .calendar-slider__month {
    font-size: 13px;
  }
}

.calendar-slider__day-name {
  font-size: var(--font-calendar-days-day-name);
  color: var(--deep-blue);
}

@media (max-width: 800px) {
  .calendar-slider__day-name {
    font-size: 13px;
  }
}

.calendar-slider__block:after {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--light-gray);
  z-index: -1;
  opacity: 0;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform-origin: center;
  transition: transform 0.4s linear, opacity 0.4s linear;
}

.calendar-slider__block:hover:after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.calendar-slider__block--active {
  width: 162px;
  height: 140px;
  transform: translateY(-17px);
  padding-top: 30px;
  background: var(--green);
  border-radius: 5px;
  cursor: auto;
}

.calendar-slider__block--active:after {
  display: none;
}

.calendar-slider__block--active .calendar-slider__day {
  color: var(--active-blue);
}

.calendar-slider__block--active .calendar-slider__month {
  color: var(--active-blue);
}

.calendar-slider__block--active .calendar-slider__day-name {
  color: var(--active-blue);
}

.calendar {
  padding-top: 15px;
  color: var(--deep-blue) !important;
  margin-bottom: 50px !important;
}

.calendar * {
  border: none !important;
}

.calendar .calendar-wrapper {
  position: relative;
}

.table-loader-wrapper {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
}

.table-loader {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: conic-gradient(#0000 10%, var(--green));
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
  animation: s3 1s infinite linear;
}

.calendar-header {
  border-bottom: none;
}

.calendar-header,
.calendar-entry {
  height: 51px;
}

.calendar th,
.calendar td {
  vertical-align: middle !important;
}

.calendar-header th,
.calendar-entry__hour {
  font-size: var(--font-calendar-table-header) !important;
  font-weight: 600 !important;
}

.calendar-header__title,
.calendar-entry__title {
  width: 100%;
}

.calendar-entry {
  cursor: pointer;
}

.calendar-entry.no-hover {
  cursor: initial;
}

.calendar-entry td {
  font-size: 13px;
  font-weight: 400;
}

.calendar-dropdown:hover {
  background-color: #fff !important;
  color: var(--active-blue) !important;
}

.calendar-entry--striped + .calendar-dropdown:hover {
  background-color: var(--light-gray) !important;
  color: var(--active-blue) !important;
}
.calendar-entry:hover,
.calendar-entry-mobile:hover {
  color: var(--active-blue) !important;
}
.calendar-header__hour,
.calendar-entry__hour {
  padding-left: 30px !important;
  width: max-content !important;
}

.calendar-entry__remaining {
  text-align: center;
}

.calendar-header__chevron,
.calendar-entry__chevron-container {
  padding-left: 10px !important;
}

.calendar-entry__chevron-container {
  padding-top: 0;
  padding-bottom: 0;
}

.calendar-entry__chevron:focus {
  outline-color: var(--green);
}

.calendar-entry__chevron {
  transition: all 0.3s;
  transform: rotateX(180deg);
}

.collapsed .calendar-entry__chevron {
  transform: rotateX(0deg);
}

.calendar .calendar-entry--striped {
  background-color: var(--light-gray);
}

.calendar-wrapper {
  position: relative;
  overflow: auto;
  min-height: 200px;
}

.calendar .flag {
  position: relative;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 32px;
}

.calendar-entry__country {
  position: relative;
  width: auto;
  height: auto;
  display: table-cell;
  background-size: 25px;
}

.calendar-entry__country-tooltip {
  display: none;
  padding: 5px;
  position: absolute;
  left: -5px;
  top: 50%;
  background: black;
  color: #fff;
  font-size: 11px;
  text-align: center;
  transform: translateY(-50%);
}

.calendar-entry__country:hover .calendar-entry__country-tooltip {
  display: block;
}

.priority {
  background-repeat: no-repeat;
  background-position: 12px center;
}

.calendar-entry .calendar-entry__current {
  font-weight: 700;
}

.calendar .calendar-wrapper .loader {
  z-index: 10;
}

.custom-loader-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.custom-loader {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(#0000 10%, var(--green));
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
  animation: s3 1s infinite linear;
}

@keyframes s3 {
  to {
    transform: rotate(1turn);
  }
}

.accordion-content {
  display: grid;
  grid-template-columns: 1fr 1fr 270px 5px;
  position: relative;
  min-height: 55px;
  padding: 35px;
}

.accordion-content__description {
  font-size: 15px;
  padding-right: 30px;
}

.accordion-content__last-publication h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.67;
  margin-bottom: 20px;
}

.accordion-content__last-publication-content h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 13px;
}

.accordion-content__last-publication-content p {
  font-size: 13px;
  font-weight: 400;
  margin-bottom: 0;
}

.accordion-content__last-publication-table {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 10px;
  margin-bottom: 20px;
}

.accordion-content__last-publication-table p {
  padding-right: 5px;
}

.calendar--no-results {
  font-size: var(--font-calendar-no-results);
  text-align: center;
}

.calendar-loading {
  opacity: 0.5;
  pointer-events: none;
}

.calendar-header__current,
.calendar-header__forecast,
.calendar-header__previous,
.calendar-entry__current,
.calendar-entry__forecast,
.calendar-entry__previous {
  min-width: 90px;
}

.chart {
  padding-right: 45px;
}

.chart__buttons {
  display: flex;
  margin-bottom: 18px;
}

.chart__buttons button {
  font-size: 17px;
  font-weight: bold;
  color: var(--deep-blue);
  text-transform: uppercase;
  padding: 7px 22px;
  background-color: var(--green);
  transition: all 0.3s;
  margin-right: 15px;
}

.chart__buttons button:hover {
  opacity: 0.75;
}

.chart__wrapper {
  background-color: transparent;
  padding: 20px 15px 0 10px;
  border: 2px solid transparent !important;
}

.chart h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 0;
  margin-left: 15px;
  display: none;
}

.chart-created .chart__wrapper {
  background-color: #fff;
  border: 2px solid var(--border-gray) !important;
}

.chart-created .chart h3 {
  display: block;
}

.calendar-entry__priority--mobile {
  display: none;
}

.calendar-entry-mobile {
  display: none;
}

@media (max-width: 1023px) {
  .calendar {
    margin-bottom: 70px !important;
  }

  .accordion-content {
    padding: 20px 15px;
  }

  .calendar.table thead {
    display: none;
  }

  .calendar-entry__hour {
    padding-left: 15px !important;
  }

  .calendar-entry__forecast,
  .calendar-entry__current,
  .calendar-entry__previous,
  .calendar-entry__period,
  .calendar-entry__priority,
  .calendar-entry__hour {
    display: none;
  }

  .calendar-entry__country {
    min-width: 40px;
  }

  .calendar-entry__priority--mobile {
    display: table-cell;
    min-width: 70px;
  }

  .calendar-entry__priority--mobile p {
    margin-bottom: 0;
  }

  .calendar-entry__priority--mobile .priority {
    height: 10px;
    background-position-x: left;
    background-size: 44px;
  }

  .accordion-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .accordion-content__description {
    order: 2;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
  }

  .chart {
    order: 1;
    width: 100%;
    padding-right: 0;
    margin-bottom: 20px;
  }

  .accordion-content__last-publication {
    order: 3;
    border: 1px solid var(--border-gray) !important;
    background-color: #fff;
    padding: 20px 15px;
  }

  .accordion-content__last-publication h3 {
    font-size: 15px;
    margin-bottom: 15px;
  }

  .accordion-content__last-publication h4 {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .accordion-content__last-publication-table {
    margin-bottom: 15px;
  }

  .accordion-content__last-publication-table:last-of-type {
    margin-bottom: 0;
  }

  .chart__buttons {
    max-width: 325px;
  }

  .chart__buttons button {
    margin-right: 10px;
  }

  .calendar-entry__chevron {
    background-size: 20px;
  }

  .chart-created .chart__wrapper {
    border: 1px solid var(--border-gray) !important;
  }

  .calendar-entry-mobile {
    display: table-row;
  }

  .calendar-entry-mobile td {
    padding-top: 0 !important;
    padding-left: 15px !important;
  }

  .calendar-entry-mobile__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .calendar-entry-mobile__content p {
    margin-bottom: 0;
  }

  .calendar-entry-mobile__title,
  .calendar-entry-mobile__value {
    font-size: 11px;
  }

  .calendar-entry-mobile__title {
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 3px;
  }

  .calendar-entry:hover + .calendar-entry-mobile {
    background-color: --var(--lightest-gray);
  }

  .calendar-entry:has(+ .calendar-entry-mobile:hover) {
    background-color: --var(--lightest-gray);
  }

  .calendar-entry__tick {
    background-position-x: 15px !important;
    fill: red;
  }

  .calendar-entry__remaining {
    min-width: 62px;
    text-align: left;
  }
}
