/* Sleek Input Fields, Option Buttons, Textareas, and Custom cursor behaviors */

/* Interactive Option Buttons (Raycast/Linear style) */
.chat-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: left;
  cursor: none; /* Handled by custom cursor */
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.chat-option-btn .option-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
  stroke-width: 1.5px;
  transition: color 0.3s ease;
}

/* Hover Micro-interactions */
.chat-option-btn:hover {
  border-color: var(--accent);
  background-color: rgba(199, 242, 62, 0.02);
  transform: translateX(4px);
}

.chat-option-btn:hover .option-icon {
  color: var(--accent);
}

/* Selected State */
.chat-option-btn.selected {
  border-color: var(--accent);
  background-color: rgba(199, 242, 62, 0.06);
  box-shadow: 0 0 16px rgba(199, 242, 62, 0.08);
}

.chat-option-btn.selected .option-icon {
  color: var(--accent);
}

/* Chat Input Wrapper & Textarea (Text questions) */
.chat-input-area {
  display: none; /* Hidden by default, shown for text questions */
  width: 100%;
  animation: fade-in 0.4s ease-out;
}

.chat-input-area.visible {
  display: flex;
  flex-direction: column;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  background-color: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

.input-wrapper.focused {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(199, 242, 62, 0.08);
}

#chat-textarea {
  flex-grow: 1;
  background: none;
  border: none;
  resize: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 12px;
  padding-top: 4px;
}

#chat-textarea::placeholder {
  color: var(--text-muted);
}

/* Send Circular Button (mockup arrow style) */
.chat-send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--accent);
  border: none;
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  flex-shrink: 0;
  opacity: 0.2;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.chat-send-btn.active {
  opacity: 1;
  pointer-events: all;
}

.chat-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 16px rgba(199, 242, 62, 0.35);
}

.send-icon {
  stroke-width: 2.5px;
}

/* Fade in helper */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Accessibility Focus States for Option buttons */
.chat-option-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(199, 242, 62, 0.2);
}

/* Mobile optimizations */
@media (max-width: 576px) {
  .chat-option-btn {
    padding: 14px 16px;
    font-size: 12px;
    gap: 12px;
  }
  .input-wrapper {
    padding: 8px 12px;
  }
  #chat-textarea {
    font-size: 16px;
  }
  .chat-send-btn {
    width: 28px;
    height: 28px;
  }
}
