/*
 * Application Global Styles & Print Layouts
 */

/* YouTube-like subtle scrollbar for sidebar */
aside::-webkit-scrollbar {
  width: 6px;
}
aside::-webkit-scrollbar-track {
  background: transparent;
}
aside::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 9999px;
}
aside:hover::-webkit-scrollbar-thumb {
  background: #d4d4d8;
}
aside::-webkit-scrollbar-thumb:hover {
  background: #a1a1aa;
}

/* Sidebar Responsive Display Rules (Strict isolation between desktop and mobile) */
@media (max-width: 1023px) {
  /* On mobile and tablet, desktop sidebars are ALWAYS hidden */
  [data-sidebar-target="expandedSidebar"],
  [data-sidebar-target="miniSidebar"] {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  /* On desktop, show expanded or mini based on controller state */
  .sidebar-expanded [data-sidebar-target="expandedSidebar"] {
    display: flex !important;
  }
  .sidebar-expanded [data-sidebar-target="miniSidebar"] {
    display: none !important;
  }

  .sidebar-collapsed [data-sidebar-target="expandedSidebar"] {
    display: none !important;
  }
  .sidebar-collapsed [data-sidebar-target="miniSidebar"] {
    display: flex !important;
  }

  /* Mobile drawer and backdrop should never show on desktop */
  [data-sidebar-target="mobileDrawer"],
  [data-sidebar-target="backdrop"] {
    display: none !important;
  }
}

/* Expand main containers for wider, more immersive layout on desktop */
@media (min-width: 1024px) {
  .max-w-7xl {
    max-width: 1760px !important;
    width: 100% !important;
  }
  .max-w-6xl {
    max-width: 1620px !important;
    width: 100% !important;
  }
  .max-w-5xl {
    max-width: 1480px !important;
    width: 100% !important;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 15mm 15mm 15mm;
  }

  /* Hide non-printable elements */
  header,
  footer,
  nav,
  .no-print,
  button,
  form,
  .print-hidden,
  dialog {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #1e293b !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Make sure container expands nicely */
  .max-w-6xl,
  .max-w-5xl,
  .max-w-7xl {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Convert card styling to clean document sections */
  .bg-white,
  .bg-stone-50,
  .bg-slate-50 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }

  /* Clean print banner */
  .bg-gradient-to-r,
  .bg-gradient-to-tr {
    background: transparent !important;
  }

  /* Profile avatar in print */
  .rounded-full,
  .rounded-3xl {
    border-color: #cbd5e1 !important;
  }

  /* Print specific CV Header */
  .print-header {
    display: block !important;
    border-bottom: 2px solid #0f172a !important;
    padding-bottom: 12px !important;
    margin-bottom: 16px !important;
  }

  /* Force page breaks cleanly */
  .break-inside-avoid {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  a {
    text-decoration: none !important;
    color: inherit !important;
  }
}

