$mailgo-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
  Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
  "Segoe UI Symbol";

// colors
$default-color: #4a4a4a;
$gmail-color: #d44638;
$outlook-color: #0072c6;
$wa-color: #00bfa5;
$telegram-color: #0088cc;
$skype-color: #00aff0;

$default-dark-color: #bbbbbb;
$gmail-dark-color: #faeceb;
$outlook-dark-color: #e5f0f9;
$wa-dark-color: #e5f8f6;
$telegram-dark-color: #e5f3f9;
$skype-dark-color: #e5f7fd;

// other vars
$default-border-radius: 20px;

.m-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow: hidden;
  font-size: 15px;
  z-index: 10000;

  p,
  span,
  strong,
  a {
    margin: 0;
    padding: 0;
    font-size: 100%;
    line-height: 1;
    font-family: $mailgo-font-family;
    text-rendering: optimizeLegibility;
  }

  strong {
    font-weight: 700;
  }

  .m-modal-back {
    position: absolute;
    z-index: 10001;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #20232a;
    opacity: 0.8;
  }

  .m-modal-content {
    position: relative;
    z-index: 10002;
    box-sizing: content-box;
    text-align: center;
    min-width: 200px;
    max-width: 240px;
    background-color: #fff;
    opacity: 0.95;
    border-radius: $default-border-radius;
    box-shadow: 0 3px 20px rgba(32, 35, 42, 0.5);
    color: $default-color;
    display: flex;
    flex-direction: column;
    overflow: auto;
    padding: 24px;
    transition: 0.5s box-shadow;

    &:hover {
      opacity: 1;
    }

    .m-title {
      margin-bottom: 8px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      line-height: 1.2em;
    }

    .m-details {
      margin-bottom: 10px;
      p {
        font-size: 12px;
        margin-top: 3px;
        margin-bottom: 3px;
      }
    }

    a {
      padding: 10px;
      color: $default-color;
      border-radius: $default-border-radius;
      text-decoration: none;

      &.m-gmail {
        color: $gmail-color;
        &:hover {
          background-color: rgba(212, 70, 56, 0.08);
          color: $gmail-color;
        }
      }

      &.m-outlook {
        color: $outlook-color;
        &:hover {
          background-color: rgba(0, 114, 198, 0.08);
          color: $outlook-color;
        }
      }

      &.m-tg {
        color: $telegram-color;
        &:hover {
          background-color: rgba(0, 136, 204, 0.08);
          color: $telegram-color;
        }
      }

      &.m-wa {
        color: $wa-color;
        &:hover {
          background-color: rgba(0, 191, 165, 0.08);
          color: $wa-color;
        }
      }

      &.m-skype {
        color: $skype-color;
        &:hover {
          background-color: rgba(0, 175, 240, 0.08);
          color: $skype-color;
        }
      }

      &.m-copy {
        padding: 16px 10px;
        font-size: 16px;
      }

      &.m-default:hover,
      &.m-copy:hover {
        background-color: rgba(0, 0, 0, 0.08);
        color: $default-color;
      }

      &.m-by {
        font-size: 9px;
        margin-top: 0.8rem;
        padding: 5px;
        color: $default-color;
        opacity: 0.55;
        &:hover {
          opacity: 1;
        }
      }
    }

    .w-500 {
      font-weight: 500;
    }
  }

  &.m-dark {
    .m-modal-content {
      color: #fff;
      background-color: #20232a;
      a {
        color: $default-dark-color;

        &:hover {
          color: #fff;
        }

        &.m-gmail {
          &:hover {
            color: $gmail-dark-color;
          }
        }

        &.m-outlook {
          &:hover {
            color: $outlook-dark-color;
          }
        }

        &.m-tg {
          &:hover {
            color: $telegram-dark-color;
          }
        }

        &.m-wa {
          &:hover {
            color: $wa-dark-color;
          }
        }

        &.m-skype {
          &:hover {
            color: $skype-dark-color;
          }
        }
      }
    }
  }
}
