/* IGWT Immigration — FAQ chat widget */

.igwt-chatbot {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9000;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
}

.igwt-chatbot[hidden] {
  display: none !important;
}

.igwt-chatbot-fab {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #d71920 0%, #b0151a 100%);
  color: #fff;
  padding: 12px 18px 12px 14px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(215, 25, 32, 0.35);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.igwt-chatbot-fab:hover,
.igwt-chatbot-fab:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(215, 25, 32, 0.4);
  outline: none;
}

.igwt-chatbot-fab-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.igwt-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.igwt-chatbot-panel[hidden] {
  display: none !important;
}

.igwt-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #1e3a5f;
  color: #fff;
}

.igwt-chatbot-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.igwt-chatbot-header h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.igwt-chatbot-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.igwt-chatbot-close:hover,
.igwt-chatbot-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.igwt-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.igwt-chat-bubble {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.igwt-chat-bubble.is-bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

.igwt-chat-bubble.is-user {
  align-self: flex-end;
  background: #d71920;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.igwt-chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.igwt-chatbot-chips:empty {
  display: none;
}

.igwt-chat-chip {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #1e3a5f;
  border-radius: 9999px;
  padding: 6px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.igwt-chat-chip:hover,
.igwt-chat-chip:focus-visible {
  border-color: #d71920;
  color: #d71920;
  outline: none;
}

.igwt-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.igwt-chatbot-input {
  flex: 1;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: inherit;
}

.igwt-chatbot-input:focus {
  outline: none;
  border-color: #d71920;
  box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.12);
}

.igwt-chatbot-send {
  border: 0;
  background: #d71920;
  color: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
}

.igwt-chatbot-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .igwt-chatbot {
    right: 12px;
    bottom: 12px;
  }

  .igwt-chatbot-panel {
    position: fixed;
    right: 8px;
    left: 8px;
    bottom: 72px;
    width: auto;
    height: min(70vh, 560px);
  }

  .igwt-chatbot-fab-label {
    display: none;
  }

  .igwt-chatbot-fab {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }
}
