/* ================================
   WOC Shopping Assistant – Public UI
   Envato-safe, mobile/iOS hardened
   ================================ */

#wcsa-assistant-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: inherit;
}

/* ================================
   Toggle button (Shopping Assistant)
   Always black, always readable
   ================================ */

#wcsa-assistant-root .wcsa-toggle {
  padding: 9px 12px;
  border-radius: 999px;

  cursor: pointer;
  user-select: none;

  background-color: #000;
  border: 2px solid #000;

  color: #fff;
  -webkit-text-fill-color: #fff;

  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  appearance: none;
  -webkit-appearance: none;
}

#wcsa-assistant-root .wcsa-toggle:hover,
#wcsa-assistant-root .wcsa-toggle:active {
  background-color: #111;
  border-color: #111;

  color: #fff;
  -webkit-text-fill-color: #fff;
}

#wcsa-assistant-root .wcsa-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}

/* ================================
   Panel
   ================================ */

#wcsa-assistant-root .wcsa-panel {
  width: 320px;
  max-width: calc(100vw - 40px);
  margin-top: 10px;
  padding: 10px;

  background: #fff;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 12px;
}

/* ================================
   Messages
   ================================ */

#wcsa-assistant-root .wcsa-messages {
  height: 220px;
  overflow: auto;

  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;

  padding: 8px;
  margin-bottom: 10px;

  font-size: 12.5px;
  line-height: 1.35;
}

#wcsa-assistant-root .wcsa-msg {
  padding: 7px 9px;
  border-radius: 10px;
  margin: 6px 0;

  white-space: pre-wrap;

  font-size: inherit;
  line-height: inherit;
}

#wcsa-assistant-root .wcsa-msg--user {
  background: rgba(0,0,0,.06);
}

#wcsa-assistant-root .wcsa-msg--assistant {
  background: rgba(0,120,255,.10);
}

#wcsa-assistant-root .wcsa-msg--system {
  background: rgba(0,0,0,.04);
  border: 1px dashed rgba(0,0,0,.18);

  padding: 6px 8px;

  font-size: 11.5px;
  line-height: 1.3;
  opacity: 0.9;
}

/* ================================
   Form (input + send)
   ================================ */

#wcsa-assistant-root .wcsa-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

#wcsa-assistant-root .wcsa-input {
  flex: 1 1 auto;
  min-width: 0;

  padding: 7px 9px;

  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);

  font-size: 12.5px;
  line-height: 1.2;

  appearance: none;
  -webkit-appearance: none;
}

/* ================================
   Send button (Always black, iOS-safe)
   Works for <button> AND any leftover input submit.
   ================================ */

#wcsa-assistant-root .wcsa-send,
#wcsa-assistant-root button.wcsa-send,
#wcsa-assistant-root input.wcsa-send,
#wcsa-assistant-root input[type="submit"].wcsa-send {
  flex: 0 0 auto;
  flex-shrink: 0;

  min-width: 96px;
  min-height: 38px;

  padding: 0 14px;
  border-radius: 10px;

  cursor: pointer;
  user-select: none;

  background-color: #000;
  border: 2px solid #000;

  color: #fff;
  -webkit-text-fill-color: #fff;

  font-size: 12.5px;
  font-weight: 700;

  white-space: nowrap;
  text-align: center;

  /* Vertical centering across browsers */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  appearance: none;
  -webkit-appearance: none;
}

/* If it ends up being an <input>, line-height helps iOS text rendering */
#wcsa-assistant-root input.wcsa-send,
#wcsa-assistant-root input[type="submit"].wcsa-send {
  line-height: 38px;
}

#wcsa-assistant-root .wcsa-send:hover,
#wcsa-assistant-root .wcsa-send:active {
  background-color: #111;
  border-color: #111;

  color: #fff;
  -webkit-text-fill-color: #fff;
}

#wcsa-assistant-root .wcsa-send:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.25);
}

/* ================================
   Mobile tuning
   ================================ */

@media (max-width: 768px) {
  #wcsa-assistant-root {
    right: 12px;
    bottom: 12px;
  }

  #wcsa-assistant-root .wcsa-panel {
    max-width: calc(100vw - 24px);
  }

  #wcsa-assistant-root .wcsa-send,
  #wcsa-assistant-root button.wcsa-send,
  #wcsa-assistant-root input.wcsa-send,
  #wcsa-assistant-root input[type="submit"].wcsa-send {
    min-width: 102px;
    min-height: 40px;
    font-size: 13px;
  }

  #wcsa-assistant-root input.wcsa-send,
  #wcsa-assistant-root input[type="submit"].wcsa-send {
    line-height: 40px;
  }
}