/* =================================================================
   BizLink Share Panel — BF-155
   .shareBtn        trigger button (same visual weight as .favIconBtn)
   .sharePanel      floating container (bottom sheet or popover)
   ================================================================= */

/* Trigger button */
.shareBtn {
  appearance: none;
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-muted, #aaa);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.15s;
  position: relative;
  z-index: 1;
}

.shareBtn:hover {
  color: var(--brand-primary, #1558ef);
}

.shareBtn:focus-visible {
  outline: 2px solid rgba(21, 88, 239, 0.5);
  outline-offset: 2px;
}

/* Backdrop */
.sharePanel__backdrop {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(17, 24, 39, 0.35);
}

/* Base panel */
.sharePanel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 260px;
  max-width: 360px;
}

/* Mobile: bottom sheet (fixed to viewport) */
.sharePanel--sheet {
  position: fixed;
  z-index: 8001;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 100%;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}

/* Desktop: popover appended to body, coordinates injected via JS from getBoundingClientRect */
.sharePanel--popover {
  position: fixed;
  z-index: 8001;
  width: 280px;
  max-height: min(420px, calc(100vh - 24px));
  overflow-y: auto;
  border-radius: 12px;
}

/* Drag handle — mobile sheet only */
.sharePanel__handle {
  width: 36px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
  margin: 12px auto 4px;
  cursor: pointer;
}

/* Content preview */
.sharePanel__preview {
  padding: 12px 16px 10px;
  border-bottom: 1px solid #e5e7eb;
}

.sharePanel__previewTitle {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sharePanel__previewUrl {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Options list */
.sharePanel__options {
  padding: 8px 0;
}

.sharePanel__option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: #111827;
  text-align: left;
  transition: background 0.1s;
}

.sharePanel__option:hover {
  background: #f8f9fb;
}

.sharePanel__option:focus-visible {
  outline: 2px solid rgba(21, 88, 239, 0.5);
  outline-offset: -2px;
}

.sharePanel__optionIcon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f1f5f9;
}

.sharePanel__optionIcon svg {
  width: 18px;
  height: 18px;
}

.sharePanel__optionLabel {
  flex: 1;
  font-weight: 500;
}

/* Copied confirmation state */
.sharePanel__option--copied .sharePanel__optionLabel {
  color: #38a169;
}

/* Desktop close button */
.sharePanel__closeBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sharePanel__closeBtn:hover {
  color: #6b7280;
}
