/**
 * Copyright (c) Microblink Ltd. All rights reserved.
 */

:host {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;

  visibility: hidden;

  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  overflow-y: auto;
  padding: 24px;

  .mb-modal {
    border-radius: var(--mb-modal-border-radius);

    display: flex;
    flex-direction: column;
    padding: 0px;
    align-self: center;

    position: relative;
    max-height: 600px;
    max-width: 640px;
    width: 100%;

    background-color: var(--mb-modal-background);
    color: var(--mb-component-font-color);

    box-shadow: 0px 25px 50px rgba(31, 41, 55, 0.25);

    .inner {
      padding: 24px;
    }

    .footer {
      background-color: rgba(116, 116, 128, 0.08);
      border-radius: 0px 0px 4px 4px;

      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;

      max-width: 640px;
      max-height: 109px;
    }

    .close-wrapper {
      position: absolute;
      right: 24px;
      top: 24px;
      cursor: pointer;

      svg {
        width: 20px;
        height: 20px;
      }
    }

    .back-wrapper {
      position: absolute;
      left: 24px;
      top: 20px;
      cursor: pointer;

      svg {
        width: 20px;
        height: 20px;
      }
    }

    .title {
      text-align: center;
      font-weight: 400;
      font-size: var(--mb-modal-title-font-size);
      line-height: var(--mb-modal-title-line-height);
      margin-top: 16px;
    }

    .content {
      margin: 24px 0;
      font-weight: 400;
      font-size: var(--mb-modal-content-font-size);
      line-height: var(--mb-modal-content-line-height);

      &.centered {
        text-align: center;
      }
    }

    .actions {
      display: flex;
      justify-content: center;

      button {
        width: 126px;
        height: 32px;
        border-radius: 0;
        border: 0;
        background: #48b2e8;
        color: #ffffff;
        cursor: pointer;
      }
    }
  }
}

:host(.visible) {
  visibility: visible;
  opacity: 1;
}

:host(.elevated) {
  .mb-modal {
    box-shadow: 0px 2px 24px 0px #0000001a;
    box-shadow: 0px 2px 8px 0px #0000000d;
  }
}

:host(.centered) {
  align-items: center;
  justify-content: center;
}
