/* Модалка «Поделиться» — как в плеерах 1BIG+ */
.share-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.share-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.share-modal {
  width: min(560px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 18, 0.92);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.65);
  padding: 1rem 1rem 0.9rem;
}

.share-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.share-modal__title {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: #fff;
}

.share-modal__sub {
  margin-top: 0.25rem;
  font-size: 0.92rem;
  color: rgba(185, 181, 201, 0.92);
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.share-modal__close {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.92);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.share-modal__close:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.share-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.share-tile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.share-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.share-tile:active {
  transform: translateY(1px) scale(0.99);
}

.share-tile--primary {
  border-color: rgba(45, 212, 191, 0.35);
  background: linear-gradient(165deg, rgba(45, 212, 191, 0.12), rgba(45, 212, 191, 0.03));
}

.share-tile--primary:hover {
  border-color: rgba(45, 212, 191, 0.55);
  background: linear-gradient(165deg, rgba(45, 212, 191, 0.16), rgba(45, 212, 191, 0.05));
}

.share-tile__ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.92);
  flex: 0 0 auto;
}

.share-tile__img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.share-tile--primary .share-tile__ico {
  border-color: rgba(45, 212, 191, 0.35);
  color: rgba(125, 211, 252, 0.95);
}

.share-tile__label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
}

.share-modal__status {
  margin-top: 0.75rem;
  min-height: 1.25rem;
  font-size: 0.86rem;
  color: rgba(125, 211, 252, 0.95);
}

@media (max-width: 420px) {
  .share-modal-overlay {
    padding: 0.75rem;
  }

  .share-modal {
    padding: 0.9rem;
    max-height: calc(100dvh - 1.5rem);
  }

  .share-grid {
    gap: 0.55rem;
  }

  .share-tile {
    padding: 0.7rem;
    border-radius: 14px;
  }
}

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