/* Rapid Answers - Interactive Card Transitions & Effects */

/* Card 3D Transitions - Only on Expand/Collapse */
.rapid-answer-card {
  transform-style: preserve-3d;
  transform-origin: center top;
}

/* Expanded card - clean and lifted */
.rapid-answer-card-expanded {
  animation: flipIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center top;
  border: 2px solid rgba(134, 239, 172, 0.25);
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 
              0 0 0 4px rgba(134, 239, 172, 0.06),
              inset 0 0 100px rgba(187, 247, 208, 0.02);
  background: linear-gradient(135deg, 
    rgba(247, 254, 231, 0.97) 0%, 
    rgba(236, 252, 203, 0.90) 50%, 
    rgba(247, 254, 231, 0.97) 100%);
  margin: 0.5rem 0;
  position: relative;
}

.rapid-answer-card-expanded::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    transparent 0%,
    rgba(134, 239, 172, 0.5) 20%,
    rgba(74, 222, 128, 0.6) 50%,
    rgba(134, 239, 172, 0.5) 80%,
    transparent 100%);
  border-radius: 16px 16px 0 0;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes flipIn {
  0% {
    transform: perspective(1000px) rotateX(-8deg) scale(0.96);
    opacity: 0.8;
  }
  100% {
    transform: perspective(1000px) rotateX(0deg) scale(1);
    opacity: 1;
  }
}

/* Smooth transition when collapsing */
turbo-frame[id*="raider_app"] {
  display: block;
}

#rapid_answers > * {
  animation: slideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
  0% {
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Truncated text hover effect - Subtle & Smooth */
.truncated-text {
  position: relative;
  transition: background-color 0.4s ease, transform 0.3s ease, opacity 0.2s ease;
  cursor: pointer;
  min-height: 1.5em; /* Prevent layout shift during content toggle */
}

.truncated-text:hover {
  background-color: rgba(0, 0, 0, 0.03);
  transform: translateZ(2px);
}

/* Content toggle smooth transition */
.truncated-text:hover {
  opacity: 0.95;
  background-color: rgba(59, 130, 246, 0.05);
}

/* Smooth height transitions for expanding content */
.grid-layout-app {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Add perspective to parent container */
#rapid_answers {
  perspective: 1200px;
  perspective-origin: center top;
}

/* Creative Color Overlays for Rapid Answers */

/* Input sections - only 2nd block (main input text) gets warm tint + 3D plastic effect */
#rapid_answers .grid-layout-app > .lg\:col-span-3:first-of-type .code-block:nth-child(2) {
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
              0 8px 24px rgba(251, 146, 60, 0.2),
              0 2px 6px rgba(0, 0, 0, 0.1),
              inset 0 2px 0 rgba(255, 255, 255, 0.6),
              inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-3px) translateZ(4px);
}

#rapid_answers .grid-layout-app > .lg\:col-span-3:first-of-type .code-block:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(251, 146, 60, 0.08) 0%, 
    rgba(245, 158, 11, 0.05) 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

#rapid_answers .grid-layout-app > .lg\:col-span-3:first-of-type .code-block:nth-child(2)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    transparent 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

/* Output sections - only 1st block (main output) gets cool shimmer + 3D plastic effect */
#rapid_answers .grid-layout-app > .lg\:col-span-3:nth-of-type(2) .code-block:nth-child(1) {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
              0 8px 24px rgba(14, 165, 233, 0.2),
              0 2px 6px rgba(0, 0, 0, 0.1),
              inset 0 2px 0 rgba(255, 255, 255, 0.6),
              inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  transform: translateY(-3px) translateZ(4px);
}

#rapid_answers .grid-layout-app > .lg\:col-span-3:nth-of-type(2) .code-block:nth-child(1)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(120deg, 
    rgba(14, 165, 233, 0.06) 0%, 
    rgba(6, 182, 212, 0.04) 50%, 
    rgba(34, 197, 94, 0.06) 100%);
  pointer-events: none;
  border-radius: inherit;
}

#rapid_answers .grid-layout-app > .lg\:col-span-3:nth-of-type(2) .code-block:nth-child(1)::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, 
    rgba(255, 255, 255, 0.15) 0%, 
    transparent 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: 1;
}

/* HIL editable area gets glass overlay */
#rapid_answers .output-display[contenteditable="true"] {
  position: relative;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(74, 222, 128, 0.4);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
              inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  font-size: 1.6rem;
  max-width: 75ch;
}

#rapid_answers .output-display[contenteditable="true"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(134, 239, 172, 0.08) 0%, 
    rgba(187, 247, 208, 0.05) 50%, 
    rgba(134, 239, 172, 0.08) 100%);
  pointer-events: none;
  border-radius: inherit;
  z-index: -1;
}

/* Metadata sections get subtle glow */
#rapid_answers .lg\:col-span-2 .code-block {
  position: relative;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.1);
}

#rapid_answers .lg\:col-span-2 .code-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 0%, 
    rgba(139, 92, 246, 0.08) 0%, 
    transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

/* Original output gets floating highlight */
#rapid_answers .text-gray-400.code-block {
  position: relative;
  overflow: hidden;
}

#rapid_answers .text-gray-400.code-block::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 70%);
  animation: float-light 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float-light {
  0%, 100% { 
    transform: translate(0%, 0%) rotate(0deg); 
    opacity: 0.3;
  }
  25% { 
    transform: translate(20%, 10%) rotate(90deg); 
    opacity: 0.6;
  }
  50% { 
    transform: translate(-10%, 20%) rotate(180deg); 
    opacity: 0.4;
  }
  75% { 
    transform: translate(-20%, -10%) rotate(270deg); 
    opacity: 0.7;
  }
}

/* Bottom Overlay Styling (similar to chat new_question_container) */
#rapid_answers_separator {
  @apply pb-20;
}

#rapid_answers_search_container {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 98%;
  max-width: none;
  max-height: 85vh;
  z-index: 1000;
  padding: 0 1rem 1rem 1rem;
}

/* Search toggle button */
.search-toggle-button {
  position: fixed;
  bottom: 1.5rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.search-toggle-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

.search-toggle-button.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.5);
}

.search-icon {
  font-size: 1.75rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

#rapid_answers_search {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.98), rgba(29, 78, 216, 0.96));
  backdrop-filter: blur(10px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.25), 
              0 0 0 1px rgba(191, 219, 254, 0.2);
  border-radius: 1.25rem;
  margin: 0 0.25rem 0.5rem 0.25rem;
  padding: 1.5rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: calc(100% - 0.5rem);
}

#rapid_answers_search[data-expanded="true"] {
  max-height: 80vh;
  opacity: 1;
  transform: translateY(0) scale(1);
  overflow-y: auto;
  overflow-x: visible; /* Allow datepicker to overflow horizontally */
}

/* Allow search controls container to overflow for datepickers */
#search_controls_container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  overflow: visible; /* Allow datepicker to escape */
}

/* Ensure date input controls can show datepicker on top */
.search-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: relative;
  z-index: 1;
}

/* Boost z-index when date input is focused */
.search-control-group:has(input[type="date"]:focus) {
  z-index: 9999;
  position: relative;
}

.search-date-input {
  position: relative;
  z-index: 1;
}

#search_controls_container {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

#search_controls_container p {
  margin: 0;
}

#search_controls_container p:first-child {
  flex: 1;
}

#search_controls_container .search-input {
  @apply w-full p-3 rounded-lg border-2 border-gray-300 focus:border-blue-500 focus:outline-none text-base;
  background-color: rgba(255, 255, 255, 0.95);
}

#search_options_container {
  @apply mt-4 p-4 rounded-lg;
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.15), rgba(147, 197, 253, 0.1));
  border: 1px solid rgba(191, 219, 254, 0.2);
  width: 100%;
  max-width: none;
  overflow: hidden;
  transform-origin: top center;
  -webkit-transition: max-height 0.5s ease-in-out,
                      opacity 0.5s ease-in-out,
                      transform 0.5s ease-in-out,
                      padding 0.5s ease-in-out,
                      margin 0.5s ease-in-out;
  transition: max-height 0.5s ease-in-out,
              opacity 0.5s ease-in-out,
              transform 0.5s ease-in-out,
              padding 0.5s ease-in-out,
              margin 0.5s ease-in-out;
  will-change: max-height, opacity, transform;
}

#search_options_container:not(.hidden) {
  max-height: 70vh;
  opacity: 1;
  transform: scaleY(1);
  overflow-y: auto;
}

#search_options_container.hidden {
  max-height: 0;
  padding: 0 1rem;
  margin: 0;
  opacity: 0;
  transform: scaleY(0);
  overflow: hidden;
}

/* Search Controls Styling */
#search_controls_container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.search-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0; /* Allow flex items to shrink */
}

.search-control-group.button-group {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  flex-basis: 100%; /* Force new row */
  width: 100%;
}

.search-label {
  @apply text-sm font-semibold;
  color: rgba(191, 219, 254, 1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: block;
  white-space: nowrap;
  margin-bottom: 0.125rem;
}

.search-date-input,
.search-select {
  @apply p-2 rounded-lg border-2 border-gray-300 focus:border-blue-500 focus:outline-none;
  background-color: rgba(255, 255, 255, 0.95);
  min-width: 120px;
}

.search-submit {
  @apply px-4 py-2;
}

.option-toggle-icon {
  @apply ml-2 text-sm;
  transition: transform 0.2s ease;
}

/* Tag Cloud Styling */
.options-section {
  @apply mb-12;
}

.options-heading {
  @apply text-2xl font-bold mb-6 mt-6;
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  justify-content: center;
  padding: 1rem 0;
}

.tag-cloud-item {
  @apply px-4 py-2 text-sm font-medium transition-all duration-200;
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.95), rgba(147, 197, 253, 0.95));
  color: rgba(30, 64, 175, 0.95);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 0.5rem;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}

/* Temperature color scale from cold (0) to hot (5) */
.tag-cloud-item.temp-0 {
  background: linear-gradient(135deg, rgba(165, 243, 252, 0.95), rgba(103, 232, 249, 0.95));
  color: rgba(8, 51, 68, 0.95);
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 1px 4px rgba(6, 182, 212, 0.2);
}

.tag-cloud-item.temp-1 {
  background: linear-gradient(135deg, rgba(191, 219, 254, 0.95), rgba(147, 197, 253, 0.95));
  color: rgba(30, 64, 175, 0.95);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}

.tag-cloud-item.temp-2 {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.95), rgba(167, 139, 250, 0.95));
  color: rgba(76, 29, 149, 0.95);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 1px 4px rgba(124, 58, 237, 0.2);
}

.tag-cloud-item.temp-3 {
  background: linear-gradient(135deg, rgba(253, 186, 116, 0.95), rgba(251, 146, 60, 0.95));
  color: rgba(124, 45, 18, 0.95);
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 1px 4px rgba(249, 115, 22, 0.2);
}

.tag-cloud-item.temp-4 {
  background: linear-gradient(135deg, rgba(252, 165, 165, 0.95), rgba(248, 113, 113, 0.95));
  color: rgba(127, 29, 29, 0.95);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.2);
}

.tag-cloud-item.temp-5 {
  background: linear-gradient(135deg, rgba(254, 205, 211, 0.95), rgba(251, 113, 133, 0.95));
  color: rgba(136, 19, 55, 0.95);
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 1px 6px rgba(244, 63, 94, 0.3);
  font-weight: 700;
}

.tag-cloud-item:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px currentColor;
  filter: brightness(1.1);
}

.tag-cloud-item.active {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95));
  color: white;
  border-color: rgba(153, 27, 27, 0.8);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.5);
}

.tag-count {
  @apply ml-2 text-xs;
  opacity: 0.7;
  font-weight: 600;
}

.tag-cloud-item.active .tag-count {
  opacity: 0.95;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #search_controls_container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-control-group {
    width: 100%;
  }
  
  .search-date-input,
  .search-select {
    width: 100%;
  }
}

/* Row Focus Styling (used by both keyboard navigation and mouse hover) */
#rapid_answers {
  outline: none;
}

.row-focused {
  position: relative;
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 4px;
  border-radius: 1rem;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.05) 0%, 
    rgba(147, 51, 234, 0.03) 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
  transition: all 0.2s ease;
}

.row-focused::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    rgba(147, 51, 234, 0.1) 50%, 
    rgba(236, 72, 153, 0.1) 100%);
  border-radius: inherit;
  z-index: -1;
  animation: row-glow 2s ease-in-out infinite;
}

@keyframes row-glow {
  0%, 100% { 
    opacity: 0.3;
    transform: scale(1);
  }
  50% { 
    opacity: 0.7;
    transform: scale(1.02);
  }
}

/* Clean content styling in expanded mode */
.rapid-answer-card-expanded .output-display[contenteditable="true"] {
  border: 2px solid rgba(74, 222, 128, 0.5);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1),
              0 0 0 3px rgba(134, 239, 172, 0.15),
              inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* HIL indicator - reduce padding between sections */
#rapid_answers code[id$="_hil_indicator"] {
  padding: 0.375rem !important;
  display: block;
}

#rapid_answers code[id$="_hil_indicator"] > .flex:first-child {
  margin-bottom: 0;
}

#rapid_answers code[id$="_hil_indicator"] > .flex:not(:first-child) {
  margin-top: 0.25rem;
}

#rapid_answers code[id$="_hil_indicator"] .rating-buttons-container {
  margin-top: 0.25rem;
}

/* Rating buttons container - disable link click propagation */
.rating-buttons-container {
  pointer-events: none;
  overflow: visible !important;
}

.rating-buttons-container * {
  pointer-events: auto;
}

/* Ensure parent containers allow autocomplete to overflow */
#rapid_answers code[id$="_hil_indicator"] {
  overflow: visible !important;
}

#rapid_answers .rapid-answer-card,
#rapid_answers .rapid-answer-card-expanded {
  overflow: visible !important;
}

#rapid_answers .grid-layout-app {
  overflow: visible !important;
}

#rapid_answers .grid-layout-app > div {
  overflow: visible !important;
}

/* Rating reason input field */
.rating-reason-input {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: 0.375rem;
  border: 1px solid rgba(209, 213, 219, 0.6);
  background-color: rgba(255, 255, 255, 0.9);
  min-height: 1.625rem;
  max-height: 6rem;
  outline: none;
  transition: all 0.2s ease;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-wrap: break-word;
  display: block;
}

.rating-reason-input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.08);
  background-color: rgba(255, 255, 255, 1);
}

.rating-reason-input:empty::before {
  content: attr(placeholder);
  color: rgba(156, 163, 175, 0.8);
  font-style: italic;
  font-size: 0.75rem;
}

/* Save confirmation animations */
.rating-reason-saved {
  animation: saveSuccess 1.5s ease-out;
}

.rating-reason-error {
  animation: saveError 1.5s ease-out;
}

@keyframes saveSuccess {
  0% {
    background-color: rgba(134, 239, 172, 0.4);
    border-color: rgba(34, 197, 94, 0.6);
  }
  50% {
    background-color: rgba(134, 239, 172, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
  }
  100% {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(209, 213, 219, 0.6);
  }
}

@keyframes saveError {
  0% {
    background-color: rgba(252, 165, 165, 0.4);
    border-color: rgba(239, 68, 68, 0.6);
  }
  50% {
    background-color: rgba(252, 165, 165, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
  }
  100% {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(209, 213, 219, 0.6);
  }
}

/* Autocomplete suggestions */
.autocomplete-suggestions {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid rgba(209, 213, 219, 0.8);
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 9999;
}

.autocomplete-suggestions.hidden {
  display: none;
}

.suggestion-item {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  transition: background-color 0.15s ease;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Phase 1: Typography & Readability Enhancements */

/* Modern, less nerdy font stack - system fonts */
#rapid_answers {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

/* Improved text readability for main content */
#rapid_answers .code-block {
  line-height: 1.6;
  max-width: 75ch;
  color: #111827;
  font-family: inherit; /* Use modern font, not monospace */
}

/* Specific sizing for different content types */
/* Summary text - 1.3rem */
#rapid_answers .code-block.text-xs {
  font-size: 1.3rem !important;
  line-height: 1.5;
  color: #4B5563;
  font-weight: 400;
}

/* Main input/output text - keep at 1.6rem */
#rapid_answers .code-block.font-semibold {
  font-size: 1.6rem;
  color: #111827;
  font-weight: 600;
}

/* Better paragraph spacing in formatted content */
#rapid_answers .whitespace-pre-wrap p {
  margin-bottom: 0;
}

#rapid_answers .content-paragraph {
  margin-bottom: 1rem;
}

#rapid_answers .content-paragraph:last-child {
  margin-bottom: 0;
}

/* Improved contrast for truncated text */
#rapid_answers .truncated-text {
  color: #111827;
}

/* Prominent ticket link styling */
#rapid_answers .ticket-link {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

#rapid_answers .ticket-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Translated input/output - 1.3em */
#rapid_answers .code-block.text-gray-600.italic {
  font-size: 1.3em;
  line-height: 1.6;
}

/* First human answer - 1.3rem */
#rapid_answers .code-block.text-xs.text-gray-600.italic {
  font-size: 1.3rem !important;
  line-height: 1.5;
}

/* Better readability for translated text */
#rapid_answers .text-gray-600 {
  color: #4B5563;
  line-height: 1.5;
}

#rapid_answers .text-gray-700 {
  color: #374151;
}

/* Dashboard-inspired card enhancements */
#rapid_answers .rapid-answer-card {
  background: var(--fallback-b2, oklch(var(--b2)/1));
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#rapid_answers .rapid-answer-card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

#rapid_answers .rapid-answer-card-expanded {
  background: #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.15);
  padding: 1.5rem;
  border: 2px solid var(--fallback-p, oklch(var(--p)/0.5));
}

/* Better section separation */
#rapid_answers .grid-layout-app > div {
  padding: 1rem;
}

#rapid_answers .grid-layout-app {
  gap: 0.5rem;
}
