/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

.cursor-grab { cursor: grab; }

.admin-frame-controls { max-width: 320px; }
.docs-container { max-width: 48rem; }

.frame-photo-placeholder { aspect-ratio: var(--frame-aspect-ratio, 1); }

.blob-cache-progress { height: 1.5rem; }

/* Bulk-select on the photo grid. The overlay is a transparent label that
 * sits above the whole card; only interactive in selecting mode. The corner
 * checkbox is the affordance; the rest of the overlay just bubbles its
 * click to the checkbox via the <label> wrapper. */
.bulk-select-card { position: relative; }
.bulk-select-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  margin: 0;
  cursor: pointer;
  border-radius: inherit;
}
.bulk-selecting .bulk-select-overlay { display: block; }
.bulk-selecting .cursor-grab { cursor: pointer; }
.bulk-selecting .bulk-select-hide { display: none; }

.bulk-select-check {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.bulk-select-overlay:has(.bulk-select-check:checked) {
  background-color: rgba(13, 110, 253, 0.18);
  outline: 3px solid #0d6efd;
  outline-offset: -3px;
}

.bulk-select-toolbar {
  position: sticky;
  bottom: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.5rem;
}
.bulk-select-toolbar[hidden] { display: none; }

/* Full-bleed slideshow kiosk. Shared by the /viewer page (which toggles
 * between a pairing card on a dark backdrop and the slideshow) and the
 * session-authenticated frame preview. The slideshow itself is the
 * .viewer-mode-panel block: image with left/right overlay arrows. */
.viewer-body {
  background: #000;
  color: #eee;
  margin: 0;
  min-height: 100vh;
}
.viewer-pair-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.viewer-pair-card {
  background: #fff;
  color: #222;
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 28rem;
  width: 100%;
  text-align: center;
}
.viewer-pair-qr {
  display: flex;
  justify-content: center;
  min-height: 12rem;
}
.viewer-pair-qr svg { max-width: 16rem; height: auto; }
.viewer-pair-code-text {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  background: #f6f6f6;
  border-radius: 0.35rem;
  word-break: break-all;
}

.viewer-mode-panel {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-image {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  display: block;
}
.viewer-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 15vw;
  min-width: 3rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: none;
  font-size: 4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.3s ease;
}
.viewer-overlay:hover,
.viewer-overlay:focus { background: rgba(255, 255, 255, 0.08); color: #fff; outline: none; }
.viewer-overlay-prev { left: 0; }
.viewer-overlay-next { right: 0; }
.viewer-status {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.viewer-exit {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
.viewer-exit:hover { opacity: 1; }

/* Chromecast launcher on the preview page. <google-cast-launcher> self-hides
 * when no Cast device is reachable; when shown it sits opposite the exit
 * button and fades with the rest of the overlay chrome on idle. */
.viewer-cast {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  --connected-color: #fff;
  --disconnected-color: #fff;
}
.viewer-cast:hover { opacity: 1; }

.viewer-mode-panel.viewer-idle { cursor: none; }
.viewer-mode-panel.viewer-idle .viewer-overlay,
.viewer-mode-panel.viewer-idle .viewer-exit,
.viewer-mode-panel.viewer-idle .viewer-cast,
.viewer-mode-panel.viewer-idle .viewer-status {
  opacity: 0;
  pointer-events: none;
}
