/* EMF Signal — Minimal Share System */

/* ── Share Trigger (the only visible element) ──────────── */
.share-trigger {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: var(--primary, #2563eb);
  color: white;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  padding: 0;
  opacity: 0;
  transition: opacity 0.2s, background 0.15s, transform 0.15s;
  z-index: 2;
}

/* Show on card hover (desktop) */
.news-item:hover .share-trigger,
.hero-banner:hover .share-trigger {
  opacity: 1;
}

/* Always show on touch devices */
@media (hover: none) {
  .share-trigger { opacity: 0.7; }
}

.share-trigger:hover {
  background: var(--primary-dark, #1d4ed8);
  transform: scale(1.08);
}

/* Active state when menu is open */
.share-trigger.active {
  opacity: 1;
  background: var(--primary-dark, #1d4ed8);
}

/* ── Dropdown Menu ─────────────────────────────────────── */
.share-menu {
  position: absolute;
  bottom: 2.5rem;
  right: 0.75rem;
  background: white;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  padding: 6px;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px) scale(0.97);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 10;
}

.share-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.share-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--text, #1e293b);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.1s;
  text-align: left;
  white-space: nowrap;
}

.share-menu-item:hover {
  background: #f1f5f9;
}

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

.share-menu-divider {
  height: 1px;
  background: var(--border, #e2e8f0);
  margin: 4px 8px;
}

/* Feedback text for copy */
.share-menu-item.copied {
  color: #16a34a;
}

/* ── Card needs relative positioning for the trigger ──── */
.news-item {
  position: relative;
}

/* ── Hero banner share trigger (light version) ─────────── */
.hero-banner {
  position: relative;
}

.hero-banner .share-trigger {
  background: #059669;
  color: white;
  opacity: 0.8;
}

.hero-banner .share-trigger:hover,
.hero-banner .share-trigger.active {
  background: #047857;
  opacity: 1;
}

/* Breaking banner (red theme) */
.breaking-banner .share-trigger {
  background: #dc2626;
}
.breaking-banner .share-trigger:hover,
.breaking-banner .share-trigger.active {
  background: #b91c1c;
}

.hero-banner .share-menu {
  /* Same dropdown, just positioned in banner */
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 600px) {
  .share-trigger {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .share-menu {
    right: 0.5rem;
    min-width: 170px;
  }
}

/* ── Card Generator Tool Styles ────────────────────────── */
.card-tool {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card-tool h2 {
  margin-bottom: 1rem;
  border: none;
}

.card-tool .form-group {
  margin-bottom: 1rem;
}

.card-tool label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--text, #1e293b);
}

.card-tool input,
.card-tool textarea,
.card-tool select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

.card-tool textarea {
  min-height: 80px;
  resize: vertical;
}

.card-tool .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary, #2563eb);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.card-tool .btn:hover {
  background: var(--primary-dark, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.card-tool .btn-secondary {
  background: #64748b;
}

.card-tool .btn-secondary:hover {
  background: #475569;
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
}

.card-tool .preview-canvas {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  width: 100%;
  max-width: 600px;
  margin: 1rem 0;
}

.card-tool .button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
