/* ===== CSS RESET ===== */

/* Box sizing reset */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Remove default margins */
* {
  margin: 0;
}

/* Typography and line height */
html, body {
  height: 100%;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* Form elements */
input, button, textarea, select {
  font: inherit;
}

/* Remove button styles */
button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

/* Remove list styles */
ul, ol {
  list-style: none;
  padding: 0;
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--pg-primary);
  outline-offset: 2px;
}

/* Remove outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Scrollbar styling for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--pg-bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--pg-border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--pg-primary);
}

/* Selection colors */
::selection {
  background-color: var(--pg-primary);
  color: var(--pg-text-primary);
}

::-moz-selection {
  background-color: var(--pg-primary);
  color: var(--pg-text-primary);
}

/* Prevent text overflow */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* Root stacking context */
#root, #__next {
  isolation: isolate;
}