/**
 * doc-helper.css - doc-helper.js 用スタイル定義
 */

/* --- 1. コードコピーボタン (#428) --- */
.doc-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(2px);
  user-select: none;
}

pre:hover .doc-copy-btn,
.helpExample:hover .doc-copy-btn,
.doc-copy-btn:hover {
  opacity: 1;
  color: #1e293b;
  border-color: #94a3b8;
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.doc-copy-btn.copied {
  opacity: 1 !important;
  color: #10b981 !important;
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
}

/* --- トースト通知 --- */
.doc-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #f8fafc;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 99999;
}

.doc-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- 3. クイックコマンドパレット (#432) --- */
.doc-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 15vh;
  box-sizing: border-box;
}

.doc-palette-window {
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: docPaletteFadeIn 0.15s ease-out;
}

@keyframes docPaletteFadeIn {
  from { opacity: 0; transform: scale(0.97) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.doc-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.doc-palette-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: #1e293b;
  background: transparent;
  padding: 0;
}

.doc-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
}

.doc-palette-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none !important;
  color: #334155;
  transition: background 0.12s ease;
  cursor: pointer;
  margin-bottom: 2px;
}

.doc-palette-item:hover,
.doc-palette-item.selected {
  background: #f1f5f9;
  color: #0f172a;
}

.doc-palette-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  margin-right: 12px;
  min-width: 58px;
  text-align: center;
}

.doc-palette-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-palette-arrow {
  color: #94a3b8;
  font-size: 13px;
  margin-left: 8px;
}

.doc-palette-empty {
  padding: 30px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.doc-palette-footer {
  display: flex;
  gap: 16px;
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
  color: #64748b;
}

.doc-palette-footer kbd {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 10px;
  margin: 0 2px;
  color: #334155;
}
