/* ========================================================================== */
/* SHARE BOTTOM SHEET                                                         */
/* ========================================================================== */

/* Backdrop */
.share-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.share-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Sheet panel */
.share-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--web-bg, #fff);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.12);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 28px;
  -webkit-overflow-scrolling: touch;
}
.share-sheet.open {
  transform: translateY(0);
}

/* Drag handle */
.share-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  cursor: grab;
}
.share-sheet-handle span {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--web-grey, #9CA3AF);
  opacity: .5;
}

/* Header */
.share-sheet-header {
  padding: 8px 0 16px;
}
.share-sheet-subtitle {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--web-text-muted, #6B6B6C);
  margin-bottom: 4px;
}
.share-sheet-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--web-text-primary, #1E1E1F);
  line-height: 1.3;
}

/* Section dividers */
.share-sheet-section {
  padding: 4px 0;
}
.share-sheet-section + .share-sheet-section {
  border-top: 1px solid var(--web-border, #D1D1D2);
  padding-top: 12px;
  margin-top: 4px;
}

/* Platform button grid */
.share-sheet-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.share-sheet-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  min-width: 60px;
  -webkit-tap-highlight-color: transparent;
}
.share-sheet-btn:active .share-sheet-icon {
  transform: scale(.9);
}
.share-sheet-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  transition: transform .15s ease;
}
.share-sheet-label {
  font-size: .72rem;
  color: var(--web-text-secondary, #4B4B4C);
  white-space: nowrap;
}

/* Action list items (email, copy, qr) */
.share-sheet-actions {
  border-top: 1px solid var(--web-border, #D1D1D2);
  margin-top: 4px;
  padding-top: 8px;
}
.share-sheet-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  padding: 6px 4px;
  cursor: pointer;
  font-size: .92rem;
  color: var(--web-text-primary, #1E1E1F);
  border-radius: 10px;
  transition: background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.share-sheet-action:hover {
  background: var(--web-surface, #F2F2F3);
}
.share-sheet-action:active {
  background: var(--web-border, #D1D1D2);
}
.share-sheet-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--web-surface, #F2F2F3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--web-text-secondary, #4B4B4C);
  flex-shrink: 0;
}

/* QR Code area */
.share-sheet-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 8px;
  animation: shareQRFade .25s ease;
}
.share-sheet-qr canvas,
.share-sheet-qr img {
  border-radius: 12px;
  max-width: 180px;
  width: 100%;
  height: auto;
}
.share-sheet-qr-hint {
  font-size: .75rem;
  color: var(--web-text-muted, #6B6B6C);
  margin-top: 8px;
}
@keyframes shareQRFade {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Copied feedback */
.share-sheet-action.copied {
  color: var(--web-green, #4E9C7D);
}
.share-sheet-action.copied .share-sheet-action-icon {
  background: var(--web-green, #4E9C7D);
  color: #fff;
}

/* Desktop: modal centrado en vez de bottom sheet */
@media (min-width: 768px) {
  .share-sheet {
    inset: 0;
    margin: auto;
    width: 400px;
    height: fit-content;
    max-height: 80vh;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    padding: 24px 24px;
    transform: scale(.92);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.32,.72,0,1), opacity .25s ease;
  }
  .share-sheet.open {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .share-sheet-handle {
    display: none;
  }
}


