@import url('./base.css');
@import url('./icon.css');

body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  color: var(--color-text);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

header {
  padding: 1rem;
}

header h1 {
  text-align: center;
}

main {
  margin-inline: auto;
  max-width: 768px;
  padding: 1rem;
  margin-bottom: 2rem;
}

.card-header {
  text-transform: uppercase;
}

label {
  font-weight: 500;
  font-size: 14px;
}

.label-sm label {
  font-size: 0.75rem;
  color: var(--color-text-light);
}

img {
  user-select: none;
  -webkit-user-drag: none;
}

.mappings input[type='text'] {
  font-family: monospace;
  color: var(--color-primary);
}

code {
  font-family: monospace;
  color: var(--color-warning);
}

.modal__overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal__container {
  background-color: #fff;
  padding: 2rem;
  max-width: 500px;
  max-height: 100vh;
  border-radius: var(--border-radius);
  overflow-y: auto;
  box-sizing: border-box;
}

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

.modal__title {
  font-size: 1.25rem;
  color: var(--color-text);
  box-sizing: border-box;
}

.modal__close {
  background: transparent;
  border: 0;
}

.modal__header .modal__close:before {
  content: '\2715';
}

.modal__content {
  margin-top: 2rem;
  margin-bottom: 2rem;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.8);
}

@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%);
  }
}

.modal-slide {
  display: none;
}

.modal-slide.is-open {
  display: block;
}

.modal-slide[aria-hidden='false'] .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.modal-slide[aria-hidden='false'] .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.modal-slide[aria-hidden='true'] .modal__overlay {
  animation: mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.modal-slide[aria-hidden='true'] .modal__container {
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

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