// NOTE: root is body element
.root--modal-visible {
  height: 100%;
  overflow: hidden;
}

.base-modal__wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 50px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: @z-index--base-modal-backtick;
}

.base-modal__wrap--fixed {
  justify-content: initial;
}

.base-modal {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: @z-index--base-modal;
  width: 540px;
  min-height: 200px;
  align-self: center;
  background-color: var(--modal-background-color);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 40px rgba(0, 0, 0, 0.3);
  visibility: hidden;
  align-self: center;
  max-height: 100%;
}

.base-modal--fixed {
  align-self: auto;
  margin-top: 20vh;
  margin-left: 50%;
  transform: translateX(-50%);
}

.base-modal--visible {
  visibility: visible;
}

.base-modal__tab-content {
  font-size: @text-size-paragraph;
  padding: 30px;
  overflow: auto;
  display: none;
}

.base-modal__tab-content--visible {
  display: block;
}


.base-modal__backdrop {
  .size(100%);

  position: fixed;
  top: 0;
  left: 0;
  background-color: @base-modal-backdrop-color;
}

.base-modal__backdrop--fixed {
  justify-content: initial;
}

.base-modal__title {
  height: 30px;
  flex-shrink: 0;
  border-bottom: 1px solid @base-modal-header-border;
  background-color: var(--modal-header-background);
  border-radius: 3px 3px 0 0;
  text-align: center;
  word-wrap: break-word;
  display: flex;
  justify-content: center;
}

.base-modal__title-headline {
  .ellipsis();

  font-size: 1.2rem;
  font-weight: 600;
  line-height: 30px;
  margin-bottom: 0;
  max-width: 480px;
  color: var(--modal-headline-color);
}

.base-modal__title-sub-headline {
  color: #828282;
  margin-left: 3px;
}

.base-modal__close {
  width: 20px;
  height: 20px;
  position: absolute;
  right: 5px;
  top: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: @button-cursor;
}

.modal__close-icon {
  width: 8px;
  height: 8px;
  fill: var(--modal-close-fill);
}

.base-modal__close:hover .modal__close-icon {
  fill: var(--modal-close-hover-fill);
}

.base-modal__tab-bar {
  min-height: 60px;
  background: var(--modal-tab-bar-background);
  border-bottom: 1px solid @base-modal-header-border;
  padding: 0 10px;
  display: flex;
}

.base-modal__tab-bar-item {
  display: flex;
  width: 75px;
  height: 59px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 15px;
  padding-bottom: 9px;
  border-bottom: 2px solid transparent;
  cursor: @button-cursor;
  position: relative;
  bottom: -1px;
}

.base-modal__tab-bar-item--active {
  border-bottom-color: var(--modal-tab-bar-item-active);
}

.base-modal__tab-bar-item-icon {
  max-width: 75px;
  height: 14px;
  fill: #c3c3c3;
}

.base-modal__tab-bar-item-icon:first-child {
  margin: 0;
  margin-bottom: 8px;
}

.base-modal__tab-bar-item-icon--active {
  fill: var(--modal-tab-bar-item-active);
}

.base-modal__tab-bar-item-title {
  font-weight: 600;
  font-size: @text-size-1;
  line-height: 1;
  color: var(--modal-tab-bar-item-color);
}

.base-modal__tab-bar-item-title--active {
  color: var(--modal-tab-bar-item-title-active);
}

// TODO: should do in component to make these calculations
@media (max-height: 800px) {
  .base-modal--fixed {
    margin-top: 6vh;
  }
}

@media (max-height: 770px) {
  .base-modal--fixed {
    margin-top: 0;
  }
}
