/* ===================================
   Item Photo Modal Styles
   Reskinned: Traxium dark theme
   ================================== */

:root {
  --trx-bg:        var(--tx-color-navy-deep);
  --trx-surface:   var(--tx-color-navy-deep);
  --trx-panel:     var(--tx-color-navy-canvas);
  --trx-panel-2:   var(--tx-color-navy-surface);
  --trx-blue:      var(--tx-color-blue-brand);
  --trx-blue-bright:var(--tx-color-cyan-brand);
  --trx-cyan:      var(--tx-color-cyan-brand);
  --trx-grad-cta:   linear-gradient(135deg,var(--tx-color-blue-brand),var(--tx-color-cyan-brand));
  --trx-text:      var(--tx-color-white);
  --trx-text-2:    var(--tx-color-slate-250);
  --trx-muted:     var(--tx-color-slate-450);
  --trx-border:    rgba(255,255,255,0.07);
  --trx-border-mid:rgba(255,255,255,0.12);
  --trx-shadow:    0 4px 28px rgba(0,0,0,0.45), 0 1px 4px rgba(0,0,0,0.3);
}

.item-photo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.82);
  z-index: 10000;
  justify-content: center;
  align-items: center;
}

.photo-modal-content {
  background: var(--trx-panel);
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--trx-border-mid);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.photo-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--trx-border);
}

.photo-modal-header h2 {
  font-size: 24px;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--trx-text);
  margin: 0;
}

.photo-sku-display {
  font-size: 16px;
  color: var(--trx-cyan);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 5px;
}

.close-photo-modal {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--trx-muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.close-photo-modal:hover {
  background: var(--trx-panel-2);
  color: var(--trx-text);
}

.photo-capture-area {
  background: var(--trx-surface);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--trx-border);
}

.photo-video,
.photo-canvas,
.photo-preview {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.photo-video  { display: none; }
.photo-canvas { display: none; }
.photo-preview { display: none; max-height: 400px; object-fit: contain; }

.photo-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.photo-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.photo-btn-primary {
  background: var(--trx-grad-cta);
  color: #fff;
}

.photo-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(61, 123, 255,0.4);
}

.photo-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.photo-btn-secondary {
  background: var(--trx-panel-2);
  color: var(--trx-text-2);
  border: 1px solid var(--trx-border-mid);
}

.photo-btn-secondary:hover {
  background: var(--trx-panel);
  color: var(--trx-text);
}

.photo-btn svg {
  width: 20px;
  height: 20px;
}

/* Photo button on scan items */
.item-photo-btn {
  background: var(--trx-grad-cta);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.item-photo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(61, 123, 255,0.4);
}

.item-photo-btn svg {
  width: 16px;
  height: 16px;
}

/* Photo gallery in item details */
.item-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.item-photo-thumbnail {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s;
  border: 2px solid var(--trx-border);
}

.item-photo-thumbnail:hover {
  transform: scale(1.05);
  border-color: var(--trx-blue);
}

/* Responsive */
@media (max-width: 768px) {
  .photo-modal-content { padding: 20px; width: 95%; }
  .photo-modal-header h2 { font-size: 20px; }
  .photo-capture-area { min-height: 300px; padding: 15px; }
  .photo-modal-actions { flex-direction: column; }
  .photo-btn { width: 100%; justify-content: center; }
}
