/* ========== modal style  */

body.modal-open {
  overflow: hidden !important;
  height: 100vh;
  padding-right: 15px; /* Prevents content shift when scrollbar disappears */
}

#shareModal.image_modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.377);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  align-items: center;
}

#shareModal .modal_content_wrapper {
  width: auto;
  max-width: 90vw;
  max-height: 90vh;
  overflow: auto;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

#shareModal .modal_content {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

#shareModal .close_modal {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background-color: white;
  cursor: pointer;
  z-index: 100;
  user-select: none;
  width: 3rem;
  height: 3rem;
  display: flex;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.856);
  filter: invert(1);
}

#shareModal.image_modal.display-none {
  display: none;
}

#shareModal .modal-container {
  display: flex;
  width: 35rem;
  flex-direction: column;
  align-items: center;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.12);
  text-align: left;
}

#shareModal .modal-header {
  display: flex;
  padding: 2.5rem 2.5rem 1.5rem 2.5rem;
  align-items: center;
  gap: 1.5rem;
  align-self: stretch;
}

#shareModal .modal-header .text {
  color: #1a1a1a;
  font-family: "Inter";
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.875rem;
  letter-spacing: -0.015rem;
  flex: 1 0 0;
}

#shareModal .modal-header .close-icon {
  display: flex;
  padding: 0.625rem;
  align-items: flex-start;
  gap: 0.625rem;
  border-radius: 2.5rem;
  border: 1px solid #e9ebec;
  cursor: pointer;
}

#shareModal .modal-body {
  display: flex;
  padding: 0.5rem 2.5rem 2.5rem 2.5rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  align-self: stretch;
}

#shareModal .page-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  align-self: stretch;
}

#shareModal .link-text {
  color: #1a1a1a;
  font-family: Inter;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.01125rem;
  align-self: stretch;
}

#shareModal .link-box {
  display: flex;
  padding: 1.125rem 1rem;
  align-items: center;
  gap: 0.75rem;
  align-self: stretch;
  border-radius: 0.75rem;
  border: 1px solid #e9ebec;
  background: #fff;
}

#shareModal .link-box-item {
  overflow: hidden;
  color: var(--Neutral-Black, #1a1a1a);
  text-overflow: ellipsis;
  font-family: Inter;
  font-size: 1rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.25rem; /* 125% */
  letter-spacing: -0.01rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  flex: 1 0 0;
}

#shareModal .link-box .divider {
  width: 0.0625rem;
  height: 0.9375rem;
  background: var(--Neutral-Border, #d5d8dd);
}

#shareModal .copy-btn {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

#shareModal .copy-btn span {
  color: var(--Pine-Green, #008578);
  font-family: Inter;
  font-size: 1rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.25rem;
  letter-spacing: -0.01rem;
}

#shareModal .share-via-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  align-self: stretch;
}

#shareModal .share-via-text {
  color: var(--Neutral-Black, #1a1a1a);
  font-family: Inter;
  font-size: 1.125rem;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.01125rem;
  align-self: stretch;
}

#shareModal .share-via-icons-container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  align-self: stretch;
}

#shareModal .platform-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
}

#shareModal .platform-icon span {
  color: var(--Neutral-Black, #1a1a1a);
  font-family: Inter;
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
  line-height: 1.125rem;
  letter-spacing: -0.00875rem;
}

#shareModal .platform-icon-image {
  display: flex;
  padding: 1rem;
  align-items: center;
  gap: 0.5rem;
  border-radius: 62.5rem;
  background: #f4f5f6;
}

#shareModal .platform-icon-image img {
  width: 2.5rem;
  height: 2.5rem;
  aspect-ratio: 1/1;
}

/* Mobile View */
@media screen and (max-width: 768px) {
  #shareModal .modal-container {
    width: 100%;
  }

  #shareModal .modal-header {
    padding: 1.5rem;
  }

  #shareModal .modal-body {
    padding: 0.5rem 1.5rem 1.5rem 1.5rem;
  }

  #shareModal .link-box {
    padding: 0.875rem;
  }

  #shareModal .platform-icon-image {
    padding: 0.75rem;
  }

  #shareModal .platform-icon-image img {
    width: 2rem;
    height: 2rem;
  }

  #shareModal .platform-icon span {
    font-size: 0.75rem;
  }

  #shareModal .link-text,
  #shareModal .share-via-text {
    font-size: 1rem;
  }

  #shareModal .copy-btn span {
    font-size: 0.875rem;
  }

  #shareModal .modal-header .text {
    font-size: 1.25rem;
    line-height: 1.5rem;
  }
}
