@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@500;700&display=swap');

* {
  box-sizing: border-box;
}

:root {
  --very-dark-grayish-blue: hsl(217, 19%, 35%);
  --desaturated-dark-blue: hsl(214, 17%, 51%);
  --grayish-blue: hsl(212, 23%, 69%);
  --light-grayish-blue: hsl(210, 46%, 95%);
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--desaturated-dark-blue);
  background-color: var(--light-grayish-blue);
  min-height: 100vh;
  display: flex;
  flex-flow: column;
  justify-content: center;
  align-items: center;
}

main {
  width: 725px;
  height: 300px;
  display: flex;
  background-color: white;
  border-radius: 10px;
  margin-bottom: 15px;
}

figure {
  width: 310px;
  height: 100%;
  border-radius: 10px 0 0 10px;
  overflow: hidden;
  margin: 0;
}

img {
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.content {
  width: 350px;
  margin: auto;
}

.content h1 {
  font-size: 20px;
}

h1, b {
  color: var(--very-dark-grayish-blue);
}

address {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
  padding: 10px 0 10px 0;
  height: 50px;
  font-style: normal;
}

address img {
  width: 40px;
  height: 40px;
  border-radius: 20px;
}

address > div.details {
  display: flex;
  flex-flow: column;
}

.share {
  margin-left: auto;
  width: 30px;
  height: 30px;
  background-color: var(--light-grayish-blue);
  border: unset;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.share i {
  width: 15px;
  height: 15px;
  display: block;
  background-color: var(--desaturated-dark-blue);
  -webkit-mask: url(../images/icon-share.svg) no-repeat center;
  -moz-mask: url(../images/icon-share.svg) no-repeat center;
  -o-mask: url(../images/icon-share.svg) no-repeat center;
  mask: url(../images/icon-share.svg) no-repeat center;
}

.tooltip {
  width: 225px;
  height: 50px;
  position: absolute;
  top: -70px;
  left: calc(50% - 225px/2);
  background-color: var(--very-dark-grayish-blue);
  border-radius: 10px;
  color: var(--grayish-blue);
  font-size: 15px;
  letter-spacing: 3px;
  box-shadow: 0 5px 15px 0 var(--grayish-blue);
  cursor: auto;
  display: none;
}

.share:focus, .share:hover, .share:active, .share:focus-visible {
  background-color: var(--desaturated-dark-blue);
  border: unset;
  outline: unset;
}

.share:focus i, .share:hover i, .share:active i, .share:focus-visible i {
  background-color: var(--light-grayish-blue);
}

.share:focus .tooltip, .share:hover .tooltip {
  display: block;
}

.tooltip a {
  width: 20px;
  height: auto;
}

a.fb {
  content: url(../images/icon-facebook.svg);
}

a.tw {
  content: url(../images/icon-twitter.svg);
}

a.pi {
  content: url(../images/icon-pinterest.svg);
}

.tooltip svg {
  position: absolute;
  bottom: -11px;
  left: calc(50% - 21px/2);
}

.tooltip div {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

@media only screen and (max-width: 768px) {
  main {
    width: 350px;
    height: fit-content;
    flex-flow: column;
    overflow: hidden;
  }

  figure {
    height: 225px;
    width: 100%;
    border-radius: 10px 10px 0 0;
  }

  .text {
    max-width: 258px;
    margin: auto;
  }

  .content h1 {
    font-size: 16px;
  }

  .share {
    position: static;
    z-index: 110;
  }

  address {
    position: relative;
  }
  
  .tooltip svg {
    display: none;
  }

  address {
    padding-left: calc(50% - 258px/2);
    padding-right: calc(50% - 258px/2);
  }

  .share:focus .tooltip, .share:hover .tooltip {
    display: none;
  }

  address > .links {
    background-color: var(--desaturated-dark-blue);
  }

  .in-tooltip {
    background-color: var(--very-dark-grayish-blue);
    color: var(--grayish-blue);
    font-size: 15px;
    letter-spacing: 3px;
  }
  
  .in-tooltip > div {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}
