/* inc/posts/post-duplicator.php 共通スタイル
   - 一覧のコンパクトリンク（.duplicate-link）
   - 編集画面のプライマリボタン（.purimall-duplicate-primary-btn）
   - タップ後に開くポップオーバー（.purimall-duplicate-post-popover 以下、開閉は assets/js/post-duplicator.js）
*/

.duplicate-link {
  background: none;
  border: none;
  color: #ec4899;
  cursor: pointer;
  font: inherit;
  font-weight: bold;
  padding: 0;
  text-decoration: none;
}

.duplicate-link:hover {
  text-decoration: underline;
}

.purimall-duplicate-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  background: #3b82f6;
  color: #fff;
  border: none;
  padding: 0.5em 1.2em;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.95em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.purimall-duplicate-primary-btn:hover {
  background: #2563eb;
  color: #fff;
  text-decoration: none;
}

/* 選択肢が無い投稿タイプ（product 等）：即送信の小さいフォームをリンクと同じ行に収める */
.purimall-duplicate-post-form--simple {
  display: inline-flex;
  align-items: center;
  margin: 0 0.5em;
}

/* 選択肢がある投稿タイプ（talent_post 等）のトリガー：カードの高さに影響しない */
.js-purimall-duplicate-trigger {
  margin: 0 0.5em;
}

/* ポップオーバー本体。JS が position:fixed の座標を計算して document.body 直下へ移動するため、
   overflow: hidden なカード（.talent-post-card 等）の内側にあっても切り取られない。 */
.purimall-duplicate-post-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2000;
  width: max-content;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 2rem));
  box-sizing: border-box;
}

.purimall-duplicate-post-popover[hidden] {
  display: none;
}

.purimall-duplicate-post-panel {
  padding: 0.9em 1em;
  background: #fff;
  border: 1px solid #f9a8d4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  text-align: left;
  font-size: 0.85em;
}

.purimall-duplicate-post-choices {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  margin-bottom: 0.75em;
}

.purimall-duplicate-post-option {
  display: flex;
  align-items: center;
  gap: 0.4em;
  color: #444;
  font-weight: normal;
  cursor: pointer;
}

.purimall-duplicate-post-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.75em;
  flex-wrap: wrap;
}

.purimall-duplicate-post-submit {
  background: #ec4899;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4em 1em;
  font-weight: bold;
  font-size: 0.9em;
  cursor: pointer;
}

.purimall-duplicate-post-submit:hover {
  background: #db2777;
}

.purimall-duplicate-post-cancel {
  background: none;
  border: none;
  color: #666;
  font-size: 0.9em;
  cursor: pointer;
  padding: 0.4em 0.2em;
}

.purimall-duplicate-post-cancel:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .purimall-duplicate-post-panel {
    font-size: 0.9em;
  }
}
