/* =========================================================================
   FILE: jewelry-tryonELEVEN.css
   PURPOSE: Simplified Single Column Layout with Nav Menu
   AUTHOR: Jack Ewers / bloodweb.net
   LAST UPDATED: 2025-10-07
   ========================================================================= */

* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
}

.jewelry-app {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

/* ===== HEADER ===== */
.app-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-header img {
  height: min(100px,10dvh);
  /* float:right; */
}

.app-header h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-header p {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

/* ===== CAMERA CONTROLS (TOP) ===== */
.camera-controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.control-group-left, .control-group-right {
  display: flex;
  gap: 0.75rem;
}

.btn-control {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  white-space: nowrap;
}

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

.btn-control.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-control.primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-control.secondary {
  background: #28a745;
  color: white;
}

.btn-control.secondary:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-2px);
}

.btn-control.tertiary {
  background: #6c757d;
  color: white;
}

.btn-control.tertiary:hover:not(:disabled) {
  background: #5a6268;
}

/* ===== MAIN PREVIEW AREA ===== */
.main-preview-area {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
}

.preview-container {
  position: relative;
  width: 100%;
  min-height: 65dvh;
  aspect-ratio: 4 / 3;
  background: #000;
  overflow: hidden;
}

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

#overlay-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 10;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#photo-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

.earring-markers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.earring-marker {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(102, 126, 234, 0.9);
  color: white;
  border: 3px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: move;
  pointer-events: all;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.earring-marker:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.earring-marker.dragging {
  transform: scale(1.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

/* Marker style variations */
.earring-marker[data-style="dot"] {
  background: rgba(255, 107, 107, 0.9);
  border-radius: 50%;
}

.earring-marker[data-style="circle"] {
  background: transparent;
  border: 4px solid rgba(255, 107, 107, 0.9);
  border-radius: 50%;
  font-size: 0;
}

.earring-marker[data-style="cross"]::before {
  content: '✚';
  font-size: 1.8rem;
  color: rgba(255, 107, 107, 1);
  line-height: 1;
}

.earring-marker[data-style="cross"] {
  background: transparent;
  border: none;
  color: transparent;
}

.earring-marker[data-style="square"] {
  background: rgba(255, 107, 107, 0.9);
  border-radius: 4px;
}

.camera-status {
  display: block;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

#camera-status-text {
  margin: 0 1rem;
}

#menu-icons {
  display:flex;
  justify-content: space-around;
}
.status-icon-btn {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

.status-icon-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.status-icon-btn.active {
  background: rgba(102, 126, 234, 0.9);
  border-color: #667eea;
}

.marker-icon {
  font-weight: bold;
  font-size: 1.1rem;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.marker-icon.m1 {
  background: rgba(255, 107, 107, 0.9);
  color: white;
}

.marker-icon.m2 {
  background: rgba(107, 255, 107, 0.9);
  color: #000;
}

.marker-icon.m3 {
  background: rgba(255, 215, 0, 0.9);
  color: #000;
}

/* ===== OVERLAY PANELS ===== */
.overlay-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 100;
  overflow-y: auto;
  padding: 1rem;
}

.overlay-content {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

/* Make precision tools even more transparent */
#overlay-precision .overlay-content {
  background: rgba(255, 255, 255, 0.75);
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.overlay-header h4 {
  margin: 0;
  font-size: 1.3rem;
  color: #333;
}

.overlay-close {
  background: rgba(255, 0, 0, 0.1);
  border: 2px solid rgba(255, 0, 0, 0.3);
  color: #d32f2f;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.overlay-close:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: #d32f2f;
  transform: scale(1.1);
}

/* ===== PRECISION MINIMAP ===== */
#overlay-precision {
  background: transparent;
  pointer-events: none;
  padding: 0;
}

.precision-minimap {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 200px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  pointer-events: all;
  backdrop-filter: blur(10px);
}

.minimap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
}

.minimap-header .overlay-close {
  width: 24px;
  height: 24px;
  font-size: 0.9rem;
}

.minimap-grid {
  position: relative;
  width: 100%;
  height: 150px;
  background: #f5f5f5;
  border: 2px solid #ddd;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  cursor: crosshair;
}

.minimap-marker {
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(255, 107, 107, 0.9);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transform: translate(-50%, -50%);
  cursor: move;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.minimap-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

/* ===== EXPORT BUTTON ===== */
.export-controls {
  margin-bottom: 1.5rem;
  text-align: center;
}

.btn-export {
  padding: 1rem 3rem;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.btn-export:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-export:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #6c757d;
}

/* ===== TOOL SETTINGS (used in overlays) ===== */
.tool-setting {
  margin-bottom: 1.5rem;
}

.tool-setting label {
  display: block;
  font-weight: 600;
  color: #555;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.tool-setting label span {
  float: right;
  color: #667eea;
}

.tool-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background: #e9ecef;
}

.tool-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tool-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Marker Style Buttons */
.marker-style-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.marker-style-btn {
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s ease;
}

.marker-style-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.marker-style-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Visibility Toggle */
.visibility-toggle {
  padding: 0.75rem 1.5rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.visibility-toggle:not(.active) {
  background: #6c757d;
}

.visibility-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Marker Selector */
.marker-selector {
  display: flex;
  gap: 0.5rem;
}

.marker-select-btn {
  flex: 1;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.marker-select-btn:hover {
  border-color: #667eea;
}

.marker-select-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
}

/* Position Grid */
.position-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 250px;
}

.position-btn {
  padding: 1rem;
  background: #f8f9fa;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem;
  transition: all 0.2s ease;
}

.position-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.position-btn:active {
  background: #667eea;
  color: white;
}

.position-btn[data-direction="up"] {
  grid-column: 2;
}

.position-btn[data-direction="left"] {
  grid-column: 1;
  grid-row: 2;
}

.position-btn[data-direction="right"] {
  grid-column: 3;
  grid-row: 2;
}

.position-btn[data-direction="down"] {
  grid-column: 2;
  grid-row: 3;
}

/* Fine Tune Controls */
.fine-tune-controls {
  display: flex;
  gap: 0.5rem;
}

.fine-tune-btn {
  flex: 1;
  padding: 0.75rem;
  background: #f8f9fa;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.fine-tune-btn:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.btn-reset {
  width: 100%;
  padding: 0.75rem;
  background: #ffc107;
  color: #212529;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  background: #e0a800;
  transform: translateY(-2px);
}

/* Upload Button */
.btn-upload {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Delete Marker Button */
.btn-delete-marker {
  width: 100%;
  padding: 0.75rem;
  background: rgba(244, 67, 54, 0.1);
  color: #d32f2f;
  border: 2px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete-marker:hover {
  background: rgba(244, 67, 54, 0.2);
  border-color: #d32f2f;
  transform: translateY(-2px);
}

/* Add Marker Button */
.add-marker {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.5);
}

.add-marker:hover {
  background: rgba(76, 175, 80, 0.3);
  border-color: #4caf50;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed #ddd;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-bottom: 1rem;
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.upload-text {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #333;
}

.browse-btn {
  color: #667eea;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
}

.upload-hint {
  font-size: 0.85rem;
  color: #999;
}

.earring-preview {
  position: relative;
  max-width: 300px;
  margin: 1rem auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.earring-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.remove-btn:hover {
  background: #dc3545;
  transform: scale(1.1);
}

.jewelry-metadata {
  margin-top: 1rem;
}

.jewelry-metadata h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: #555;
}

.metadata-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metadata-inputs input {
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.metadata-inputs input:focus {
  outline: none;
  border-color: #667eea;
}

/* ===== INSTRUCTIONS ===== */
.instructions {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.instructions h3 {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: #333;
}

.instructions ol {
  margin: 0;
  padding-left: 1.5rem;
}

.instructions li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: #555;
}

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}

/* ===== MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
  .jewelry-app {
    padding: 1rem 0.5rem;
  }

  .app-header h1 {
    font-size: 1.5rem;
  }

  .camera-controls-top {
    flex-direction: column;
  }

  .control-group-left, .control-group-right {
    width: 100%;
    justify-content: center;
  }

  .btn-control {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }



  .nav-tabs {
    flex-direction: column;
  }

  .nav-tab {
    width: 100%;
  }

  .position-grid {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .app-header h1 {
    font-size: 1.25rem;
  }

  .btn-export {
    padding: 0.75rem 2rem;
    font-size: 1rem;
  }


}
