/* Return-share button + modal (assets/js/share.js, _includes/return-share.html) */

.jjs-wrap[hidden] { display: none !important; }

.jjs-open {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px;
  border: 1px solid var(--border, #30363d);
  background: none; color: var(--text-secondary, #8b949e);
  font-size: 0.8rem; cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.jjs-open:hover { background: var(--bg-card, #161b22); color: var(--text-primary, #e6edf3); border-color: #58a6ff; }
.jjs-open svg { width: 14px; height: 14px; }

html.jjs-lock { overflow: hidden; }

.jjs-overlay {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(1, 4, 9, 0.72);
  align-items: center; justify-content: center; padding: 16px;
}
.jjs-overlay.open { display: flex; }

.jjs-box {
  position: relative;
  width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--bg-card, #161b22);
  border: 1px solid var(--border, #30363d);
  border-radius: 12px; padding: 18px 20px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.jjs-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-weight: 700; font-size: 0.95rem;
  color: var(--text-primary, #e6edf3);
}
.jjs-close {
  background: none; border: none; color: var(--text-secondary, #8b949e);
  font-size: 1.05rem; cursor: pointer; padding: 2px 6px; line-height: 1;
}
.jjs-close:hover { color: var(--text-primary, #e6edf3); }

.jjs-canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
  border-radius: 8px; border: 1px solid var(--border, #30363d);
  background: #0d1117;
}

.jjs-note {
  margin: 8px 0 14px; font-size: 0.72rem; color: var(--text-muted, #6e7681);
}

.jjs-actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
@media (max-width: 640px) { .jjs-actions { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .jjs-actions { grid-template-columns: repeat(2, 1fr); } }

.jjs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 10px; border-radius: 8px; border: 1px solid var(--border, #30363d);
  background: var(--bg-secondary, #0d1117); color: var(--text-primary, #e6edf3);
  font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.jjs-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.jjs-btn:hover { text-decoration: none; }
.jjs-li { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.jjs-li:hover { background: #004182; border-color: #004182; }
.jjs-li.busy { opacity: 0.6; cursor: progress; }
.jjs-x:hover { background: #000; border-color: #e6edf3; color: #fff; }
.jjs-kakao { background: #fee500; border-color: #fee500; color: #191919; }
.jjs-kakao:hover { background: #fada0a; border-color: #fada0a; }
.jjs-copy:hover, .jjs-save:hover { border-color: #58a6ff; color: #58a6ff; }

.jjs-guide {
  margin-top: 12px; padding: 12px 14px; border-radius: 8px;
  border: 1px solid #0a66c2; background: rgba(10, 102, 194, 0.12);
  font-size: 0.8rem; color: var(--text-primary, #e6edf3);
}
.jjs-guide[hidden] { display: none; }
.jjs-guide-title { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.jjs-guide-title svg { width: 14px; height: 14px; color: #0a66c2; flex-shrink: 0; }
.jjs-guide ol { margin: 0 0 10px; padding-left: 20px; line-height: 1.7; color: var(--text-secondary, #8b949e); }
.jjs-guide b { color: var(--text-primary, #e6edf3); }
.jjs-guide code { font-size: 0.75rem; color: #58a6ff; word-break: break-all; }
.jjs-guide-open {
  display: inline-block; padding: 7px 16px; border-radius: 6px;
  background: #0a66c2; color: #fff; font-weight: 700; text-decoration: none;
}
.jjs-guide-open:hover { background: #004182; text-decoration: none; }

.jjs-toast {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px);
  background: #e6edf3; color: #0d1117; font-size: 0.78rem; font-weight: 600;
  padding: 6px 14px; border-radius: 16px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; white-space: nowrap;
}
.jjs-toast.show { opacity: 1; transform: translate(-50%, 0); }
