/* ---------- Global: disable selection + dragging ---------- */
/* Apply with caution — affects everything on the page */
*,
*::before,
*::after {
  -webkit-user-select: none;
  /* Safari, Chrome */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* IE10+ */
  user-select: none;
  /* Standard */
  -webkit-touch-callout: none;
  /* iOS Safari long-press menu */
  -webkit-tap-highlight-color: transparent;
  /* mobile tap highlight */
}

/* Prevent dragging of media and links (best-effort via CSS) */
img,
svg,
video,
a {
  -webkit-user-drag: none;
  /* Safari/Chrome */
  user-drag: none;
  /* non-standard but supported in some browsers */
  pointer-events: auto;
  /* keep pointer events enabled for links/buttons */
}

/* ---------- Class: apply only where needed ---------- */
.no-select,
.no-select * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.no-drag img,
.no-drag svg,
.no-drag video,
.no-drag a {
  -webkit-user-drag: none;
  user-drag: none;
}

/* A few custom styles to complement Tailwind */
body {
  font-family: 'Inter', sans-serif;
}

/* Custom scrollbar for a more polished look */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f5f9;
  /* slate-100 */
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  /* slate-300 */
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
  /* slate-400 */
}

/* Selection box for drag-to-select */
#selection-box {
  position: fixed;
  /* Use fixed positioning to be relative to viewport */
  border: 1px solid #38bdf8;
  /* sky-400 */
  background-color: rgba(125, 211, 252, 0.4);
  /* sky-300 with opacity */
  z-index: 999;
  pointer-events: none;
}

/* For SweetAlert2 dark mode compatibility */
.swal2-title,
.swal2-html-container {
  color: #1e293b !important;
}

.swal2-popup .swal2-html-container {
  text-align: left;
}

/* Info Panel transitions */
#info-panel {
  transition: transform 0.3s ease-in-out;
}

#info-panel.open {
  transform: translateX(0);
}

main.info-panel-open {
  padding-right: 384px;
  /* 96 * 4 */
  transition: padding-right 0.3s ease-in-out;
}

#breadcrumb-container::-webkit-scrollbar {
  height: 4px;
}

#breadcrumb-container::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#breadcrumb-container::-webkit-scrollbar-thumb {
  background: #a5b4fc;
  /* indigo-300 */
  border-radius: 2px;
}

#breadcrumb-container::-webkit-scrollbar-thumb:hover {
  background: #818cf8;
  /* indigo-400 */
}

/* For Firefox */
#breadcrumb-container {
  scrollbar-width: thin;
  scrollbar-color: #a5b4fc #f1f1f1;
}

#file-preview-modal {
  background-color: rgba(30, 41, 59, 0.9);
  /* slate-800 with opacity */
}

.swal2-html-container * {
  text-align: center;
}

div:where(.swal2-container) {
  z-index: 1062 !important;
}

.swal2-popup .swal2-html-container {
  text-align: center;
}

.titlebar {
  padding: 3px 3px;
  background-color: #f6f6f6;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10451;
  transform: translateZ(42px);
}

[data-style="dark"] .titlebar {
  background-color: #25293c;
}

.titlebar.webkit-draggable {
  -webkit-app-region: drag;
}

.titlebar-stoplight {
  float: left;
}

.titlebar:after,
.titlebar-stoplight:after {
  content: ' ';
  display: table;
  clear: both;
}

.titlebar-stoplight:hover .titlebar-close {
  background-position: -26px 0;
}

.titlebar-stoplight:hover .titlebar-minimize {
  background-position: 0 0;
}

.titlebar-stoplight:hover .titlebar-fullscreen {
  background-position: -13px 0;
}

.titlebar.alt .titlebar-stoplight:hover .titlebar-close {
  background-position: -104px 0;
}

.titlebar.alt .titlebar-stoplight:hover .titlebar-minimize {
  background-position: -78px 0;
}

.titlebar.alt .titlebar-stoplight:hover .titlebar-fullscreen {
  background-position: -91px 0;
}

.titlebar-close,
.titlebar-minimize,
.titlebar-fullscreen {
  float: left;
  margin: 6px 4px;
  background-repeat: no-repeat;
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOgAAAAYCAYAAADwO7FhAAAABm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vWGa6+E2dtbM1OSJ3TbPWN8GBFoji3jzfJdWTCT7e8tku0L5r3We/7ZEafFPkh2HTdLj3SPDdL35VqbO6izkj+22tQFtYUSgObKKN38C3Rs6UHcweKBOEREqG2We/vqY1Z/n2Vn5B1XBEaEYms2gJ7W2GzmtDQgZ9DUmq3jzJlBVAyKYfIzEgslHSCSYQkyUjxEjqBFczYGCiIAYwKTXNsFJ3bPDTgsEsiCLePM4i+sAw+iXd2j8zKQ+f1t/aa1re5rZ2s5C3vsMbuBikFW8eROoc1WMKSBRBZGIVJB6pILdK30x6WCDXvhHKwEP9I+P+jbhWLwJ1JgOANR2tNCXDQRapx3/ZlbnUjxrCwReV4JA25RoepZoeta3GQHPBIEGAm3MfxIveNEtAGhmAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==);
  background-size: auto 12px;
  width: 12px;
  height: 12px;
  border-radius: 6px;
}

.titlebar.webkit-draggable .titlebar-close,
.titlebar.webkit-draggable .titlebar-minimize,
.titlebar.webkit-draggable .titlebar-fullscreen {
  -webkit-app-region: no-drag;
}

.titlebar-close {
  position: relative;
  margin-left: 6px;
  background-position: -65px 0;
}

.titlebar-fullscreen {
  position: relative;
  background-position: -52px 0;
}

.titlebar-minimize {
  position: relative;
  background-position: -39px 0;
}

.titlebar-close:active::after,
.titlebar-minimize:active::after,
.titlebar-fullscreen:active::after {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  content: "";
  background: rgba(0, 0, 0, .25);
  border-radius: 100%;
}

.is-phoenix {
  overflow: hidden;
}

.is-phoenix .titlebar {
  display: block;
}

.is-phoenix .phoenix-section .scrollable-ct {
  display: none;
}

.is-native:not(.is-reactive) {
  /*display: none;*/
}

.is-native .phoenix-section .scrollable-ct {
  display: block;
}

.is-native .titlebar {
  display: none;
}

.is-phoenix body::-webkit-scrollbar {
  display: none;
}

.is-phoenix body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.is-phoenix #layout-menu,
.is-phoenix #layout-navbar {
  top: 30px;
}

.is-phoenix .layout-wrapper,
.is-phoenix .layout-container,
.is-phoenix #drive-wrapper {
  padding-top: 30px !important;
}