/* DevOps Toolkit Custom Styles */

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Smooth transitions for theme changes */
* {
  transition-property: background-color, border-color, color;
  transition-duration: 300ms;
  transition-timing-function: ease-in-out;
}

/* Calculator panel transitions */
.calculator-panel {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tab active state animations */
.calculator-tab {
  transition: all 0.2s ease-in-out;
}

.calculator-tab.active {
  border-bottom-color: #ff7800;
  color: #ff7800;
}

/* Input field styles */
.calc-input {
  transition: all 0.2s ease-in-out;
}

.calc-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #ff7800;
  border-color: #ff7800;
}

.calc-input.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.dark .calc-input.error {
  background-color: #7f1d1d;
}

/* Result card styles */
.result-card {
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Copy button animation */
.copy-btn {
  transition: all 0.2s ease-in-out;
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn.copied {
  background-color: #10b981;
  color: white;
}

/* Saved calculation item */
.saved-item {
  transition: all 0.2s ease-in-out;
}

.saved-item:hover {
  transform: translateX(4px);
}

/* Dictionary term styles */
.dictionary-term {
  scroll-margin-top: 120px;
}

.dictionary-category {
  border-left: 4px solid #ff7800;
}

/* Scrollbar styling for dark mode */
.dark ::-webkit-scrollbar {
  width: 8px;
}

.dark ::-webkit-scrollbar-track {
  background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Loading spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  animation: spin 1s linear infinite;
}

/* Tooltip */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: #1f2937;
  color: white;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  margin-bottom: 0.5rem;
}

.tooltip:hover::after {
  opacity: 1;
}
