/*
 * My Chatbot Pro Universal — Widget stylesheet
 *
 * Fix K1: CSS geëxtraheerd uit mychat.js (style.textContent) naar dit
 * externe bestand. WordPress laadt het via wp_enqueue_style() en voegt
 * automatisch het juiste CSP-nonce-attribuut toe via wp_style_attributes.
 * Hierdoor werkt de widget correct onder een strikte Content-Security-Policy
 * zonder unsafe-inline in style-src.
 *
 * Let op: de headerkleur (.mychat-header background) wordt dynamisch
 * ingesteld via element.style.background in mychat.js op basis van de
 * admininstelling. Dat is een inline style op een enkel element — dit
 * valt onder de script-nonce, niet de style-src, en werkt correct.
 */

.mychat-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 340px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  z-index: 9999;
}

.mychat-wrap.mychat-is-hidden {
  display: none !important;
}

.mychat-box {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  overflow: hidden;
}

.mychat-header {
  padding: 10px 12px;
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mychat-header .left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mychat-header img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255, 255, 255, .067);
}

.mychat-sub {
  font-size: 11px;
  opacity: .9;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mychat-sub .dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  display: inline-block;
}

.mychat-title {
  font-size: 14px;
  line-height: 1.2;
}

.mychat-messages {
  height: 300px;
  overflow: auto;
  padding: 12px;
  line-height: 1.45;
  background: #fff;
}

.mychat-msg {
  margin: 6px 0;
}

.mychat-msg.u {
  text-align: right;
}

.mychat-bubble {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  max-width: 92%;
}

.mychat-msg.u .mychat-bubble {
  background: #e0f2fe;
}

.mychat-msg.b .mychat-bubble {
  background: #f3f4f6;
}

.mychat-input {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.mychat-input input[type="text"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.mychat-input button {
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  cursor: pointer;
}

.mychat-disclaimer {
  font-size: 11px;
  color: #6b7280;
  padding: 6px 12px;
  border-top: 1px solid #f1f5f9;
  background: #fcfcfd;
}

.mychat-toggle {
  background: none;
  border: 0;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  opacity: .95;
}

.mychat-msg a {
  color: #1d4ed8;
  text-decoration: underline;
  word-break: break-word;
}

.mychat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 2px;
}

.mychat-choice-btn {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.mychat-choice-btn:hover {
  background: #f9fafb;
}

.mychat-choice-btn[disabled] {
  opacity: .6;
  cursor: not-allowed;
}

.mychat-visually-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
