/* Frio Grok chat widget */
.frio-chat-btn {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  border-radius: 9999px;
  padding: 0.85rem 1.15rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: #3b82f6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.frio-chat-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}
.frio-chat-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.frio-chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 5rem;
  z-index: 9999;
  width: min(380px, calc(100vw - 1.5rem));
  height: min(520px, calc(100vh - 7rem));
  display: none;
  flex-direction: column;
  border: 1px solid #1e2d3d;
  border-radius: 16px;
  background: #111927;
  color: #e8edf4;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  font-family: inherit;
}
.frio-chat-panel.open {
  display: flex;
}

.frio-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #1e2d3d;
  background: #151f2e;
}
.frio-chat-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}
.frio-chat-header p {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  color: #8899aa;
}
.frio-chat-close {
  border: 1px solid #2a3f55;
  background: transparent;
  color: #e8edf4;
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.frio-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.frio-chat-bubble {
  max-width: 90%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.frio-chat-bubble.bot {
  align-self: flex-start;
  background: #1a2740;
  border: 1px solid #1e2d3d;
  color: #e8edf4;
}
.frio-chat-bubble.user {
  align-self: flex-end;
  background: #1e3a5f;
  border: 1px solid #2a3f55;
  color: #fff;
}
.frio-chat-bubble.err {
  align-self: flex-start;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.frio-chat-form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #1e2d3d;
  background: #151f2e;
}
.frio-chat-form input {
  flex: 1;
  height: 2.5rem;
  border: 1px solid #1e2d3d;
  border-radius: 8px;
  background: #0a1018;
  color: #e8edf4;
  padding: 0 0.75rem;
  font: inherit;
  font-size: 0.875rem;
  outline: none;
}
.frio-chat-form input:focus {
  border-color: #3b82f6;
}
.frio-chat-form button {
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0 0.9rem;
  cursor: pointer;
}
.frio-chat-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.frio-chat-hint {
  padding: 0 0.75rem 0.65rem;
  font-size: 0.68rem;
  color: #5c6d7e;
  background: #151f2e;
}
.frio-chat-hint a {
  color: #60a5fa;
}
