@keyframes modal-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 100;

  display: flex;
  align-items: flex-end;
  justify-content: center;

  background: var(--Overlay-60);
  height: var(--visual-viewport-height);

  &[data-entering] {
    animation: modal-fade 200ms;
  }

  &[data-exiting] {
    animation: modal-fade 150ms reverse ease-in;
  }
}

.modal {
  &[data-entering] {
    animation: slide-up 200ms;
  }
  &[data-exiting] {
    animation: slide-up 200ms reverse ease-in-out;
  }
}

.dialog {
  background-color: var(--Scandic-Brand-Pale-Peach);
  border-top-left-radius: var(--Corner-radius-md);
  border-top-right-radius: var(--Corner-radius-md);

  box-shadow: var(--modal-box-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-x4);
  padding: var(--Spacing-x5) var(--Spacing-x4);
  width: 100dvw;
}

.header {
  display: flex;
  flex-direction: column;
  gap: var(--Spacing-x2);
}

.titleContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--Spacing-x1);
}

.footer {
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  gap: var(--Spacing-x2);
}

.modal .prices {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--Spacing-x-half);
  padding-top: var(--Spacing-x-half);
}

@media screen and (min-width: 1367px) {
  .overlay {
    align-items: center;
  }

  .dialog {
    border-radius: var(--Corner-radius-md);
    padding: var(--Spacing-x6);
    width: fit-content;
  }

  .content {
    width: 512px;
  }

  .footer {
    flex-direction: row;
  }
}
