/* =============================================================================
   DISPOSABLE CAMERA WEB APP - STYLES
   =============================================================================
   Multi-screen layout with Join, Camera, and Gallery views.
   ============================================================================= */

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
}

/* =============================================================================
   CONTAINER & SCREENS
   ============================================================================= */

.container {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

/* =============================================================================
   HEADER & BRANDING
   ============================================================================= */

header {
  text-align: center;
  margin-bottom: 10px;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 0.9rem;
  color: #888;
}

.brand-header {
  text-align: center;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.brand-logo {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(255, 200, 50, 0.3));
}

.brand-header .subtitle {
  font-size: 1rem;
  color: #f0c040;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.powered-by {
  font-size: 0.75rem;
  color: #666;
  margin-top: 20px;
  text-align: center;
}

.powered-by strong {
  color: #f0c040;
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
  width: 100%;
  background-color: #2a2a2a;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
}

.card h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card-description {
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* =============================================================================
   INPUT GROUPS & BUTTONS
   ============================================================================= */

.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  border: 2px solid #444;
  border-radius: 8px;
  background-color: #333;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #666;
}

input[type="password"] {
  text-transform: none;
  letter-spacing: normal;
}

.btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn:hover:not(:disabled) {
  opacity: 0.9;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #4a9eff;
  color: #fff;
}

.btn-secondary {
  background-color: #444;
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  color: #888;
  border: 1px solid #444;
}

/* =============================================================================
   ERROR & MESSAGE DISPLAYS
   ============================================================================= */

.error-message {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-top: 10px;
  display: none;
}

.message {
  font-size: 0.85rem;
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  display: none;
}

.message.error {
  background-color: #4a2a2a;
  color: #ff6b6b;
}

.message.success {
  background-color: #2a4a3a;
  color: #88ffaa;
}

/* =============================================================================
   HOST CONTROLS ACCORDION
   ============================================================================= */

.host-controls {
  width: 100%;
  margin-top: 20px;
}

.host-controls summary {
  cursor: pointer;
  color: #666;
  font-size: 0.9rem;
  padding: 10px;
  text-align: center;
  user-select: none;
}

.host-controls summary:hover {
  color: #888;
}

.host-panel {
  background-color: #222;
  border-radius: 8px;
  padding: 20px;
  margin-top: 10px;
}

.host-section {
  margin-bottom: 25px;
}

.host-section:last-child {
  margin-bottom: 0;
}

.host-section h3 {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 12px;
}

/* =============================================================================
   EVENT BAR (legacy - kept for other screens)
   ============================================================================= */

.event-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
  padding: 0 10px;
}

.event-bar strong {
  color: #888;
  font-family: 'Courier New', Courier, monospace;
}

/* Camera screen uses smaller meta bar instead */
#camera-screen .event-bar {
  display: none;
}

/* Plan info display */
.plan-info {
  font-size: 0.85rem;
  color: #888;
  background-color: #2a2a2a;
  padding: 8px 16px;
  border-radius: 8px;
  text-align: center;
}

/* =============================================================================
   SHOT COUNTER
   ============================================================================= */

.shot-counter {
  font-size: 1rem;
  padding: 8px 16px;
  background-color: #2a2a2a;
  border-radius: 20px;
}

.shot-counter #shots-remaining {
  font-weight: bold;
  font-size: 1.2rem;
}

.shot-counter.low-shots {
  background-color: #4a2a2a;
  color: #ff6b6b;
}

.shot-counter.low-shots #shots-remaining {
  color: #ff4444;
}

/* =============================================================================
   CAMERA SCREEN LAYOUT - IMMERSIVE
   ============================================================================= */

/* Body scroll lock for camera screen (prevents Safari rubber-band bounce) */
body.no-scroll {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  position: fixed;
  width: 100%;
  height: 100%;
}

.camera-screen-layout {
  padding: 0;
  gap: 0;
  height: 100vh; /* fallback for older Safari */
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-overflow-scrolling: auto;
}

.camera-immersive {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.camera-screen-layout.screen {
  align-items: stretch;
  overflow: hidden;
}

/* Hide main branding when camera screen is active */
#camera-screen ~ .brand-header,
body:has(#camera-screen[style*="block"]) .brand-header {
  display: none;
}

.camera-headline {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.camera-event-code {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  font-family: monospace;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

.camera-footer {
  padding: 8px 0;
  text-align: center;
  background: #000;
  flex-shrink: 0;
}

.camera-footer p {
  font-size: 0.65rem;
  color: #444;
  margin: 0;
}

.camera-footer a {
  color: #a08030;
  text-decoration: none;
}

.camera-footer a:hover {
  text-decoration: underline;
}

.camera-bottom-actions {
  display: flex;
  justify-content: center;
  padding: 10px 16px;
  background: #000;
  flex-shrink: 0;
}

/* =============================================================================
   CAMERA PREVIEW CONTAINER - FULLSCREEN IMMERSIVE
   ============================================================================= */

.camera-preview-container {
  width: 100%;
  flex: 1;
  min-height: 0;
  background-color: #000;
  overflow: hidden;
  position: relative;
}

/* =============================================================================
   CAMERA OVERLAY - TOP BAR
   ============================================================================= */

.camera-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 16px 16px 24px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 20;
}

.camera-overlay-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.camera-controls-top {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.camera-control-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.camera-control-btn:hover {
  background: rgba(255,255,255,0.25);
}

.camera-control-btn:active {
  transform: scale(0.95);
}

.camera-control-btn.active {
  background: rgba(240, 192, 64, 0.4);
  color: #f0c040;
}

.camera-control-btn svg {
  width: 22px;
  height: 22px;
}

/* =============================================================================
   CAMERA OVERLAY - ZOOM SLIDER
   ============================================================================= */

.camera-zoom-container {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.zoom-slider {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 36px;
  height: 120px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 18px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.zoom-slider::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.zoom-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.zoom-value {
  font-size: 0.75rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  font-weight: 500;
}

/* =============================================================================
   CAMERA OVERLAY - BOTTOM BAR
   ============================================================================= */

.camera-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  z-index: 20;
}

.camera-bottom-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.shot-counter-compact {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.shot-counter-compact #shots-remaining {
  color: #f0c040;
}

.shot-counter-compact .shot-divider {
  color: rgba(255,255,255,0.5);
  margin: 0 2px;
}

.shot-counter-compact.low-shots #shots-remaining {
  color: #ff6b6b;
}

.shot-counter-compact.exhausted {
  opacity: 0.5;
}

.shot-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.camera-bottom-center {
  display: flex;
  justify-content: center;
}

.camera-bottom-right {
  display: flex;
  justify-content: flex-end;
}

.gallery-icon-btn {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gallery-icon-btn:hover {
  background: rgba(255,255,255,0.25);
}

.gallery-icon-btn:active {
  transform: scale(0.95);
}

.gallery-icon-btn svg {
  width: 26px;
  height: 26px;
}

#camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.flash-overlay {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-out;
  z-index: 10;
  border-radius: inherit;
}

/* Legacy .camera-section for backwards compatibility */
.camera-section {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #000;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.camera-section #camera-feed {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =============================================================================
   CAPTURE BUTTON
   ============================================================================= */

.capture-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 4px solid rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, opacity 0.2s, box-shadow 0.2s;
  margin: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

.capture-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

.capture-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.capture-btn-inner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 2px solid #ccc;
}

.capture-btn.capturing {
  opacity: 0.7;
}

.capture-btn.capturing .capture-btn-inner {
  background-color: #ff4444;
}

.capture-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.capture-btn.disabled {
  background-color: #666;
}

/* =============================================================================
   STATUS MESSAGE
   ============================================================================= */

.status-message {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.status-message.info {
  background-color: #2a3a4a;
  color: #88c0ff;
}

.status-message.success {
  background-color: #2a4a3a;
  color: #88ffaa;
}

.status-message.error {
  background-color: #4a2a2a;
  color: #ff8888;
}

/* =============================================================================
   FILM COMPLETE MESSAGE
   ============================================================================= */

.film-complete {
  text-align: center;
  padding: 30px;
  background-color: #2a2a2a;
  border-radius: 10px;
  width: 100%;
}

.film-complete h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #88ffaa;
}

.film-complete p {
  color: #aaa;
  margin: 5px 0;
}

/* =============================================================================
   ACTION BUTTONS
   ============================================================================= */

.action-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
}

.action-buttons .btn {
  flex: 1;
}

/* =============================================================================
   GALLERY
   ============================================================================= */

.gallery-header {
  text-align: center;
  margin-bottom: 10px;
}

.gallery-header h2 {
  font-size: 1.4rem;
  margin-bottom: 5px;
}

.gallery-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.gallery-photo {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  background-color: #333;
}

/* =============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================= */

@media (max-width: 400px) {
  .container {
    padding: 15px;
  }
  
  header h1 {
    font-size: 1.5rem;
  }
  
  .capture-btn {
    width: 60px;
    height: 60px;
  }
  
  .capture-btn-inner {
    width: 46px;
    height: 46px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .camera-headline {
    font-size: 1.4rem;
  }
  
}

/* =============================================================================
   EVENT CREATED INFO (QR CODE DISPLAY)
   ============================================================================= */

.event-created-info {
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-align: center;
}

.join-url-label {
  font-size: 0.9rem;
  color: #999;
  margin-bottom: 10px;
}

.join-url-input {
  width: 100%;
  padding: 10px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #fff;
  text-align: center;
  margin-bottom: 15px;
  cursor: pointer;
}

.join-url-input:focus {
  outline: none;
  border-color: #4A90D9;
}

#qr-code-canvas,
#host-qr-canvas {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}

/* =============================================================================
   HOST ACCESS & ADMIN PANELS
   ============================================================================= */

.host-access-toggle {
  margin-top: 15px;
  width: 100%;
}

.host-panel {
  width: 100%;
}

.host-panel h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #f0c040;
}

.host-panel h4 {
  font-size: 0.95rem;
  color: #888;
  margin: 15px 0 10px 0;
}

.host-event-info {
  text-align: left;
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 15px;
  padding: 10px;
  background-color: #1a1a1a;
  border-radius: 6px;
}

.host-event-info p {
  margin-bottom: 5px;
}

.host-event-info strong {
  color: #f0c040;
}

.host-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.host-buttons .btn {
  flex: 1;
}

.admin-link {
  margin-top: 30px;
  background: none;
  border: none;
  color: #555;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 5px 10px;
}

.admin-link:hover {
  color: #888;
}

.admin-panel {
  width: 100%;
  margin-top: 10px;
}

.admin-panel h3 {
  color: #f0c040;
  margin-bottom: 15px;
}

.admin-panel h4 {
  font-size: 0.95rem;
  color: #888;
  margin: 20px 0 10px 0;
}

/* =============================================================================
   NAV LINKS
   ============================================================================= */

.nav-links {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  width: 100%;
}

.nav-links .btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
}

/* =============================================================================
   HOST PORTAL STYLES
   ============================================================================= */

.event-overview {
  text-align: left;
  font-size: 0.95rem;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 8px;
}

.overview-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #333;
}

.overview-row:last-child {
  border-bottom: none;
}

.overview-row .label {
  color: #888;
}

.overview-row .value {
  color: #fff;
  font-weight: 500;
}

.overview-row .value.highlight {
  color: #f0c040;
}

.overview-row .value.revealed {
  color: #88ffaa;
}

.overview-row .value.locked {
  color: #ff8888;
}

.cover-image-section {
  margin: 15px 0;
}

.cover-label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 8px;
}

.cover-preview {
  width: 100%;
  aspect-ratio: 16/9;
  background-color: #1a1a1a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
}

.cover-preview span {
  color: #555;
  font-size: 0.9rem;
}

.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.host-portal-link {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #333;
}

.host-portal-link p {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 10px;
}

.host-portal-link .btn {
  width: 100%;
  text-align: center;
  text-decoration: none;
  display: block;
}

/* =============================================================================
   ADMIN CONSOLE STYLES
   ============================================================================= */

.plan-options {
  margin: 15px 0;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 8px;
}

.plan-options h4 {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 12px;
}

.plan-options .input-group {
  margin-bottom: 0;
}

.plan-options input[type="number"] {
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
}

.created-details {
  text-align: left;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 8px;
  margin-bottom: 15px;
}

.created-details p {
  margin-bottom: 8px;
}

.created-details strong {
  color: #f0c040;
}

/* =============================================================================
   EVENT TITLE DISPLAY
   ============================================================================= */

.event-title {
  font-size: 1.1rem;
  color: #f0c040;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 500;
}

.gallery-title {
  font-size: 1rem;
  color: #f0c040;
  margin-top: 5px;
}

/* =============================================================================
   SHOT COUNTER STATES
   ============================================================================= */

.shot-counter.exhausted {
  background-color: #333;
  color: #888;
}

.shot-counter.exhausted #shots-remaining {
  color: #666;
}

/* =============================================================================
   GALLERY MODE SECTION
   ============================================================================= */

.gallery-mode-section {
  margin: 15px 0;
  padding: 15px;
  background-color: #1a1a1a;
  border-radius: 8px;
}

.gallery-mode-section h4 {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 12px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  background-color: #2a2a2a;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.radio-option:hover {
  background-color: #333;
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option input[type="radio"]:checked + .radio-label {
  color: #4a9eff;
}

.radio-option input[type="radio"]:checked ~ .radio-description {
  color: #888;
}

.radio-label {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 500;
}

.radio-description {
  font-size: 0.8rem;
  color: #666;
}

/* =============================================================================
   BRAND FOOTER
   ============================================================================= */

.brand-footer {
  margin-top: 30px;
  text-align: center;
}

.brand-footer p {
  font-size: 0.75rem;
  color: #666;
  margin: 5px 0;
}

.brand-footer a {
  color: #f0c040;
  text-decoration: none;
}

.brand-footer a:hover {
  text-decoration: underline;
}

/* =============================================================================
   BRAND FALLBACK
   ============================================================================= */

.brand-fallback {
  color: #f0c040;
  font-size: 1.5rem;
  font-weight: bold;
}

/* =============================================================================
   QR CODE IMAGE
   ============================================================================= */

.qr-img {
  display: block;
  margin: 12px auto 0;
  width: 220px;
  max-width: 260px;
  height: auto;
  border-radius: 12px;
  background: white;
  padding: 10px;
}

/* =============================================================================
   PHOTO MODERATION GRID
   ============================================================================= */

.photo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #333;
  border-radius: 8px;
  margin-bottom: 12px;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-toolbar span {
  font-size: 0.9rem;
  color: #ccc;
}

.toolbar-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-danger {
  background: #cc3333;
  color: white;
  border: none;
}

.btn-danger:hover {
  background: #aa2222;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.photo-grid .empty-message {
  grid-column: 1 / -1;
  text-align: center;
  color: #888;
  padding: 30px 0;
}

.photo-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile.selected {
  border-color: #f0c040;
}

.photo-tile.hidden-photo {
  opacity: 0.5;
}

.photo-tile .hidden-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #ff6666;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.photo-tile .select-checkbox {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid white;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-tile.selected .select-checkbox {
  background: #f0c040;
  border-color: #f0c040;
}

.photo-tile.selected .select-checkbox::after {
  content: '✓';
  color: #1a1a1a;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Events list for admin */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

/* Admin page wider container */
.screen:has(#admin-dashboard) .card,
#admin-dashboard .card {
  max-width: 600px;
}

.event-item {
  background: #333;
  padding: 14px 16px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.event-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.event-item-code {
  font-weight: bold;
  color: #f0c040;
  font-size: 1.1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.event-item__meta {
  font-size: 0.95rem;
  color: #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-item__stats {
  font-size: 0.8rem;
  color: #888;
}

.event-item-status {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  flex-shrink: 0;
}

.event-item-status.unlocked {
  background: #2a4a2a;
  color: #88dd88;
}

.event-item-status.locked {
  background: #4a2a2a;
  color: #dd8888;
}

.event-item__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 4px;
}

/* =============================================================================
   MODAL STYLES
   ============================================================================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: relative;
  background: #2a2a2a;
  padding: 24px;
  border-radius: 12px;
  max-width: 450px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
  margin-bottom: 16px;
  color: #fff;
}

.delete-event-info {
  background: #333;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.delete-event-info p {
  margin: 6px 0;
  font-size: 0.95rem;
}

.delete-warning {
  background: #5a2a2a;
  border: 1px solid #ff4444;
  color: #ffaaaa;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.delete-confirm-section {
  margin-bottom: 16px;
}

.delete-confirm-section p {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.delete-confirm-section strong {
  color: #f0c040;
  font-family: monospace;
}

.delete-confirm-section input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #555;
  background: #333;
  color: #fff;
  font-size: 1rem;
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-danger {
  background: #cc3333;
  color: #fff;
  border: none;
}

.btn-danger:hover:not(:disabled) {
  background: #aa2222;
}

.btn-danger:disabled {
  background: #663333;
  color: #999;
  cursor: not-allowed;
}

.btn-small.btn-danger-outline {
  color: #ff6666;
  border: 1px solid #ff6666;
  background: transparent;
}

.btn-small.btn-danger-outline:hover {
  background: rgba(255, 100, 100, 0.15);
}
