/**************************\
  Basic Modal Styles
\**************************/

.modal__root {
  z-index: 9999; /* Above all other content */
  font-weight: normal;
  font-family: sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.15);
}

.modal__container {
  position: relative;
  background-color: #fff;
  padding: 28px;
  width: 42rem;
  max-width: 100%;
  max-height: 100vh;
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  color: #00449e;
  box-sizing: border-box;
}

/* "X" close button */
.modal__close {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: 0;
  font-size: 1.3rem;
  opacity: 0.5;
  padding: 0.25rem 0.67rem;
  cursor: pointer;
}
.modal__header .modal__close:before { content: "\2715"; }

.modal__content {
  line-height: 1.5;
  color: rgba(0,0,0,.85);
  flex: 1;
  overflow-y: auto;
  min-height: 2rem;
  padding-bottom: 1.5rem;
}

/* Preserve whitespace in plain text (line breaks, spaces, etc.) */
.modal__content .plaintext {
  white-space: pre-wrap;
}

.modal__content ul {
  padding-left: 1.5em;
}
.modal__content ul li {
  margin-bottom: 0.75em;
}

.modal__content code.plaintext {
  display: block;
  background-color: #f5f5f5;
  padding: 0.5em 1em;
  border-radius: 0.33rem;
  border: 1px solid #ddd;
}

/* Remove margins from the first and last paragraphs of dialog content */
.modal__content > :first-child {
  margin-top: 0;
}
.modal__content > :last-child {
  margin-bottom: 0;
}

/* Input field for prompt dialogs */
.modal__input {
  display: block;
  width: calc(100% - 4px);
  margin-top: 1rem;
  margin-left: 2px;
  margin-right: 2px;
  padding: 0.5rem 0.7rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgb(0,0,0);
  background-color: #fff;
  border: 1px solid #777;
  border-radius: 0.33rem;
  box-sizing: border-box;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.modal__input:focus {
  background-color: hsl(205, 53%, 95%);
  outline: 2px solid hsl(205, 64%, 46%);
  box-shadow: 0 0 0 3px hsla(205, 64%, 46%, 0.25);
}

.modal__footer {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

/* Gradient effect at bottom of scrollable content */
.modal__footer::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  height: 2em;
  background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.5) 25%, #fff 100%);
  pointer-events: none;
}

.modal__btn {
  font-size: 1rem;
  padding: 0.5rem 1rem;
  background-color: #e6e6e6;
  color: rgba(0,0,0,.8);
  border-radius: .33rem;
  border-style: none;
  border-width: 0;
  cursor: pointer;
  appearance: button;
  text-transform: none;
  overflow: visible;
  line-height: 1.15;
  margin: 0;
  margin-left: 1rem;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform .1s ease-out;
}

.modal__btn:focus, .modal__btn:hover {
  transform: scale(1.05);
}

a.modal__btn,
a.modal__btn:visited,
a.modal__btn:hover,
a.modal__btn:active {
  color: rgba(0,0,0,.8);
  text-decoration: none;
}

.modal__btn-primary {
  background-color: hsl(205, 64%, 46%);
  color: #fff;
}



/**************************\
  Demo Animation Style
\**************************/
@keyframes mmfadeIn {
    from { opacity: 0; }
      to { opacity: 1; }
}

@keyframes mmfadeOut {
    from { opacity: 1; }
      to { opacity: 0; }
}

@keyframes mmslideIn {
  from { transform: translateY(15%); }
    to { transform: translateY(0); }
}

@keyframes mmslideOut {
    from { transform: translateY(0); }
    to { transform: translateY(-10%); }
}

.micromodal-slide {
  display: none;
}

.micromodal-slide.is-open {
  display: flex;
}

.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn .1s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmfadeIn .1s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut .1s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmfadeOut .1s cubic-bezier(0, 0, .2, 1);
}

.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}