/* base.css — Reset, body defaults, scrollbar, selection */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--base-size);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-primary);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--link-hover);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

code, pre, kbd {
  font-family: var(--font-mono);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

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

/* Selection */
::selection {
  background: var(--primary-color);
  color: #ffffff;
}

/* Visually hidden (accessible) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hidden views */
.view-hidden {
  display: none !important;
}

/* Hide everything except content in consume/share mode */
html.consume-mode .app-header,
html.consume-mode #add-view,
html.consume-mode #collection-view {
  display: none !important;
}

html.consume-mode .app-container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 100vh;
}

/* Lock scroll when modal/lightbox is open */
body.modal-open,
body.lightbox-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
}
