@media (max-width: 550px) {
  .ec-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .ec-title {
    margin-top: .3em;
    margin-bottom: .6em;
  }
}
.ec-body { overflow: hidden; }
.ec-events { font-weight: 200; }

/* .ec-day.ec-today { background-color: rgba(252, 248, 227, .75); } */

.ec-month .ec-content .ec-day:nth-last-of-type(1),
.ec-month .ec-content .ec-day:nth-last-of-type(2),
.ec-week .ec-content .ec-day:nth-last-of-type(1),
.ec-week .ec-content .ec-day:nth-last-of-type(2) {
  background-color: var(--theme-bg-secondary);
}

.ec-list .ec-day {
  background-color: var(--theme-bg-alt);
}

.ec-header,
.ec-all-day,
.ec-body,
.ec-day,
.ec-days,
.ec-line:not(:first-child)::after {
  border-color: var(--theme-border);
}

.ec-button {
  font-family: inherit;
  font-weight: 300;
  color: var(--theme-border);
  background-color: var(--theme-bg);
  border-color: var(--theme-border);
}

.ec-popup { background-color: var(--theme-bg-alt); }

.ec-button:not(:disabled) {
  color: var(--theme-fg);
}

.ec-button:not(:disabled):hover,
.ec-button.ec-active {
  z-index: 1;
  color: var(--theme-fg);
  background-color: var(--theme-bg-alt);
  border-color: var(--theme-control);
}

.ec-icon.ec-prev::after,
.ec-icon.ec-next::after {
  border-color: var(--theme-fg);
}

.ec-time-grid .ec-line:not(:first-child)::after { border-color: var(--theme-border); }

.modal-active {
  overflow: hidden;
}

#modal-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  transform: scale(0);
}

.content {
  position: relative;
  z-index: 0;
  box-shadow: 0 0 0 300px var(--theme-bg);
}

#modal-container.two {
  transform: scale(1);
}

#modal-container.two .modal-background {
  background: rgba(0, 0, 0, 0);
  animation: fadeIn .5s cubic-bezier(.165, .84, .44, 1) forwards;
}

#modal-container.two .modal-background .modal {
  opacity: 0;
  animation: scaleUp .5s cubic-bezier(.165, .84, .44, 1) forwards;
}

#modal-container.two + .content {
  animation: scaleBack .5s cubic-bezier(.165, .84, .44, 1) forwards;
}

#modal-container.two.out {
  animation: quickScaleDown 0s .5s linear forwards;
}

#modal-container.two.out .modal-background {
  animation: fadeOut .5s cubic-bezier(.165, .84, .44, 1) forwards;
}

#modal-container.two.out .modal-background .modal {
  animation: scaleDown .5s cubic-bezier(.165, .84, .44, 1) forwards;
}

#modal-container.two.out + .content {
  animation: scaleForward .5s cubic-bezier(.165, .84, .44, 1) forwards;
}

#modal-container .modal-background {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  background: rgba(0, 0, 0, .8);
}

#modal-container .modal-background .modal {
  position: relative;
  box-sizing: border-box;
  display: inline-block;
  max-height: 100vh;
  padding: 50px;
  overflow: auto;
  font-weight: 300;
  color: var(--theme-fg);
  background-color: var(--theme-bg);
  border-radius: 3px;
}

#modal-container .modal-background .modal h2 {
  margin-bottom: 15px;
  font-size: 25px;
  line-height: 25px;
}

#modal-container .modal-background .modal p {
  font-size: 18px;
  line-height: 22px;
}

.button,
.button2 {
  display: inline-block;
  padding: 10px 15px;
  margin: 10px;
  font-family: inherit;
  font-size: 18px;
  color: var(--theme-fg);
  text-align: center;
  cursor: pointer;
  background-color: var(--theme-bg-alt);
  border: none;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);

  &[disabled],
  &[disabled]:hover {
    color: var(--theme-bg-alt);
    cursor: wait;
    background-color: var(--theme-bg-secondary);
  }
}

.button2 {
  background-color: var(--color-danger);
}

.button:hover {
  color: white;
  background-color: #009bd5;
}

.button2:hover {
  color: white;
  background-color: #d50000;
}

@keyframes fadeIn {
  0% { background: rgba(0, 0, 0, 0); }
  100% { background: rgba(0, 0, 0, .7); }
}
@keyframes fadeOut {
  0% { background: rgba(0, 0, 0, .7); }
  100% { background: rgba(0, 0, 0, 0); }
}
@keyframes scaleUp {
  0% {
    opacity: 0;
    transform: scale(.8) translateY(1000px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0px);
  }
}
@keyframes scaleDown {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0px);
  }

  100% {
    opacity: 0;
    transform: scale(.8) translateY(1000px);
  }
}
@keyframes scaleBack {
  0% { transform: scale(1); }
  100% { transform: scale(.85); }
}
@keyframes scaleForward {
  0% { transform: scale(.85); }
  100% { transform: scale(1); }
}
@keyframes quickScaleDown {
  0% { transform: scale(1); }
  99.9% { transform: scale(1); }
  100% { transform: scale(0); }
}
