/* Custom styling & animations for DebTik - Debian Linux Router */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

html, body {
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
}

:root {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Smooth modal entry */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-in {
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
}

/* Mobile Friendly Touch & Layout Enhancements */
.overflow-y-auto, .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1023px) {
  #sidebar {
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.85);
  }
}

@media (max-width: 640px) {
  /* Prevent iOS Safari auto-zoom on input focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Responsive Modals on Mobile */
  .animate-in {
    max-height: 92vh !important;
    max-height: 92dvh !important;
    width: calc(100vw - 20px) !important;
    max-width: 100% !important;
    margin: auto;
    border-radius: 1rem;
  }
}

/* Accordion chevron transitions */
.chevron-icon {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chevron-open {
  transform: rotate(90deg);
}

/* Tree line hierarchy styling */
.tree-branch {
  position: relative;
}
.tree-branch::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 14px;
  width: 10px;
  height: 2px;
  background-color: #06b6d4;
  opacity: 0.6;
}

/* Glowing card effects */
.glow-brand {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.2);
}

.glow-cyan {
  box-shadow: 0 0 25px -5px rgba(6, 182, 212, 0.2);
}

/* Sortable Table Headers (WinBox / WebFig Style) */
th.table-sortable {
  cursor: pointer !important;
  user-select: none !important;
  transition: background-color 0.15s ease, color 0.15s ease;
  position: relative;
}

th.table-sortable:hover {
  background-color: rgba(30, 41, 59, 0.6) !important;
  color: #ffffff !important;
}

th.table-sorted-active {
  color: #38bdf8 !important;
  background-color: rgba(14, 165, 233, 0.08) !important;
}

.table-sort-icon {
  display: inline-block;
  margin-left: 5px;
  font-size: 10px;
  line-height: 1;
  vertical-align: middle;
  font-family: monospace;
  transition: opacity 0.15s ease, color 0.15s ease;
}
