/* catch-multi/catch-bot-widget.css
 * 全 class は cbw- プレフィックス / z-index 9999 で FAQ ボットと不衝突
 */
.cbw-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  font-family: system-ui, -apple-system, 'Hiragino Sans', 'Yu Gothic',
               'Microsoft YaHei', 'Malgun Gothic', sans-serif;
}
.cbw-root[hidden] { display: none; }
.cbw-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.cbw-card {
  position: relative;
  max-width: 480px;
  width: calc(100% - 32px);
  margin: 5vh auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}
.cbw-root[dir="rtl"] .cbw-card { text-align: right; }
.cbw-close {
  position: absolute; top: 8px; right: 12px;
  background: none; border: none;
  font-size: 24px; line-height: 1; cursor: pointer; color: #666;
  padding: 4px 8px;
}
.cbw-root[dir="rtl"] .cbw-close { right: auto; left: 12px; }
.cbw-title { margin: 0 0 8px; font-size: 1.25em; }
.cbw-subtitle { margin: 0 0 16px; color: #666; font-size: 0.9em; }
.cbw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.cbw-grid-cell {
  padding: 10px 6px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: inherit;
}
.cbw-grid-cell:hover { background: #e8e8e8; }
.cbw-grid-cell:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.cbw-divider {
  text-align: center;
  color: #999;
  font-size: 0.85em;
  margin: 12px 0;
}
.cbw-form {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.cbw-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  font-family: inherit;
  min-width: 0;
}
.cbw-submit {
  padding: 8px 16px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
}
.cbw-submit:disabled { opacity: 0.5; cursor: wait; }
.cbw-status {
  min-height: 1.4em;
  margin-bottom: 8px;
  font-size: 0.9em;
  color: #666;
}
.cbw-skip {
  background: none;
  border: none;
  color: #2563eb;
  cursor: pointer;
  font-size: 0.9em;
  padding: 4px;
}
.cbw-skip-emphasized {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 600;
  color: #92400e;
}

/* §7E Picture Prompt */
.cbw-picture-prompt {
  text-align: center;
}
.cbw-emoji-display {
  font-size: 4rem;
  text-align: center;
  padding: 0.5rem 0;
  transition: opacity 0.3s ease;
}
.cbw-emoji-display.cbw-fade {
  opacity: 0;
}
.cbw-prompt-form {
  display: flex;
  gap: 0.5rem;
  margin: 0.5rem auto;
  max-width: 280px;
}
.cbw-prompt-input {
  flex: 1;
  font-size: 1rem;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: center;
}
.cbw-prompt-input:focus {
  outline: 2px solid #4a90d9;
  border-color: #4a90d9;
}
.cbw-prompt-next {
  min-width: 3rem;
  font-size: 1.2rem;
  border: none;
  background: #4a90d9;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}
.cbw-prompt-next:hover {
  background: #357abd;
}
.cbw-prompt-next:disabled {
  background: #aaa;
  cursor: not-allowed;
}
.cbw-prompt-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}
.cbw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  transition: background 0.3s;
}
.cbw-dot-active {
  background: #4a90d9;
}
.cbw-dot-done {
  background: #4caf50;
}
/* §7F-1 言語確認 */
.cbw-confirm {
  text-align: center;
  padding: 1rem 0;
}
.cbw-confirm-text {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0 0 1.5rem;
  line-height: 1.4;
}
.cbw-confirm-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.cbw-confirm-yes {
  min-width: 200px;
  padding: 14px 24px;
  font-size: 1.1rem;
  font-weight: 600;
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.cbw-confirm-yes:hover {
  background: #388e3c;
}
.cbw-confirm-yes:focus-visible {
  outline: 3px solid #2e7d32;
  outline-offset: 2px;
}
.cbw-confirm-retry {
  min-width: 200px;
  padding: 12px 24px;
  font-size: 1rem;
  background: #e0e0e0;
  color: #555;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.cbw-confirm-retry:hover {
  background: #bdbdbd;
}
.cbw-confirm-retry:focus-visible {
  outline: 3px solid #9e9e9e;
  outline-offset: 2px;
}
