/* ==========================================================================
   ARCHIVAL GALLERY & EXHIBITION SYSTEM (DESIGN-3.md)
   ========================================================================== */

:root {
  color-scheme: light;
  --archival-ivory: #faf9f7;
  --archival-mount: #f3f1ec;
  --structural-stone: #e7e5e0;
  --carbon-ink: #121212;
  --museum-gold: #d4af37;
  --warm-graphite: #8a857b;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #faf9f7;
  color: #121212;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Native Modal Dialogs — DESIGN-3.md Hairline Framing & 40% #121212 Backdrop without blur */
dialog {
  border: 1px solid #e7e5e0;
  background-color: #faf9f7;
  color: #121212;
  padding: 0;
  max-width: 96vw;
  max-height: 94dvh;
  border-radius: 0px;
  box-shadow: none;
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background-color: rgba(18, 18, 18, 0.4);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Navigation Links (template Stitch) */
.nav-link {
  color: #444748;
  transition: color 0.2s ease;
}
.nav-link:hover {
  color: #121212;
}
.nav-link-active {
  color: #121212 !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
}

/* Exhibition Cards & Image Frames (DESIGN-3.md — Shadowless Float & 1px Hairline Border) */
.gallery-card {
  background-color: #faf9f7;
  border: 1px solid #e7e5e0;
  border-radius: 0px;
  box-shadow: none !important;
  transition: border-color 0.2s ease;
}

.gallery-card:hover,
.gallery-card:focus-within {
  border-color: #121212;
}

/* Off-white #F3F1EC passepartout mount framed by 1px #E7E5E0 hairline border */
.archival-mount {
  background-color: #f3f1ec;
  padding: 14px;
  border-bottom: 1px solid #e7e5e0;
}

/* Buttons & Interactive Links (DESIGN-3.md) */
.btn-molten-gold {
  background-color: #121212;
  color: #faf9f7;
  font-weight: 600;
  border-radius: 0px;
  border: 1px solid #121212;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-molten-gold:hover {
  background-color: #2a2826;
}

.btn-darkroom-secondary {
  background-color: transparent;
  border: 1px solid #121212;
  color: #121212;
  border-radius: 0px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-darkroom-secondary:hover {
  background-color: #121212;
  color: #faf9f7;
}

/* Archival Placards & Metadata Chips (DESIGN-3.md — Strictly rectangular, no pills) */
.chip-archival {
  background-color: #faf9f7;
  border: 1px solid #e7e5e0;
  color: #121212;
  border-radius: 0px;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chip-archival:hover {
  border-color: #121212;
  background-color: #f3f1ec;
}

.chip-archival-active {
  background-color: #121212;
  border: 1px solid #121212;
  color: #faf9f7;
  border-radius: 0px;
}

/* Input Fields (DESIGN-3.md — 1px encased structural boxes #E7E5E0, focus #121212) */
input[type="text"],
input[type="search"],
input[type="password"],
select,
textarea {
  background-color: #faf9f7;
  border: 1px solid #e7e5e0;
  color: #121212;
  border-radius: 0px;
  transition: border-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #8a857b;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #121212 !important;
  box-shadow: none !important;
}

/* Dropzone active state */
.dropzone-active {
  border-color: #121212 !important;
  background-color: #f3f1ec !important;
}

/* Toast notification animation */
.toast-enter {
  transform: translateY(0);
  opacity: 1;
}
.toast-hidden {
  transform: translateY(1rem);
  opacity: 0;
  pointer-events: none;
}

/* Gallery Vitrine Modal — Fullscreen Darkroom State (#121212) with zero chrome */
#lightboxDialog {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0px !important;
  background-color: #121212 !important;
  box-shadow: none !important;
}

#lightboxDialog::backdrop {
  background-color: #121212 !important;
}

#lightboxDialog #lightboxViewerArea {
  padding: 0 !important;
  margin: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  background-color: #121212 !important;
}

#lightboxDialog #lightboxImg {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  object-fit: contain !important;
  border-radius: 0px !important;
}
