@import '_variables';

.share-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  @include flex-center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all $transition-duration ease;

  &.active {
    opacity: 1;
    visibility: visible;

    .share-popup {
      transform: scale(1) translateY(0);
    }
  }
}

.share-popup {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 32px;
  width: 90%;
  max-width: 380px;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
  transform: scale(0.8) translateY(40px);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-header {
  margin-bottom: 24px;
}

.popup-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  margin-bottom: 8px;
}

.popup-subtitle {
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.6);
}

.qr-container {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.qr-image {
  width: 100%;
  height: auto;
  @include flex-center;
}

.share-actions {
  @include flex-center;
  gap: 16px;
  margin-bottom: 16px;

  button {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    @include flex-center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);

    &:hover {
      transform: scale(1.1) translateY(-2px);
    }

    &:active {
      transform: scale(0.95);
    }
  }
}

#shareBtn,
.share-btn {
  background: rgba(0, 149, 246, 0.9);
  color: white;

  &:hover {
    background: rgba(0, 149, 246, 1);
    box-shadow: 0 12px 40px rgba(0, 149, 246, 0.4);
  }
}

#copyBtn,
#downloadBtn {
  background: rgba(255, 255, 255, 0.9);
  color: rgba(0, 0, 0, 0.8);

  &:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  @include flex-center;
  font-size: 20px;
  color: rgba(0, 0, 0, 0.6);
  transition: all $transition-duration ease;

  &:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
  }
}
