/* Close button styles */
#closeIconMgpt {
  background: none !important;
  border: none !important;
  color: white !important;
  cursor: pointer !important;
  padding: 8px !important;
  border-radius: 50% !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#closeIconMgpt:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: scale(1.1) !important;
}

#closeIconMgpt:active {
  transform: scale(0.95) !important;
}

/* Option button wrapper styles */
.option-button-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px;
  background: lightgray;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

/* Option prompt styles */
.option-prompt {
  color: white;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Option button container */
.option-button-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Option button styles */
.option-btn-custom {
  background: rgba(255, 255, 255, 0.95);
  border: none;
  color: #4a5568;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.option-btn-custom:hover {
  opacity: 0.8;
}

.option-btn-custom:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
}

.option-btn-custom:disabled:hover {
  opacity: 0.6;
}

/* Button container styles */
.button-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

/* HTML button styles */
.html-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
  position: relative;
  overflow: hidden;
  text-align: center;
  min-width: 120px;
}

.html-button:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  border: none;
  color: white;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  transform: translateY(-2px);
  position: relative;
  overflow: hidden;
  text-align: center;
  min-width: 120px;
}

/* Suggest button wrapper */
.suggest-button-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

/* Disabled states for all buttons */
.suggest-btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.6;
}

.suggest-btn:disabled:hover {
  opacity: 0.6;
}

/* Markdown content styles */
.markdown-content {
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
  white-space: normal;
}

.markdown-content br {
  margin: 0;
  line-height: 1.2;
}

.markdown-content h1 {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0.5em 0;
  color: #111827;
}

.markdown-content h2 {
  font-size: 1.3em;
  font-weight: bold;
  margin: 0.4em 0;
  color: #111827;
}

.markdown-content h3 {
  font-size: 1.1em;
  font-weight: bold;
  margin: 0.3em 0;
  color: #111827;
}

.markdown-content strong {
  font-weight: bold;
  color: #111827;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content code {
  background-color: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.markdown-content pre {
  background-color: #f4f4f4;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 10px 0;
}

.markdown-content pre code {
  background: none;
  padding: 0;
}

.markdown-content ul {
  margin: 5px 0;
  padding-left: 20px;
  list-style-type: disc;
}

.markdown-content ol {
  margin: 5px 0;
  padding-left: 20px;
  list-style-type: decimal;
}

.markdown-content li {
  margin: 3px 0;
  line-height: 1.4;
}

.markdown-content blockquote {
  border-left: 4px solid #ddd;
  padding-left: 15px;
  margin: 5px 0;
  color: #666;
  font-style: italic;
}

/* Reduce spacing for paragraphs and other elements */
.markdown-content p {
  margin: 3px 0;
}

.markdown-content div {
  margin: 3px 0;
}

.markdown-content pre {
  white-space: pre;
}

.markdown-content a {
  color: #0051cc !important;
  text-decoration: underline;
}

.markdown-content a:hover {
  color: #003d99 !important;
}

.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  font-weight: bold;
  margin: 0.3em 0;
}

.markdown-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 8px 0;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #d1d5db;
  padding: 6px 10px;
}

.markdown-content th {
  font-weight: bold;
  background-color: #f3f4f6;
}

/* Rating icons: always visible (previously hidden until hover, which caused repeated confusion) */
.onebot-rating { display: flex; gap: 2px; margin-top: 1px; padding: 0; opacity: 1; }
.onebot-rating-btn {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; transition: all 0.2s;
  padding: 4px; line-height: 0; border-radius: 4px; display: flex; align-items: center; justify-content: center;
}
.onebot-rating-btn:hover { color: #6b7280; background: #f3f4f6; }
.onebot-rating-btn.active { color: #6b7280; }
.onebot-rating-btn.active.like { color: #22c55e; }
.onebot-rating-btn.active.dislike { color: #ef4444; }

/* Feedback form */
.onebot-feedback-form {
  margin-top: 8px; padding: 10px;
  background: #f9fafb; border-radius: 8px; border: 1px solid #e5e7eb;
  position: relative;
}
.onebot-feedback-close {
  position: absolute; top: 6px; right: 6px;
  background: none; border: none; cursor: pointer;
  color: #9ca3af; padding: 2px; line-height: 0; border-radius: 4px;
  transition: all 0.15s;
}
.onebot-feedback-close:hover { color: #374151; background: #e5e7eb; }
.onebot-feedback-option {
  display: block; padding: 6px 10px; margin: 4px 0;
  border: 1px solid #d1d5db; border-radius: 6px;
  background: white; cursor: pointer; font-size: 13px;
  transition: all 0.15s;
}
.onebot-feedback-option:hover { background: #f3f4f6; border-color: #9ca3af; }
.onebot-feedback-option.selected { background: #eff6ff; border-color: #3b82f6; }
.onebot-feedback-textarea {
  width: 100%; margin-top: 6px; padding: 8px;
  border: 1px solid #d1d5db; border-radius: 6px;
  font-size: 13px; resize: vertical; min-height: 60px;
  display: none; box-sizing: border-box;
}
.onebot-feedback-submit {
  margin-top: 8px; padding: 6px 16px;
  border: none; border-radius: 6px; cursor: pointer; font-size: 13px;
  color: white; background: #3b82f6;
}
.onebot-feedback-submit:hover { opacity: 0.9; }
.onebot-feedback-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* Toast */
.onebot-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #1f2937; color: white; padding: 8px 16px;
  border-radius: 8px; font-size: 13px; z-index: 10000;
  animation: onebotFadeInOut 2.5s forwards;
}
@keyframes onebotFadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; }
}
