/* Additional custom styles beyond Tailwind */

.mermaid {
  width: 100%;
  overflow: auto;
}

/* Mobile responsiveness adjustments */
@media (max-width: 768px) {
  .mermaid svg {
    max-width: 100%;
    height: auto;
  }
}

/* Custom scrollbar for code areas */
textarea::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

textarea::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb {
  background: #cdcdcd;
  border-radius: 4px;
}

textarea::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Animation for the download button */
#download-btn:active {
  transform: scale(0.97);
}

/* Ensure mermaid diagrams are centered and support pan/zoom */
.mermaid svg {
  margin: 0 auto;
  cursor: grab;
  max-width: 100%;
  overflow: visible !important;
}

.mermaid svg:active {
  cursor: grabbing;
}

/* Make the output area larger and better for interaction */
#mermaid-output {
  position: relative;
  transition: all 0.2s ease;
  min-height: 24rem;
}

/* Make sure pan/zoom controls display properly */
.mermaid-viewport-control {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 10;
  padding: 5px;
}

/* Responsive sizing for mobile */
@media (max-width: 640px) {
  #mermaid-output {
    min-height: 50vh !important;
  }
}
