/* ============================================================
   TESTCAMPS.COM — Custom Styles (Tailwind üstünə əlavə)
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #ea580c;
}

/* Smooth transitions */
* { transition: background-color 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Toast animation */
.toast-enter { animation: slideIn 0.3s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Navbar active tab */
.nav-tab.active { background: var(--primary); color: white; }
.nav-tab:not(.active):hover { background: rgba(255,255,255,0.1); }

/* Sidebar nav */
.sidebar-link { transition: all 0.15s; }
.sidebar-link:hover { background: #f3f4f6; }
.sidebar-link.active { background: #2563eb; color: white; }
.sidebar-link.active:hover { background: #1d4ed8; }

/* Card hover effect */
.card-hover:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }

/* Question option styling */
.option-btn { cursor: pointer; transition: all 0.15s; }
.option-btn:hover { border-color: #93c5fd; background: #eff6ff; }
.option-btn.selected { border-color: #2563eb; background: #dbeafe; color: #1d4ed8; }
.option-btn.correct { border-color: #16a34a; background: #dcfce7; color: #166534; }
.option-btn.wrong { border-color: #dc2626; background: #fef2f2; color: #991b1b; }

/* Timer pulse */
.timer-pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* Stats card */
.stat-card { transition: transform 0.15s; }
.stat-card:hover { transform: scale(1.02); }

/* Table row hover */
.table-row:hover { background: #f9fafb; }

/* Empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 3rem; color: #9ca3af;
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

/* Print styles */
@media print { .no-print { display: none !important; } body { background: white; } }

/* ============================================================
   HAMBURGER MENU
   ============================================================ */
.hamburger-btn {
  display: none; background: none; border: none; color: white;
  font-size: 1.5rem; cursor: pointer; padding: 4px; line-height: 1;
}

/* Mobile slide menu overlay */
.mobile-menu-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 50;
}
.mobile-menu-overlay.open { display: block; }
.mobile-menu-panel {
  background: #1f2937; width: 270px; height: 100%; padding: 0;
  overflow-y: auto; animation: slideFromLeft 0.25s ease;
}
@keyframes slideFromLeft { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.mobile-menu-panel .menu-header {
  padding: 16px; border-bottom: 1px solid #374151;
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu-panel .menu-header span { color: white; font-weight: bold; font-size: 16px; }
.mobile-menu-close {
  color: #9ca3af; font-size: 1.5rem; cursor: pointer;
  background: none; border: none; padding: 4px 8px;
}
.mobile-menu-panel .nav-tab {
  display: block; width: 100%; text-align: left;
  padding: 12px 16px; margin: 0; border-radius: 0;
  font-size: 14px; color: #d1d5db; border-bottom: 1px solid #374151;
}
.mobile-menu-panel .nav-tab.active { background: var(--primary); color: white; }
.mobile-menu-panel .menu-info {
  padding: 12px 16px; border-top: 1px solid #374151; margin-top: 8px;
}

/* Nav tabs desktop wrapper */
.nav-tabs-desktop { display: flex; gap: 4px; }

/* ============================================================
   TABLE RESPONSIVE — horizontal scroll
   ============================================================ */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-responsive table { min-width: 650px; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* TABLET ≤1024px */
@media (max-width: 1024px) {
  .hide-tablet { display: none !important; }
  .nav-right .desktop-label { display: none; }
}

/* MOBILE ≤768px */
/* Tag tree hover actions */
.tag-row .tag-actions { display: none; }
.tag-row:hover .tag-actions { display: flex; }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .hamburger-btn { display: block; }
  .nav-tabs-desktop { display: none !important; }

  nav { padding: 10px 14px !important; }
  .content-area { padding: 12px !important; }

  /* Stat grids → 2 columns */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }

  /* All grids to 1 col on mobile */
  .resp-grid { grid-template-columns: 1fr !important; }

  /* Teacher cards → 2 col */
  #teacher-cards { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }

  /* Modal full width */
  .tc-modal-content,
  [style*="max-width: 500px"],
  [style*="max-width: 600px"],
  [style*="max-width: 700px"] {
    width: 95vw !important; max-width: none !important; margin: 8px auto !important;
  }

  /* Course selector compact */
  #course-selector { max-width: 110px; font-size: 11px; }

  /* Detail header stack */
  .detail-header { flex-direction: column !important; text-align: center; }
  .detail-header .ml-auto { margin-left: 0 !important; margin-top: 8px; }

  /* Heading smaller */
  h2.text-xl { font-size: 16px !important; }

  /* Hide columns marked hide-mobile */
  .hide-mobile { display: none !important; }

  /* Exam nav bar */
  .exam-nav { flex-wrap: wrap; gap: 6px; }

  /* Question nav dots smaller */
  .q-dot { width: 28px !important; height: 28px !important; font-size: 11px !important; }
}

/* SMALL PHONE ≤480px */
@media (max-width: 480px) {
  nav { padding: 8px 10px !important; }
  .content-area { padding: 8px !important; }
  .stats-grid { gap: 6px !important; }
  .stat-card { padding: 8px !important; }
  .stat-card .text-2xl { font-size: 16px !important; }

  #teacher-cards { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }
  .teacher-card { padding: 8px !important; }
  .teacher-card .tc-avatar { width: 36px !important; height: 36px !important; font-size: 13px !important; }
  .teacher-card .tc-name { font-size: 12px !important; }

  .tc-modal-content,
  [style*="max-width"] {
    width: 100vw !important; margin: 0 !important; border-radius: 0 !important;
    max-height: 100vh; min-height: 100vh;
  }
}
