/* Base reset for the widget only */
.skillful-overlay, .skillful-modal, .skillful-modal * {
  box-sizing: border-box;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.skillful-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.skillful-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
}

.skillful-modal {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: #141418;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
}

.skillful-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.skillful-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skillful-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}

.skillful-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.skillful-online-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  border: 2px solid #141418;
}

.skillful-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.skillful-subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 12px;
  margin-top: 2px;
}

.skillful-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.skillful-btn-secondary {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}

.skillful-btn-secondary:hover {
  border-color: rgba(236,72,153,0.7);
}

.skillful-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
}

.skillful-btn-icon:hover {
  border-color: rgba(236,72,153,0.7);
}

.skillful-messages {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 240px;
}

.skillful-row {
  display: flex;
  margin: 10px 0;
}

.skillful-row-left { justify-content: flex-start; }
.skillful-row-right { justify-content: flex-end; }

.skillful-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
}

.skillful-bubble-assistant {
  background: #1a1a1f;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  border-top-left-radius: 6px;
}

.skillful-bubble-user {
  background: #ec4899;
  color: #fff;
  border-top-right-radius: 6px;
}

.skillful-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.skillful-inputbar {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  align-items: flex-end;
  background: rgba(255,255,255,0.02);
}

.skillful-textarea {
  flex: 1;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: #101014;
  color: #fff;
  outline: none;
  resize: none;
  min-height: 46px;
  max-height: 120px;
}

.skillful-textarea::placeholder {
  color: rgba(255,255,255,0.45);
}

.skillful-textarea:focus {
  border-color: rgba(236,72,153,0.75);
}

.skillful-send {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 0;
  background: #ec4899;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.skillful-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Typing indicator */
.skillful-typing {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.skillful-typing-label {
  font-size: 13px;
  color: rgba(255,255,255,0.70);
}

.skillful-dots {
  display: inline-flex;
  gap: 5px;
}

.skillful-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(236,72,153,0.95);
  animation: skillfulDot 1.1s infinite ease-in-out;
}

.skillful-dots span:nth-child(2) { animation-delay: 0.15s; }
.skillful-dots span:nth-child(3) { animation-delay: 0.30s; }

@keyframes skillfulDot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
  40% { transform: translateY(-6px); opacity: 1; }
}

/* Send button polish */
.skillful-send {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: #ec4899;
  color: #fff;
  cursor: pointer;

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

  font-size: 20px;
  line-height: 1;
  font-weight: 800;

  box-shadow: 0 10px 25px rgba(236,72,153,0.25);
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.skillful-send:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.skillful-send:active {
  transform: translateY(0);
}

.skillful-send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Make the arrow look centered and not “off” */
.skillful-send {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

.skillful-inputrow {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: 100%;
}
