* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 24px;
  font-family: "Helvetica", sans-serif;
  font-weight: 300;
  line-height: 1.9;
  background-color: #000000;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

/* Page title */

.headline {
  color: #ffd700;
}

/* Language buttons */

.language-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 112px;
  height: 40px;
  padding: 4px;
  border: none;
  border-radius: 20px;
  background: #ffd700;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Sliding indicator */

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 20px;
  background: #000000;
  transition: transform 0.25s ease;
}

/* Language labels */

.toggle-label {
  position: relative;
  flex: 1;
  z-index: 1;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #000000;
  transition: color 0.25s ease;
}

/* English selected */

.language-toggle:not(.is-lt) .toggle-label:nth-child(2) {
  color: #ffd700;
}

/* Lithuanian selected */

.language-toggle.is-lt .toggle-slider {
  transform: translateX(100%);
}

.language-toggle.is-lt .toggle-label:nth-child(3) {
  color: #ffd700;
}

.language-toggle:focus-visible {
  outline: 2px solid #ffd700;
  outline-offset: 4px;
}

/* Language buttons in lightbox*/

#lightbox .language-toggle {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px;
  border: none;
  outline: 2px solid #ffd700;
  background: #ffd700;
  z-index: 2;
}

#lightbox .toggle-slider {
  background: #000000;
}

#lightbox .toggle-label {
  color: #000000;
}

#lightbox .language-toggle:not(.is-lt) .toggle-label:nth-child(2),
#lightbox .language-toggle.is-lt .toggle-label:nth-child(3) {
  color: #ffd700;
}

/* Needed for touchscreen swipes */

#lightbox {
  touch-action: pan-y pinch-zoom;
  overscroll-behavior: contain;
}

#lightbox-image {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 16px;
}

.gallery[hidden] {
  display: none;
}

.gallery img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.gallery img:hover {
  transform: scale(1.02);
}

/* Lightbox */

#lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: #000000;
  color: #ffd700;
}

#lightbox[open] {
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox-image {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  user-select: none;
}

#lightbox button {
  position: absolute;
  background: transparent;
  border: none;
  color: #ffd700;
  font-size: 32px;
  padding: 12px;
  cursor: pointer;
  z-index: 1;
}

#close {
  top: 15px;
  right: 20px;
}

#prev {
  left: 10px;
}

#next {
  right: 10px;
}

#counter {
  position: absolute;
  bottom: 20px;
  color: #ffd700;
  font-size: 16px;
}

body:has(#lightbox[open]) {
  overflow: hidden;
}
