/* ============================================================
   copy.css — Copy button styles (mobile-friendly 44px)
   Pair with /assets/copy.js
   ============================================================ */

.copy-btn,
.copy-btn-sm,
.copy-btn-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 99px;
  background: var(--pink-500, #ec4899);
  color: white;
  font: 700 14px/1 'IBM Plex Sans Thai', sans-serif;
  cursor: pointer;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 44px;        /* Apple HIG / WCAG touch target */
  min-width: 44px;
  padding: 12px 20px;
  box-shadow: 0 2px 6px -2px rgba(236, 72, 153, 0.4);
}
.copy-btn:hover,
.copy-btn-sm:hover,
.copy-btn-lg:hover {
  background: var(--pink-700, #be185d);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px -4px rgba(236, 72, 153, 0.5);
}
.copy-btn:active { transform: translateY(0); }
.copy-btn.copied,
.copy-btn-sm.copied,
.copy-btn-lg.copied {
  background: var(--mint-500, #10b981) !important;
  box-shadow: 0 2px 6px -2px rgba(16, 185, 129, 0.4);
}
.copy-btn.failed {
  background: #ef4444 !important;
}

.copy-btn-sm {
  padding: 8px 14px;
  font-size: 12px;
  min-height: 36px;
}
.copy-btn-lg {
  padding: 16px 28px;
  font-size: 16px;
  min-height: 52px;
}

/* Inline copy button (right-aligned inside a prompt box) */
.copy-inline {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

/* "Copy all" button (above a section) */
.copy-all-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.copy-all-bar .copy-btn-sm { background: var(--plum-700, #6b21a8); }
.copy-all-bar .copy-btn-sm:hover { background: var(--plum-900, #4c1d95); }

/* Toast for global "copied" feedback (no specific btn) */
.copy-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--mint-700, #047857);
  color: white;
  padding: 12px 24px;
  border-radius: 99px;
  font: 700 14px/1 'IBM Plex Sans Thai', sans-serif;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transition: all .25s;
  z-index: 9999;
  max-width: 90vw;
}
.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .copy-btn, .copy-btn-lg {
    padding: 12px 18px;
    font-size: 13px;
  }
  .copy-inline { top: 6px; right: 6px; }
  .copy-all-bar { justify-content: stretch; }
  .copy-all-bar > * { flex: 1; }
}
