/* === Retro Minimal 80085 Nintendo-Inspired Style === */

/* Hide all the unwanted UI elements for ultra minimalism */
#user_consent_container,
.share-button,
footer,
.built-with,
#component-1,
#component-2,
#component-10,
#component-13,
.svelte-1b6s6s,
.svelte-1gfkn6j,
.svelte-1eq475l,
.svelte-g2oxp3,
.svelte-1to105q,
.icon-button-wrapper,
.toast-wrap,
.toast-body,
.toast-title,
.toast-text,
.toast-close,
.toast-icon,
.toast-details,
.settings,
.settings-wrapper,
.settings-panel,
.download-link,
.extra-feedback,
.extra-feedback-options,
.message-buttons,
.message-buttons-left,
.message-buttons-right,
.wrapper:not(.svelte-g3p8na),
.panel:not(.svelte-yaaj3),
.compose-area,
.status-bar,
#statusBar,
.control-wrapper,
.toolbar-wrap,
.nav-holder,
.nav,
.menu,
.tab-container,
.stepper,
.sidebar,
.loading,
.loader,
.progress-bar,
.api-docs,
.api-docs-wrap,
.api-docs-menu,
.api-section,
.api-section-header,
.api-section-content,
.api-count,
.meta-text,
.timebox,
.hf.svelte-1170pvd,
.html-container,
.markdown-body,
.captcha,
.banner-wrap,
.snippets,
.extra,
.selection-button,
.selection-button-row,
.options,
.option,
.gallery,
.gallery-item,
.attachments,
.uploading,
.uploaded,
.file-container,
.file-preview,
.file-name,
.file-info,
.file-icon,
.file-type,
.file-wrap,
.upload-container,
.image-container,
.image-frame,
.image-preview,
.image-preview-close-button,
.image-overlay,
.video-container,
.video-preview,
.video-player,
.audio-container,
.audio-player,
.audio-controls,
.scroll-down-button-container,
.scroll-down-button,
.scroll-top-button,
.modal,
.modal-inner,
.overlay,
.backdrop,
.toast,
.toast-message,
.tooltip,
.tooltip-content,
.tooltip-arrow,
.tooltip-inner,
.wavesurfer,
.waveform-container,
.waveform-timeline,
.progress-level,
.progress-text,
.progress-level-inner,
.progress-bar-wrap,
.progress-bar,
.selection-button-column,
.selection-button-row,
.spin-button,
.dragging,
.drag-handle,
.history,
.history-item,
.session-info,
.session-history,
.emoji-picker,
emoji-picker,
.vote,
.vote-button,
.share-dialog,
.notification,
.notification-content,
.notification-icon,
.notification-title,
.notification-text,
.notification-close,
.updates,
.updates-list,
.updates-item,
.unread,
.user-suggestions,
.suggestion-list,
.autocomplete,
.info-box,
.info-message,
.info-text,
.info-icon,
.footer,
.header,
.title,
.titlebar,
.nav-bar,
nav,
nav-link,
nav-item {
  display: none !important;
}

/* Reset top-level app container margins and paddings */
.app.svelte-1170pvd.svelte-1170pvd {
  margin: 0 !important;
  padding: 0 !important;
}

/* Main container */
#col_container {
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  width: 100vw !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;

  background-color: #000 !important; /* deep black */
  color: #39ff14 !important; /* neon green */
  box-sizing: border-box !important;
}

/* Set full retro font everywhere */
* {
  font-family: 'Press Start 2P', cursive !important;
  font-weight: 400 !important;
}

/* Header bar */
#component-7 {
  display: flex !important;
  order: 1 !important;
  flex: 0 0 36px !important;
  justify-content: center !important;
  align-items: center !important;

  background-color: #050505 !important;
  border-bottom: none !important;
  padding: 1px !important;
  margin: 1px 0 !important;

  text-transform: uppercase !important;
  color: #39ff14 !important;

  font-weight: 900 !important;
  letter-spacing: 0.15em !important;
  font-size: 1rem !important;
  user-select: none !important;
}

/* Run button */
#component-9 {
  display: inline-flex !important;
  background-color: #000 !important;
  border: 5px solid #39ff14 !important;
  border-radius: 0 !important;
  color: #39ff14 !important;

  padding: 4px 18px !important;
  font-weight: 700 !important;

  cursor: pointer !important;
  white-space: nowrap !important;
  user-select: none !important;

  font-size: 1rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;

  transition: none !important;
  box-shadow: none !important;
  margin: 1px 0 !important;
}
#component-9:hover:enabled {
  background-color: #39ff14 !important;
  color: #000 !important;
  border-color: #39ff14 !important;
}
#component-9:active:enabled {
  background-color: #275e0a !important;
  color: #000 !important;
}

/* Form container */
.form.svelte-633qhp {
  order: 2 !important;
  padding: 0 1px !important;
  margin: 1px 0 !important;
  border: 5px solid #39ff14 !important;
  z-index: 10;
}

/* Gap container */
.gap.svelte-vt1mxs {
  gap: 0 !important; /* no gaps for hyper compact */
}

/* Padding override for padded blocks */
.padded.svelte-11xb1hd {
  padding: 1px !important; /* ultra minimal padding */
}

/* Textarea */
textarea.scroll-hide.svelte-173056l {
  flex-grow: 1 !important;
  max-height: 50vh !important;
  scrollbar-width: auto !important;
  scrollbar-color: #39ff14 #000 !important;

  background-color: #000 !important;
  border: none !important;
  border-radius: 0 !important;
  color: #39ff14 !important;
  font-size: 1.1rem !important;
  padding: 2px 6px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  outline: none !important;
  user-select: text !important;
  caret-color: #39ff14 !important;
  margin: 1px 0 !important;
}

/* Webkit scrollbar for textarea */
textarea.scroll-hide.svelte-173056l::-webkit-scrollbar {
  width: 4px !important;
  height: 4px !important;
}
textarea.scroll-hide.svelte-173056l::-webkit-scrollbar-track {
  background: #000 !important;
  border-radius: 0 !important;
}
textarea.scroll-hide.svelte-173056l::-webkit-scrollbar-thumb {
  background-color: #39ff14 !important;
  border: none !important;
  border-radius: 0 !important;
}
textarea.scroll-hide.svelte-173056l::-webkit-scrollbar-thumb:hover {
  background-color: #6eff44 !important;
}

/* Chat container */
#chatbot {
  display: flex !important;
  order: 3 !important;
  flex: 1 1 auto !important;
  flex-direction: column-reverse !important;
  overflow-y: auto !important;
  padding: 1px 4px !important;
  background-color: #000 !important;
  color: #39ff14 !important;
  font-family: 'Consolas', monospace !important;
  font-size: 1.13rem !important;
  font-weight: 700;
  line-height: 1.3;
  box-sizing: border-box !important;
  user-select: text !important;
  scrollbar-width: thin !important;
  scrollbar-color: #39ff14 #000 !important;
  margin: 1px 0 !important;
}

/* Message bubbles */

/* User bubble */
.message-row.bubble.user-row {
  background-color: transparent !important;
  color: #39ff14 !important;
  align-self: flex-start !important;
  border-bottom: 1.2px solid #39ff14 !important;
  margin: 1px 0 !important;
  padding: 1px 4px !important;
  max-width: 97vw !important;
  word-wrap: break-word !important;
  box-sizing: border-box !important;
  font-weight: 700;
  cursor: text !important;
  user-select: text !important;
  white-space: pre-wrap;
  font-family: 'Consolas', monospace !important;
  letter-spacing: 0.025em;
  transition: none !important;
}

/* Bot bubble */
.message-row.bubble.bot-row {
  background-color: transparent !important;
  color: #6eff6a !important;
  align-self: flex-start !important;
  border-bottom: 1.2px solid #6eff6a !important;
  margin: 1px 0 !important;
  padding: 1px 4px !important;
  max-width: 97vw !important;
  word-wrap: break-word !important;
  box-sizing: border-box !important;
  font-weight: 700;
  cursor: text !important;
  user-select: text !important;
  white-space: pre-wrap;
  font-family: 'Consolas', monospace !important;
  letter-spacing: 0.02em;
}

/* Scrollbar */
#chatbot::-webkit-scrollbar {
  width: 3px !important;
  height: 3px !important;
}
#chatbot::-webkit-scrollbar-track {
  background: #000 !important;
  border-radius: 0 !important;
}
#chatbot::-webkit-scrollbar-thumb {
  background-color: #39ff14 !important;
  border: none !important;
  border-radius: 0 !important;
}
#chatbot::-webkit-scrollbar-thumb:hover {
  background-color: #6eff44 !important;
}

/* Text selection */
::selection {
  background: #39ff1444 !important;
  color: #000 !important;
  text-shadow: none !important;
  user-select: text !important;
}
::-moz-selection {
  background: #39ff1444 !important;
  color: #000 !important;
  text-shadow: none !important;
  user-select: text !important;
}

/* Focus outlines */
*:focus-visible {
  outline: 1.5px solid #39ff14 !important;
  outline-offset: 1px !important;
  box-shadow: none !important;
}

/* Remove all transitions */
#col_container,
#component-7,
#component-9,
textarea.scroll-hide.svelte-173056l,
.message-row.bubble.user-row,
.message-row.bubble.bot-row {
  transition: none !important;
}

/* Background for most of Gradio UI */
.gradio-container-5-25-1,
.gradio-container-5-25-1 *,
.gradio-container-5-25-1 ::before,
.gradio-container-5-25-1 ::after {
  box-sizing: border-box;
  border-width: 0px;
  border-style: solid;
  background-color: rgba(1, 2, 1, 0.5) !important;
}

/* Code block background */
span.svelte-7ddecg div[class*="code_wrap"] {
  position: relative;
  background-color: rgb(128, 0, 133) !important;
}

/* Hide loading message bubbles */
.message.pending {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* Dark mode text color override */
:root .dark {
  --body-text-color: #808855;
}