.timeline {
  position: relative;
}
.timeline-line {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: -1;
  transition: left 0.8s ease, margin-left 0.8s ease;
}
.timeline-line-left {
  flex: 1 0 0%;
  height: 100vh;
  border-inline-end: 4px solid var(--bs-primary);
  z-index: -1;
  transition: flex 1s ease;
}
.timeline-line-right {
  flex: 1 0 0%;
  transition: flex 1s ease;
}
/* //////////////////////////////////////////////// */
.date-row {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-bottom: 4px;
  transition: height 1s linear, margin 1s linear;
}
.date-left,
.date-right {
  position: relative;
  flex: 1 0 0%;
  transition: flex 1s ease;
}
.date-left > div {
  text-align: right;
  position: absolute;
  width: 100%;
  left: 0;
  margin-left: 0.25rem;
}
.date-right > div {
  text-align: left;
  position: absolute;
  width: 100%;
  right: 0;
  margin-right: 0.25rem;
}

.date {
  font-size: 0.8rem;
  font-weight: 500;
  min-width: max-content;
}

.period-title,
.date-title {
  font-size: 0.8rem;
  font-weight: 600;
}
/* ////////////////////////////////////// */
.period {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: -100;
}
#left-period,
#right-period {
  position: relative;
  flex: 1 0 0%;
  transition: flex-grow 1s ease, margin-left 1s ease, margin-right 1s ease;
}
#left-period {
  margin-left: 2px;
}
#right-period {
  margin-right: 2px;
}
.period-space {
  position: absolute;
  top: 0;
}
.left-period-space {
  right: 0;
  border-start-start-radius: 1rem;
  border-end-start-radius: 1rem;
}
.right-period-space {
  left: 0;
  border-start-end-radius: 1rem;
  border-end-end-radius: 1rem;
}

.card-body:has(.date)::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  top: 50%;
  width: 100%;
  border-bottom-right-radius: 0.2rem;
  border-bottom-left-radius: 0.2rem;
  background-color: var(--bs-dark);
  opacity: 0.2;
}
.card-body:has(.date-title)::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  top: 50%;
  width: 100%;
  border-bottom-right-radius: 0.2rem;
  border-bottom-left-radius: 0.2rem;
  background-color: var(--bs-dark);
  opacity: 0.05;
}
.card-body:has(.period-title)::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  top: 50%;
  width: 100%;
  border-bottom-right-radius: 0.2rem;
  border-bottom-left-radius: 0.2rem;
  background-color: rgba(0, 0, 0, 0.1);
  mix-blend-mode: multiply;
  filter: saturate(2);
}

.form-select {
  width: min-content;
}

.timeline-settings {
  position: fixed;
  top: 0;
  z-index: 100;
  transition: top 1s;
}

.space {
  transition: height 0.5s ease-in-out;
}
.period-space {
  transition: height 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

#leftselect,
#rightselect {
  width: min-content;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--bs-primary);
  cursor: pointer;
}

/* For Firefox */
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--bs-primary); /* Change this to your desired thumb color */
  cursor: pointer;
}

/* For IE */
input[type="range"]::-ms-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--bs-primary); /* Change this to your desired thumb color */
  cursor: pointer;
}

.share:hover {
  cursor: pointer;
  background-color: var(--bs-gray-200) !important;
  transition: color 0.2s linear;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}
.kerdojel:hover {
  cursor: pointer;
  background-color: var(--bs-gray-200) !important;
  transition: color 0.2s linear;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}
.kerdojel-svg {
  filter: invert(32%) sepia(100%) saturate(5700%) hue-rotate(205deg) brightness(93%) contrast(96%);
}

#menu-button:hover,
#search-close:hover,
#search-open:hover,
#search:hover,
.overlay-close:hover,
.prespace:hover {
  cursor: pointer;
  background-color: var(--bs-gray-200) !important;
  transition: color 0.2s linear;
}
#menu-button:active,
#search-close:active,
#search-open:active,
#search:active,
.overlay-close:hover,
.prespace:active {
  background-color: var(--bs-gray-400) !important;
  transition: color 0.2s linear;
}

#menu {
  position: absolute;
  top: 22;
  right: 0;
}

#search-input {
  max-width: 300px;
  width: 50vw;
}
#search-input:focus {
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.3);
  filter: brightness(0.95);
  /* background-color: var(--bs-gray-100) !important; */
}
#search-results {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  margin-top: 0.6rem;
  z-index: -1;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}
@media (max-width: 576px) {
  #search-input {
    width: 70vw;
  }
}

.search-result:hover {
  background-color: var(--bs-gray-200) !important;
}
.search-result:hover .search-result-title {
  background-color: var(--bs-gray-100) !important;
}

.mini-date {
  width: max-content;
  padding: 0.1rem !important;
}
.mini-date-title {
  font-size: 0.8rem;
  font-weight: 500;
}

.hide {
  transform-origin: top right;
  animation: hide 0.3s forwards;
}

@keyframes hide {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
    display: none;
  }
}

.tight-date:hover {
  filter: brightness(0.9);
}
.tight-date:active {
  filter: brightness(0.8);
}

/* CUSTOM SELECT */
.select-wrapper {
  position: relative;
  font-family: sans-serif;
  height: 100%;
}

.select {
  background-color: var(--bs-white);
  border: 1px solid var(--bs-gray-200);
  border-radius: 50rem;
  width: 90px !important;
  height: 100%;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  user-select: none;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--bs-body-color);
}
.select:hover {
  border: 1px solid var(--bs-gray-300);
  background-color: var(--bs-gray-100);
}

.select::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 30px;
  transform: scaleX(1.5);
  padding: 0.5rem;
  font-size: 0.75em;
  color: black;
}

.options {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--bs-white);
  border: 1px solid var(--bs-gray-400);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(94, 94, 94, 0.1);
  z-index: 99;
  display: none;
  flex-direction: column;
}
.first {
  padding: 2px;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.last {
  padding: 2px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.option {
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--bs-body-font-family);
  color: black;
  transition: background-color 0.2s ease;
}

.option:hover {
  background-color: var(--bs-gray-200);
}

.option.selected {
  background-color: var(--bs-gray-300);
}

/* MESSAGES */

.message-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.data-content {
  font-size: 1rem;
  font-weight: 400;
  overflow-y: auto;
}

.desc-item {
  color: var(--bs-gray-800);
  line-height: 1.2rem;
  margin-bottom: 8px;
}
.desc-strong {
  font-weight: 600;
}
.desc-tab-1 {
  padding-left: 1rem;
}
.desc-tab-2 {
  padding-left: 2rem;
}
.desc-tab-2::before {
  content: "• ";
  color: var(--bs-gray-800);
  font-weight: 900;
}
