.mt-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.mt-share-overlay.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.mt-share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.mt-share-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  background: #14141f;
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.mt-share-overlay.is-open .mt-share-sheet {
  transform: translateY(0);
}

@media (min-width: 520px) {
  .mt-share-overlay {
    align-items: center;
    padding: 1rem;
  }

  .mt-share-sheet {
    border-radius: 20px;
    max-width: 400px;
    transform: translateY(12px) scale(0.96);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }

  .mt-share-overlay.is-open .mt-share-sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.mt-share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.mt-share-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f8fafc;
}

.mt-share-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mt-share-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.mt-share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 0.5rem;
  margin-bottom: 1rem;
}

@media (max-width: 360px) {
  .mt-share-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mt-share-network {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.25rem;
  text-decoration: none;
  color: #e2e8f0;
  border-radius: 12px;
  transition: background 0.15s ease;
}

.mt-share-network:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.mt-share-network-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
}

.mt-share-network-label {
  font-size: 0.7rem;
  line-height: 1.2;
  text-align: center;
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-share-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mt-share-copy-btn,
.mt-share-native-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mt-share-copy-btn:hover,
.mt-share-native-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.mt-share-copy-btn.is-copied {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

body.mt-share-open {
  overflow: hidden;
}
