/* ===== Cross-App Media Share ===== */

/* Share context menu */
.share-menu {
  position: fixed;
  z-index: 10000;
  min-width: 180px;
  background: #f5f0e6;
  border: 1px solid #808080;
  border-right-color: #404040;
  border-bottom-color: #404040;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
  padding: 2px;
  font-family: var(--font-system);
  font-size: 12px;
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  color: #000;
}

.share-menu-item:hover {
  background: #0a246a;
  color: #fff;
}

.share-menu-icon {
  font-size: 14px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Share button (used on meme cards, lightboxes, etc.) */
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 13px;
  background: rgba(255,255,255,0.85);
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.15s;
}
.share-btn:hover {
  background: #fff;
  border-color: #f59500;
}

/* Meme picker modal */
.meme-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.meme-picker-modal {
  background: #f5f0e6;
  border: 2px solid #0a246a;
  border-radius: 0;
  width: 90%;
  max-width: 500px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
}

.meme-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: linear-gradient(180deg, #0a246a 0%, #3a6ea5 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-system);
}

.meme-picker-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.meme-picker-close:hover {
  color: #f59500;
}

.meme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 4px;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
}

.meme-picker-item {
  aspect-ratio: 1;
  border: 1px solid #d4d0c8;
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s;
}
.meme-picker-item:hover {
  border-color: #f59500;
  box-shadow: 0 0 4px rgba(245,149,0,0.3);
}
.meme-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Toast notifications */
.share-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 12px;
  font-family: var(--font-system);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  white-space: nowrap;
}
.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.share-toast-error {
  background: #c00;
}
