/* Share Modal Styles - Centered, Larger Preview */
.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
}

.share-sheet.activo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.share-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-overlay, rgba(12, 22, 36, 0.75));
  backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.share-sheet-panel {
  position: relative;
  width: min(420px, 95%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--modal-superficie, var(--color-secundario, #112b46));
  border: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.2));
  border-radius: 20px;
  box-shadow: var(--modal-sombra, 0 24px 64px rgba(3, 11, 22, 0.5));
  animation: shareSheetIn 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes shareSheetIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.share-sheet-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.12));
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--fondo-blur, rgba(255, 255, 255, 0.03));
  border-radius: 20px 20px 0 0;
}

.share-sheet-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-texto-claro, #f5f7fb);
}

.share-sheet-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fondo-blur, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.12));
  color: var(--color-texto-claro, #f5f7fb);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.15s ease;
}

.share-sheet-close:hover {
  background: var(--color-acento, #f5c75c);
  border-color: var(--color-acento, #f5c75c);
  color: var(--color-texto-oscuro, #11253f);
  transform: rotate(90deg);
}

.share-sheet-img-upload {
  padding: 1rem 1.25rem;
  text-align: center;
  background: var(--fondo-blur, rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.08));
}

.share-sheet-img-upload .share-sheet-img-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, rgba(245, 199, 92, 0.12) 0%, rgba(245, 199, 92, 0.06) 100%);
  border: 1px solid rgba(245, 199, 92, 0.25);
  border-radius: 24px;
  margin-bottom: 0.75rem;
  transition: all 0.15s ease;
  color: var(--color-acento, #f5c75c);
  font-weight: 600;
  font-size: 0.85rem;
}

.share-sheet-img-upload .share-sheet-img-label:hover {
  background: linear-gradient(135deg, rgba(245, 199, 92, 0.2) 0%, rgba(245, 199, 92, 0.1) 100%);
  border-color: rgba(245, 199, 92, 0.4);
}

.share-sheet-img-upload .share-sheet-img-label .fa {
  font-size: 0.9rem;
}

.share-sheet-img-upload input[type="file"] {
  display: none;
}

.share-sheet-img-preview {
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.15));
  border-radius: 12px;
  background: var(--color-primario, #0d1f33);
  margin: 0 auto;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.share-sheet-img-preview.visible {
  display: block;
  animation: imgPreviewIn 0.25s ease forwards;
}

@keyframes imgPreviewIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.share-sheet-actions {
  padding: 1rem 1.25rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.share-sheet-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  background: var(--modal-item, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.12));
  color: var(--color-texto-claro, #f5f7fb);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 14px;
  transition: all 0.15s ease;
}

.share-sheet-action:hover {
  background: var(--fondo-blur, rgba(255, 255, 255, 0.08));
  border-color: var(--modal-borde, rgba(245, 199, 92, 0.25));
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.share-sheet-action:active {
  transform: translateY(0) scale(0.97);
}

.share-sheet-action .fa,
.share-sheet-action .fab {
  font-size: 1.35rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--fondo-blur, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--modal-borde, rgba(245, 199, 92, 0.12));
}

.share-sheet-action span {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Action-specific colors */
.share-sheet-action.native .fa-share-alt { color: var(--color-boton, #1ea76f); }
.share-sheet-action.native:hover .fa-share-alt { color: var(--color-boton-hover, #16915e); }
.share-sheet-action.native:hover { border-color: rgba(30, 167, 111, 0.35); box-shadow: 0 6px 16px rgba(30, 167, 111, 0.12); }

.share-sheet-action.whatsapp .fa-whatsapp { color: #25d366; }
.share-sheet-action.whatsapp:hover { border-color: rgba(37, 211, 102, 0.35); box-shadow: 0 6px 16px rgba(37, 211, 102, 0.12); }
.share-sheet-action.whatsapp:hover .fa-whatsapp { color: #4ade80; }

.share-sheet-action.copy .fa-link { color: var(--color-acento, #f5c75c); }
.share-sheet-action.copy:hover { border-color: rgba(245, 199, 92, 0.35); box-shadow: 0 6px 16px rgba(245, 199, 92, 0.12); }
.share-sheet-action.copy:hover .fa-link { color: #ffe08a; }

/* Scrollbar */
.share-sheet-panel::-webkit-scrollbar { width: 4px; }
.share-sheet-panel::-webkit-scrollbar-track { background: transparent; }
.share-sheet-panel::-webkit-scrollbar-thumb { background: var(--modal-borde, rgba(245, 199, 92, 0.3)); border-radius: 2px; }
.share-sheet-panel::-webkit-scrollbar-thumb:hover { background: var(--color-acento, #f5c75c); }

/* Responsive */
@media (max-width: 480px) {
  .share-sheet.activo {
    padding: 1rem;
  }
  
  .share-sheet-panel {
    width: 100%;
    max-height: 80vh;
    border-radius: 16px;
  }
  
  .share-sheet-actions {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.75rem 1rem 1rem;
  }
  
  .share-sheet-action {
    flex-direction: row;
    justify-content: center;
    padding: 0.85rem 0.5rem;
    gap: 0.5rem;
  }
  
  .share-sheet-action .fa,
  .share-sheet-action .fab {
    width: 34px;
    height: 34px;
    font-size: 1.15rem;
  }
  
  .share-sheet-action span {
    font-size: 0.7rem;
    text-transform: none;
  }
  
  .share-sheet-header { padding: 0.75rem 1rem; }
  .share-sheet-img-upload { padding: 0.75rem 1rem; }
  
  .share-sheet-img-label { padding: 0.5rem 1rem; font-size: 0.8rem; }
  .share-sheet-img-preview { max-height: 240px; }
}

@media (max-width: 340px) {
  .share-sheet.activo { padding: 0.75rem; }
  .share-sheet-actions { gap: 0.4rem; }
  .share-sheet-action { padding: 0.75rem 0.4rem; gap: 0.4rem; }
  .share-sheet-action .fa, .share-sheet-action .fab { width: 30px; height: 30px; font-size: 1rem; }
  .share-sheet-action span { font-size: 0.65rem; }
  .share-sheet-img-preview { max-height: 200px; }
}