/* Roopt AIサポート チャットウィジェット v1
 * roopt-web 規約: カラーは CSS 変数(--green 系)・フォントは var(--font-ja)。明朝体は使用不可 */
.rc-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  font-family: var(--font-ja);
}
.rc-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.rc-toggle:hover { filter: brightness(1.05); }
.rc-panel {
  position: absolute;
  right: 0;
  bottom: 56px;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.rc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--green);
  color: #fff;
}
.rc-title { font-weight: 700; font-size: 15px; }
.rc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px;
}
.rc-close {
  margin-left: auto;
  border: none;
  background: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.rc-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f7f8f7;
}
.rc-note {
  font-size: 11px;
  color: #666;
  background: #fff;
  border: 1px solid #e5e7e5;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.5;
}
.rc-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.rc-user {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.rc-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e5e7e5;
  color: #222;
  border-bottom-left-radius: 4px;
}
.rc-assistant a { color: var(--green); text-decoration: underline; }
.rc-typing { color: #999; letter-spacing: 3px; }
.rc-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e7e5;
  background: #fff;
}
.rc-input {
  flex: 1;
  resize: none;
  border: 1px solid #d5d8d5;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.4;
}
.rc-input:focus { outline: 2px solid var(--green); border-color: transparent; }
.rc-send {
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 0 16px;
  cursor: pointer;
}
.rc-send:disabled { opacity: 0.5; cursor: default; }
@media (max-width: 640px) {
  .rc-root { right: 10px; bottom: 10px; }
  .rc-panel { bottom: 52px; }
}
