.jobsie-live-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  height: 48px;
  padding: 6px 13px 6px 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #0f1d37;
  color: #eff6ff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.28);
  font: 800 14px/1 "Segoe UI", sans-serif;
}

.jobsie-live-core,
.jobsie-live-label,
.jobsie-live-ring,
.jobsie-live-status {
  pointer-events: none;
}

.jobsie-live-core {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  background: #0f172a url("/wp-content/uploads/2025/03/AiBlack2m.gif") center / cover no-repeat;
  color: transparent;
  text-shadow: none;
  font: 700 24px/1 "Segoe UI", sans-serif;
}

.jobsie-live-label {
  color: #ffffff;
  letter-spacing: 0;
}

.jobsie-live-ring {
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  opacity: 0;
}

.jobsie-live-status {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(8, 15, 31, 0.92);
  color: #e2e8f0;
  font: 600 12px/1 "Segoe UI", sans-serif;
  opacity: 0;
  transition: opacity 160ms ease;
}

.jobsie-live-bubble:hover .jobsie-live-status,
.jobsie-live-bubble.is-listening .jobsie-live-status,
.jobsie-live-bubble.is-speaking .jobsie-live-status {
  opacity: 1;
}

.jobsie-live-bubble.is-listening .jobsie-live-ring,
.jobsie-live-bubble.is-speaking .jobsie-live-ring {
  opacity: 1;
  animation: jobsie-live-pulse 1.1s ease-out infinite;
}

.jobsie-live-bubble.is-speaking {
  box-shadow: 0 28px 60px rgba(37, 99, 235, 0.3);
}

@keyframes jobsie-live-pulse {
  0% {
    transform: scale(0.88);
    opacity: 0.65;
  }
  100% {
    transform: scale(1.36);
    opacity: 0;
  }
}

.jobsie-assistant-panel {
  position: fixed;
  right: 18px;
  bottom: 76px;
  z-index: 9997;
  display: none;
  gap: 8px;
  width: min(360px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 96px));
  overflow: auto;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.22);
  font: 13px/1.35 "Segoe UI", sans-serif;
}

.jobsie-assistant-panel.is-visible {
  display: grid;
}

.jobsie-assistant-panel[hidden] {
  display: none !important;
}

.jobsie-assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.jobsie-assistant-head strong {
  color: #101827;
  font-size: 15px;
  line-height: 1.25;
}

.jobsie-assistant-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0 !important;
  background: #eef2f7 !important;
  color: #172033 !important;
  font-size: 19px !important;
  line-height: 1 !important;
}

.jobsie-assistant-intro {
  margin: 0;
  color: #526071;
  font-weight: 600;
}

.jobsie-assistant-state {
  padding: 8px 10px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f8fafc;
  color: #526071;
}

.jobsie-assistant-status {
  color: #172033;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.jobsie-assistant-response {
  max-height: 132px;
  overflow: auto;
  padding: 9px;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.jobsie-assistant-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.jobsie-assistant-panel button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: #0f1d37;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  font: 700 12px/1 "Segoe UI", sans-serif;
}

.jobsie-assistant-panel button:disabled,
.jobsie-text-fallback-input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.jobsie-assistant-primary,
.jobsie-assistant-context {
  grid-column: 1 / -1;
}

.jobsie-assistant-primary {
  background: #146c43 !important;
}

.jobsie-assistant-fallback {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.jobsie-assistant-stop,
.jobsie-assistant-text-toggle {
  background: #e5eaf1 !important;
  color: #172033 !important;
}

.jobsie-text-fallback {
  flex: 1 0 100%;
  display: none;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5eaf1;
}

.jobsie-text-fallback.is-visible {
  display: grid;
}

.jobsie-text-fallback-label {
  font-size: 12px;
  font-weight: 700;
  color: #526071;
}

.jobsie-text-fallback-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.jobsie-text-fallback-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 9px;
  color: #172033;
  font: 13px/1.3 "Segoe UI", sans-serif;
}

.jobsie-text-fallback-output {
  max-height: 150px;
  overflow: auto;
  padding: 9px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f8fafc;
  color: #172033;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.jobsie-form-proposal-panel {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 9998;
  display: none;
  width: min(520px, calc(100vw - 28px));
  max-height: min(720px, calc(100vh - 132px));
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  font: 14px/1.45 "Segoe UI", sans-serif;
}

.jobsie-form-proposal-panel.is-visible {
  display: block;
}

.jobsie-form-proposal-head,
.jobsie-form-proposal-card-head,
.jobsie-form-proposal-actions,
.jobsie-form-proposal-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.jobsie-form-proposal-title {
  font-size: 16px;
  line-height: 1.2;
}

.jobsie-form-proposal-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: #eef2f7;
  color: #172033;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.jobsie-form-proposal-note,
.jobsie-form-proposal-empty {
  margin: 10px 0 12px;
  color: #526071;
}

.jobsie-form-proposal-list {
  display: grid;
  gap: 12px;
}

.jobsie-form-proposal-card {
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.jobsie-form-proposal-card.is-inserted {
  border-color: #34a853;
  background: #f0fbf4;
}

.jobsie-form-proposal-card-head {
  margin-bottom: 8px;
}

.jobsie-form-proposal-card-head span {
  color: #526071;
  font-size: 12px;
}

.jobsie-form-proposal-card textarea {
  width: 100%;
  min-height: 128px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #172033;
  font: 14px/1.5 inherit;
}

.jobsie-form-proposal-actions {
  margin-top: 14px;
}

.jobsie-form-proposal-panel button {
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #0f1d37;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.jobsie-form-proposal-panel button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.jobsie-form-proposal-panel .jobsie-form-proposal-cancel {
  background: #e5eaf1;
  color: #172033;
}

@media (max-width: 640px) {
  .jobsie-live-bubble {
    right: 14px;
    bottom: 14px;
  }

  .jobsie-assistant-panel {
    right: 14px;
    left: 14px;
    bottom: 74px;
    width: auto;
    max-height: calc(100vh - 92px);
  }

  .jobsie-assistant-actions {
    grid-template-columns: 1fr;
  }

  .jobsie-text-fallback-row {
    align-items: stretch;
    flex-direction: column;
  }

  .jobsie-text-fallback-send {
    width: 100%;
  }

  .jobsie-form-proposal-panel {
    right: 14px;
    left: 14px;
    bottom: 96px;
    width: auto;
  }
}
