/// <reference path="../../_color-definitions.scss" />
/// <reference path="../../_variables.scss" />
/// <reference path="../../_mixins.scss" />

.tk-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  z-index: 200;
}

.tk-modal.in {
  display: flex;

  .tk-modal__dialog {
    transform: scale(1);
    opacity: 1;
  }
}

.tk-modal__dialog {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  height: 100%;
  opacity: 0;
  transform: scale(0);
  box-sizing: border-box;

  transition: opacity 75ms linear, transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1);
}

.tk-modal {

  @media (min-width: 992px) {
   #viewmodelSection.narrow {
      width: 30vw;
    }

    #viewmodelSection.big{
      width: 60vw;
    } 

    #viewmodelSection.large  {
      width: 90vw;
    }
  }
}

.tk-modal__surface {
  display: flex;
  flex-direction: column;
  flex-grow: 0;

  border-radius: 4px;


  background: white;

  min-width: 280px;
  //max-width: 90%;

  overflow-y: auto;

  box-sizing: border-box;

  box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12);

  @media only screen and (max-width: 592px) {
    min-width: 300px;
  }
}

.tk-modal__header {
  padding: 8px;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  min-height: 52px;
  border-bottom: 1px solid rgba(0,0,0, 0.12);

  &.title {
    padding: 8px 8px 8px 24px;
    justify-content: space-between;
  }

  & .tk-button__native .mi {
    margin: 0;
  }

  .tk-modal__title {
    font-family: var(--base-font-family, $base-font-family);
    font-size: 1.2rem;
    font-weight: 500;
  }
}


.tk-modal__content {
  margin: 0;
  padding: 8px 24px 8px 24px;

  flex-grow: 1;
  overflow-y: auto;

  box-sizing: border-box;
}

.tk-modal__content #viewmodelSection {
  @media only screen and (max-width: 768px) {
    padding: 15px 0;
  }
}

.tk-modal__content #viewmodelSection {
  height: auto;
}
.tk-modal__buttons {
  display: flex;
  justify-content: stretch;
  order:2;
}

.tk-modal__actions {
  margin: 0;
  padding: 8px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-grow: 2;
  flex-wrap: wrap;
  min-height: 52px;
  border-top: 1px solid rgba(0,0,0, 0.12);
  box-sizing: border-box;
}


.tk-modal__actions .tk-button__native.outlined.success {
  margin-left: 10px;
  min-width: 50px;
  transition: all $anim-duration-dialog-fadein $easing-standard;

  .ripple-container {
    background-color: rgba(255,255,255, 0.20);
  }

  &[disabled] {
    color: #000;
    opacity: 0.6;
    border: 0;

    &:hover {
      background: transparent;
    }
  }

  @media only screen and (min-width: 768px) {
    min-width: 100px;
  }
}

.tk-modal__actions .tk-button__native.outlined.danger {
  min-width: 50px;
  transition: all $anim-duration-dialog-fadein $easing-standard;

  &[disabled] {
    color: #000;
    opacity: 0.6;
    border: 0;

    &:hover {
      background: transparent;
    }
  }

  .ripple-container {
    background-color: rgba(255,255,255, 0.20);
  }

  @media only screen and (min-width: 768px) {
    min-width: 100px;
  }
}


.tk-modal__backdrop {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;


  background-color: #000;

  opacity: 0;

  &.in {
    opacity: 0.15;
    z-index: 100;
  }
}
