/* General Body Styles */
body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: white;
}

/* Helper class to hide elements */
.hidden {
  display: none !important;
}

/* Loading Indicator */
#loader {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  font-size: 1.2rem;
}

/* Camera and Preview Container Styles */
#camera-container,
#preview-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Video and Canvas Styles */
#video,
#canvas {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This makes the video/canvas cover the whole screen */
}

/* The Negative Filter Effect */
#video,
#canvas {
  filter: invert(100%);
}

/* Capture Button (the circle at the bottom) */
#capture-button {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  background-color: rgba(255, 255, 255, 0.8);
  border: 5px solid white;
  border-radius: 50%;
  cursor: pointer;
  outline: none;
}

#capture-button:active {
  background-color: white;
}

/* Toggle Camera Button */
#toggle-camera-button {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid white;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Container for Save/Retake buttons */
.button-container {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
}

/* Save and Retake Button Styles */
#save-button,
#retake-button {
  padding: 15px 25px;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid white;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  outline: none;
}

/* Accessibility: Focus styles */
:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ---------- Artwork prompt styles ---------- */
/* Small semi-transparent banner near the top (non-blocking) */
.artwork-prompt {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  width: auto;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
}

/* Inner container holds message and close button */
.artwork-prompt__inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Visible state toggles pointer events and opacity */
.artwork-prompt.artwork-prompt--visible {
  opacity: 1;
  pointer-events: auto;
}

/* Text style */
.artwork-prompt__text {
  font-size: 1rem;
  font-weight: 600;
}

/* Close button */
.artwork-prompt__close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: 6px;
}
.artwork-prompt__close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Small "Don't show again" area */
.artwork-prompt__dismiss-remember {
  margin-left: 12px;
  font-size: 0.85rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
}

/* Fade animation (respected only when user does not request reduced motion) */
@media (prefers-reduced-motion: no-preference) {
  .artwork-prompt {
    transition: opacity 260ms ease, transform 260ms ease;
    transform-origin: center top;
  }

  .artwork-prompt.artwork-prompt--visible {
    transform: translateX(-50%) translateY(0);
  }
}

/* If reduced motion is preferred, avoid transitions */
@media (prefers-reduced-motion: reduce) {
  .artwork-prompt,
  .artwork-prompt.artwork-prompt--visible {
    transition: none !important;
  }
}

/* Responsiveness: slightly smaller text on very small screens */
@media (max-width: 360px) {
  .artwork-prompt__text {
    font-size: 0.95rem;
  }
}
