/* Photo Dedication (Slice A): guest form, moderator queue, projector
   slideshow and the dashboard's photo panel. Shared by both sites. */

/* ---------- guest form (player site) ---------- */
.photo-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.5rem;
  text-align: center;
}
.photo-instr {
  margin: 0.6rem auto 1rem;
  max-width: 22rem;
  text-align: center;
  opacity: 0.85;
}
.photo-full {
  max-width: 22rem;
  margin: 0 auto 1rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(255, 196, 0, 0.15);
  border: 1px solid rgba(255, 196, 0, 0.5);
  text-align: center;
  font-weight: 600;
}
.photo-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  max-width: 24rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.photo-msg {
  resize: vertical;
  font-family: inherit;
  min-height: 4.5rem;
}
.photo-picker {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.photo-add {
  display: inline-block;
  width: 100%;
  padding: 0.9rem;
  border: 2px dashed currentColor;
  border-radius: 10px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.9;
}
.photo-hint {
  font-size: 0.8rem;
  opacity: 0.7;
  text-align: center;
}
.photo-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.photo-thumb-rm {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #d33;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* ---------- moderator queue (player site) ---------- */
.mod-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 26rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}
.mod-card {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.9rem;
  background: rgba(0, 0, 0, 0.25);
}
.mod-name {
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.mod-msg {
  margin-bottom: 0.7rem;
  white-space: pre-wrap;
  word-break: break-word;
  opacity: 0.92;
}
.mod-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.mod-photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}
.mod-photo-failed {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d33;
  font-size: 0.7rem;
}
.mod-actions {
  display: flex;
  gap: 0.6rem;
}
.mod-actions .btn {
  flex: 1;
}
.mod-empty {
  text-align: center;
  opacity: 0.8;
  padding: 2rem 1rem;
}

/* ---------- projector (host site) ---------- */
.photo-stage {
  position: relative;
  height: calc(100vh - 60px);
  display: flex;
  background: #0a0a10;
}
.photo-main {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.photo-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: photo-fade 0.6s ease;
}
@keyframes photo-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.photo-slide-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.photo-slide-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 3rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  text-align: center;
}
.photo-slide-msg {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.photo-slide-name {
  font-size: 1.2rem;
  opacity: 0.9;
}
.photo-empty {
  text-align: center;
  padding: 2rem;
}
.photo-empty-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.photo-empty-sub {
  font-size: 1.1rem;
  opacity: 0.85;
}
.photo-rail {
  width: 300px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem;
  gap: 0.8rem;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.03);
}
.photo-rail .qr-box {
  width: 190px;
}
.photo-rail .pin {
  font-size: 2rem;
  letter-spacing: 0.15em;
}
.photo-rail-instructions {
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.9;
}
.photo-rail-stats {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.85;
}
.photo-rail-full {
  color: #ffc400;
  font-weight: 700;
}
.photo-settings {
  position: fixed;
  top: 60px;
  right: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: #15151f;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.2rem;
  overflow-y: auto;
  z-index: 30;
}
.photo-settings h3 {
  margin: 0 0 0.6rem;
}
.photo-settings section {
  margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 1.1rem;
}
.photo-settings label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
}
.photo-settings input[type="range"] {
  width: 100%;
}
.photo-settings .btn {
  margin-top: 0.5rem;
}
.photo-settings .btn.danger {
  margin-top: 1.2rem;
  width: 100%;
}
.photo-q-item {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  align-items: flex-start;
}
.photo-q-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}
.photo-q-body {
  flex: 1;
  min-width: 0;
}
.photo-q-name {
  font-weight: 700;
  font-size: 0.9rem;
}
.photo-q-msg {
  font-size: 0.85rem;
  opacity: 0.85;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0.15rem 0 0.4rem;
}
.photo-q-actions {
  display: flex;
  gap: 0.4rem;
}
.photo-q-actions .btn {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
}
.photo-moderator-link {
  font-size: 0.8rem;
  word-break: break-all;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  margin: 0.4rem 0;
}
.photo-ended {
  height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.photo-ended-title {
  font-size: 2rem;
  font-weight: 700;
}

/* ---------- dashboard photo panel ---------- */
.db-photo-tile {
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1rem;
}
.db-photo-tile:hover {
  border-color: #ffc400;
}
.db-photo-tile-title {
  font-weight: 700;
  font-size: 1.05rem;
}
.db-photo-tile-sub {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 0.25rem;
}
.db-photo-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.db-photo-box {
  background: #15151f;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 1.5rem;
  width: 380px;
  max-width: 92vw;
}
.db-photo-box h2 {
  margin: 0 0 0.8rem;
}
.db-photo-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.db-photo-box input[type="range"] {
  width: 100%;
  margin-bottom: 0.4rem;
}
.db-photo-value {
  text-align: center;
  font-weight: 700;
  margin-bottom: 1rem;
}
.db-photo-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .photo-rail {
    width: 240px;
  }
  .photo-slide-msg {
    font-size: 1.4rem;
  }
}
@media (max-width: 640px) {
  .photo-stage {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 60px);
  }
  .photo-main {
    min-height: 55vh;
  }
  .photo-rail {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* ---------- projection grid (Slice 7c) ---------- */
.photo-grid {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 8px;
  padding: 8px;
}
.pg-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}
.pg-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pg-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.8rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  text-align: center;
}
.pg-msg {
  font-size: clamp(0.9rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  white-space: pre-wrap;
  word-break: break-word;
}
.pg-name {
  font-size: clamp(0.7rem, 1.4vw, 1rem);
  opacity: 0.9;
  margin-top: 0.2rem;
}
.pg-leaving {
  animation: pg-out 0.5s ease forwards;
}
.pg-entering {
  animation: pg-in 0.5s ease;
}
@keyframes pg-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-4%); }
}
@keyframes pg-in {
  from { opacity: 0; transform: translateX(4%); }
  to { opacity: 1; transform: translateX(0); }
}
.photo-controls {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.layout-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-weight: 700;
  cursor: pointer;
}
.layout-btn.active {
  background: rgba(255, 196, 0, 0.25);
  border-color: #ffc400;
}
.layout-btn.next-btn {
  flex: 1;
}

/* ---------- moderation surface (Slice 7c) ---------- */
.pm-banner {
  max-width: 42rem;
  margin: 0.8rem auto 0;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: rgba(255, 196, 0, 0.15);
  border: 1px solid rgba(255, 196, 0, 0.5);
  font-weight: 600;
  text-align: center;
}
.pm-tabs {
  display: flex;
  gap: 0.4rem;
  max-width: 42rem;
  margin: 1rem auto 0.6rem;
  padding: 0 1rem;
}
.pm-tab {
  flex: 1;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
}
.pm-tab.active {
  background: rgba(255, 196, 0, 0.25);
  border-color: #ffc400;
}
.pm-count {
  display: inline-block;
  min-width: 1.4em;
  text-align: center;
  border-radius: 1em;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1em 0.4em;
  font-size: 0.8em;
}
.pm-list {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}
.pm-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.pm-interval {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.pm-interval-select {
  max-width: 9rem;
}
.pm-interval-note {
  width: 100%;
  font-size: 0.8rem;
  opacity: 0.7;
}
.pm-end .btn {
  width: 100%;
}
