@import url("/assets/css/style.css");
@import url("/assets/css/modules/theme.css");
@import url("/assets/css/modules/nav.css");
@import url("/assets/css/modules/gallery.css");
@import url("/assets/css/modules/lightbox.css");

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  min-width: 280px;
}

.page-content {
  min-height: calc(100dvh - 190px);
}

.protected-gallery-login {
  width: min(100%, var(--readable-max, 760px));
  margin: clamp(1rem, 7vh, 4.5rem) 0;
  padding: clamp(1.1rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.protected-gallery-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
}

.protected-gallery-login h1,
.protected-gallery-title {
  margin: 0;
  letter-spacing: 0;
}

.protected-gallery-login > p:not(.protected-gallery-label) {
  max-width: 620px;
  color: var(--muted);
}

.protected-gallery-form {
  max-width: 620px;
  margin-top: 1.5rem;
}

.protected-gallery-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 650;
}

.protected-gallery-form__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.protected-gallery-form input,
.protected-gallery-form button,
.protected-gallery-logout {
  min-height: var(--tap-target-min, 44px);
  border: 1px solid var(--border);
  border-radius: 0;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  box-sizing: border-box;
}

.protected-gallery-form input {
  width: 100%;
  padding: 0.55rem 0.7rem;
}

.protected-gallery-form button,
.protected-gallery-logout {
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  font-weight: 650;
}

.protected-gallery-form button:hover,
.protected-gallery-form button:focus-visible,
.protected-gallery-logout:hover,
.protected-gallery-logout:focus-visible {
  background: color-mix(in srgb, var(--card) 72%, var(--fg) 8%);
}

.protected-gallery-form input:focus-visible,
.protected-gallery-form button:focus-visible,
.protected-gallery-logout:focus-visible {
  outline: 2px solid var(--link-hover);
  outline-offset: 2px;
}

.protected-gallery-form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.protected-gallery-status {
  min-height: 1.5rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.protected-gallery-title {
  margin-bottom: 0.55rem;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
}

.protected-gallery-logout {
  min-height: 34px;
  padding: 0.15rem 0.65rem;
  background: transparent;
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.gallery-sticky-actions .gallery-top-link {
  min-width: 8rem;
}

.photo-gallery {
  margin-top: 1rem;
}

@media (max-width: 600px) {
  .protected-gallery-form__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .protected-gallery-form button {
    width: 100%;
  }

  .gallery-sticky-actions {
    gap: 0.35rem;
  }

  .protected-gallery-logout,
  .gallery-sticky-actions .gallery-top-link {
    min-width: 0;
    padding-inline: 0.5rem;
    font-size: 0.82rem;
  }
}
