/* ============================================================
   PHOTO BOOTH WINDOW
   ============================================================ */
#photobooth-window {
  top: 80px;
  left: 200px;
  width: 580px;
  height: 520px;
  min-width: 440px;
  min-height: 400px;
  z-index: 15;
  background: #1a1a1a;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif;
  color: #eee;
  flex-direction: column;
}

/* --- Header Bar --- */
#photobooth-header {
  display: flex;
  align-items: center;
  background: #2d2d2d;
  padding: 0 8px;
  height: 38px;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  border-bottom: 1px solid #3a3a3a;
  gap: 6px;
}
#photobooth-header:active { cursor: grabbing; }

#photobooth-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

/* --- Video Area --- */
#photobooth-video-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}

#photobooth-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

#photobooth-canvas {
  display: none;
}

/* --- Camera Off Message --- */
#photobooth-no-camera {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #666;
  gap: 12px;
}

.pb-no-camera-icon {
  width: 64px;
  height: 64px;
  fill: #444;
}

.pb-enable-btn {
  padding: 8px 20px;
  background: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: 'Ubuntu', 'Segoe UI', sans-serif;
  transition: background 0.15s;
}
.pb-enable-btn:hover {
  background: #d4441a;
}

/* --- Filter Strip --- */
#photobooth-filters {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: #252525;
  border-top: 1px solid #3a3a3a;
  overflow-x: auto;
  flex-shrink: 0;
}

.pb-filter {
  width: 60px;
  height: 44px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  opacity: 0.7;
  transition: opacity 0.15s, border-color 0.15s;
}
.pb-filter:hover {
  opacity: 1;
}
.pb-filter.active {
  border-color: var(--accent-color);
  opacity: 1;
}

.pb-filter-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  text-align: center;
  font-size: 9px;
  color: #ccc;
  padding: 2px;
  pointer-events: none;
}

.pb-filter-preview {
  width: 100%;
  height: 100%;
}

/* --- Controls --- */
#photobooth-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px;
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.pb-shutter-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  border: 4px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: transform 0.12s;
  outline: none;
}
.pb-shutter-btn:hover {
  transform: scale(1.05);
}
.pb-shutter-btn:active {
  transform: scale(0.95);
}

/* --- Gallery --- */
#photobooth-gallery {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  background: #1e1e1e;
  border-top: 1px solid #3a3a3a;
  overflow-x: auto;
  flex-shrink: 0;
  min-height: 0;
}

.pb-gallery-thumb {
  width: 48px;
  height: 36px;
  border-radius: 4px;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #333;
  transition: border-color 0.15s;
}
.pb-gallery-thumb:hover {
  border-color: var(--accent-color);
}
.pb-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Flash Effect --- */
#photobooth-flash {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
  z-index: 5;
}

/* --- Resize Handle --- */
#photobooth-resize-handle {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 20;
}
