.Location {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  .location-accuracy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    border-radius: 50%;

    animation: accuracy-wave 5s ease-out infinite forwards;

    @keyframes accuracy-wave {
      0% {
        transform: translate(-50%, -50%) scale(0);
        background-color: var(--color-primary);
      }
      100% {
        transform: translate(-50%, -50%) scale(1);
        background-color: transparent;
      }
    }
  }

  @keyframes fade-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .map-wrapper {
    position: relative;
    overflow: hidden;
  }

  .map {
    animation: fade-in 0.3s forwards;
  }

  .pin {

    --pin-color: var(--color-primary);

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);

    animation: fade-in 0.3s forwards;
  }

  .geoLive {
    &::before {
      content: "";

      position: absolute;
      z-index: 3;
      bottom: 0;
      left: 50%;
      transform: translate(-50%, 50%);

      width: 1rem;
      height: 1rem;
      border: 2px solid white;
      border-radius: 50%;

      background: var(--color-primary);
    }

    .round-pin {
      bottom: 0.5rem;
    }
  }

  .direction {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform-origin: bottom;
    transform: translate(-50%, 0.3125rem) rotate(var(--direction));

    width: 1.5rem;
    height: 2rem;
    border-radius: 40%;

    background: radial-gradient(circle, var(--color-primary) -100%, transparent 100%);
    clip-path: polygon(50% 100%, 0 0, 100% 0);

    transition: transform 0.3s ease-out;
  }

  .location-avatar {
    position: relative;
    z-index: 5;

    overflow: hidden;

    margin-right: 0;
    margin-bottom: 1.3125rem;
  }

  .venue-icon {
    position: absolute;
    z-index: 5;
    bottom: -0.5rem;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 3rem;
    height: 3rem;
  }

  .venue,
  .geo {
    height: 3.25rem;
  }

  .geoLive,
  .venue {
    filter: drop-shadow(0 0 2px var(--color-default-shadow));
  }

  .expired {
    --pin-color: white;

    .location-avatar::after {
      content: "";

      position: absolute;
      top: 0;
      left: 0;

      width: 100%;
      height: 100%;

      background-color: rgba(255, 255, 255, 0.3);
    }
  }

  .round-pin {
    position: absolute;
    z-index: 4;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);

    width: 5rem;

    fill: var(--pin-color);
  }

  .location-info {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 1fr auto;

    width: 100%;
    padding: 0.3125rem 0.5rem 0.25rem;

    &-title {
      grid-area: 1 / 1 / 2 / 2;
      font-weight: var(--font-weight-medium);
    }

    &-subtitle {
      grid-area: 2 / 1 / 2 / 2;
      font-size: 0.875rem;
      line-height: 1.25;
      color: var(--color-text-secondary);

      .Message.own & {
        color: var(--color-message-meta-own);
      }
    }
  }

  .geo-countdown {
    position: relative;
    grid-area: 1 / 2 / 3 / 3;
    width: 2rem;
    height: 2rem;
  }

  .geo-countdown-text {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);

    width: 100%;

    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    color: var(--accent-color);
    text-align: center;
  }

  .geo-countdown-progress {
    fill: transparent;
    stroke: var(--accent-color);
    stroke-linecap: round;
    stroke-width: 2;

    transition: stroke-dashoffset 2s, stroke 0.2s;
  }
}
