.ask-farhan-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', system-ui, sans-serif;
}

.ask-farhan-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #12162B;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(18,22,43,0.3);
  transition: transform 0.2s ease;
}
.ask-farhan-toggle:hover { transform: translateY(-2px); }
.ask-farhan-toggle svg { width: 26px; height: 26px; }

.ask-farhan-window {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(18,22,43,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #E4E6EF;
}
.ask-farhan-window.is-open { display: flex; }

.ask-farhan-header {
  background: #12162B;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ask-farhan-header-text h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.ask-farhan-header-text p { margin: 2px 0 0; font-size: 0.78rem; color: rgba(255,255,255,0.65); }
.ask-farhan-close {
  background: none; border: none; color: #fff; cursor: pointer;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; opacity: 0.85;
}
.ask-farhan-close:hover { background: rgba(255,255,255,0.12); opacity: 1; }

.ask-farhan-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #F7F8FB;
}

.ask-farhan-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.ask-farhan-msg.bot {
  background: #fff;
  border: 1px solid #E4E6EF;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ask-farhan-msg.user {
  background: #6C5CE7;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ask-farhan-msg.thinking {
  background: #fff;
  border: 1px solid #E4E6EF;
  align-self: flex-start;
  color: #5B6178;
  font-style: italic;
  border-bottom-left-radius: 4px;
}

.ask-farhan-input-row {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #E4E6EF;
  background: #fff;
}
.ask-farhan-input-row input {
  flex: 1;
  border: 1px solid #E4E6EF;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}
.ask-farhan-input-row input:focus { border-color: #6C5CE7; }
.ask-farhan-send {
  width: 40px; height: 40px; border-radius: 50%;
  background: #6C5CE7; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ask-farhan-send:hover { background: #4B3FC4; }
.ask-farhan-send:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 480px) {
  .ask-farhan-widget { bottom: 16px; right: 16px; }
  .ask-farhan-window { width: calc(100vw - 24px); height: calc(100vh - 140px); }
}

.ask-farhan-toggle {
  transition: transform 0.2s ease, background 0.2s ease;
}

.ask-farhan-toggle.is-open {
  background: #6C5CE7;
}

.ask-farhan-toggle svg {
  width: 26px;
  height: 26px;
}

.ask-farhan-msg strong {
  font-weight: 700;
}

.ask-farhan-msg code {
  background: #F0F1F5;
  padding: 2px 5px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
}


.ask-farhan-link {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
     border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
     transition: opacity 0.2s ease, transform 0.2s ease;
}

.ask-farhan-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    text-decoration: none;
}