/* Image Editor Modal - must be above mobile menu (1000) */
.img-editor-modal {
  z-index: 100600 !important;
}

.img-editor-modal .modal-backdrop {
  z-index: 100599 !important;
}

.image-editor {
  display: flex;
}

.boulder-image-editor {
  font-family: "DINBold";
}

.toolbar {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #f4f4f4;
  border-right: 1px solid #ccc;
}

.toolbar button,
.toolbar input,
.allShapes button,
.allShapes input {
  margin-bottom: 10px;
  border: none;
}

.allShapes button {
  background-color: transparent;
}

.line {
  width: 53px;
  height: 0;
  border: 3px solid rgb(245, 72, 72);
  margin: 3px;
  display: inline-block;
}

.toolbar .circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(245, 72, 77, 1);
  cursor: pointer;
  color: #fff;
}

.allShapes .circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(245, 72, 77, 1);
  cursor: pointer;
  color: #fff;
}

.allShapes .circle {
  font-family: "D-DIN";
  text-transform: uppercase;
}

.allShapes .circle.nb {
  font-family: "DINBold";
}

.ddinFont {
  font-family: "D-DIN";
}

.toolbar .icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(245, 72, 77, 1);
  cursor: pointer;
  color: #fff;
}

.icon-container {
  padding: 10px;
  cursor: pointer;
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-container:hover {
  background-color: #f0f0f0;
  border-radius: 50%;
}

.icon-container.selected {
  color: #fff;
  background-color: rgba(245, 72, 77, 1);
  border-radius: 50%;
}

.text-util-buttons {
  display: flex;
  gap: 10px;
  /* Creates space between buttons */
}

.text-util-button {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  /* Rounded corners */
  padding: 10px;
  background-color: white;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
}

.text-util-button:hover {
  background-color: #f0f0f0;
}

.text-util-button:active {
  background-color: #d0d0d0;
}

/* .align-left,
  .align-center,
  .align-right {
    width: 20px;
    height: 10px;   
    background-size: cover;
  } */

.text-util-button b,
.text-util-button i,
.text-util-button u {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

button.text-util-button.btnDark {
  background-color: #343a40;
  border-color: #343a40;
  color: #fff;
}
.label-text {
  border: 3px solid #f5484d;
  color: #f5484d;
  padding: 4px 10px 0 10px;
  font-family: "DIN Next LT Pro";
  border-radius: 5px;
}

/* Hold Icon Css start*/
.marker-icons-container {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  white-space: nowrap;
  gap: 8px;
  padding-bottom: 4px;
}

.marker-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 3px solid transparent;
  box-sizing: border-box;
  flex-shrink: 0;
  margin: 7px;
}

.marker-icon.selected {
  box-shadow: 0 0 6px 2px #b9ff66;
  outline: 1.5px solid #b9ff66;
  border-color: #f5484d;
}

.marker-icon.simple {
  border-color: #f5484d;
}

.marker-icon.dashed {
  border-color: #f5484d;
  border-style: dashed;
}

.marker-icon.double {
  border-color: #f5484d;
  border-style: solid;
}

.marker-icon.double::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border: 2px solid #f5484d;
  border-radius: 50%;
}

.marker-icon.notched {
  width: 32px; /* Match other icons */
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-icon.notched svg {
  width: 32px;
  height: 32px;
}

.notch-count-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  padding: 0;
}

.notch-count-btn svg {
  display: block;
  margin: 0 auto;
}

.notch-count-btn.selected svg circle {
  stroke: #f5484d;
  stroke-width: 3;
  filter: drop-shadow(0 0 3px #b9ff66);
}

.notch-number {
  fill: #f5484d;
  font-weight: bold;
  font-family: sans-serif;
  font-size: 16px;
  user-select: none;
}

.marker-icons-container::-webkit-scrollbar {
  display: none;
}

.marker-icons-container {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.mask-opacity-container {
  display: block;
}

.mask-opacity-container .form-label {
  margin-bottom: 0.5rem;
}

.icon-with-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 8px; /* Consistent spacing between icon groups */
}

.notched-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 8px;
}

.icon-label {
  font-size: 16px;
  color: #222;
  margin-bottom: 4px;
  white-space: nowrap;
  font-family: "DINLight";
}

.notched-label {
  width: 100%;
  text-align: center; /* Center the "Start" label above the notched icons */
}
.dark-mode-active .icon-label {
  color: #fff;
}
/* Hold Icon Css end*/
.opacity-slider-wrapper {
  gap: 16px;
  width: 100%;
}

.label-container .opacity-label {
  font-weight: 700;
  color: white;
  font-size: 18px;
}

.slider-container {
  background: rgb(18, 20, 23);
  padding: 8px 16px;
  border-radius: 6px;
  gap: 12px;
}

.percentage-label {
  color: white;
  font-weight: bold;
  font-size: 16px;
}

.custom-opacity-slider {
  -webkit-appearance: none;
  width: 200px;
  height: 10px;
  border-radius: 10px;
  background: linear-gradient(to right, #ffffff, #000000);
  outline: none;
  cursor: pointer;
  margin-left: 8px;
}

.custom-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #111;
  border: 2px solid white;
  margin-top: -5px;
}

.custom-opacity-slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #111;
  border: 2px solid white;
}
.icon-container.holds:not(.selected) {
  filter: brightness(0);
}
.dark-mode-active .icon-container.holds:not(.selected) {
  filter: brightness(1);
}
.editor-btn-grp button:not(.btn-danger) {
  font-family: "DINLight";
}
.dark-mode-active .editor-btn-grp button:not(.btn-danger) {
  font-family: "DINLight";
  background-color: rgb(18, 20, 23);
  border-color: rgb(18, 20, 23) !important;
  color: #f5f5f5;
}
.image-editor canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  overflow: hidden;
}
@media (max-width: 576px) {
  .label-container {
    display: none;
  }
  .slider-container {
    width: 100%;
  }

  .slider-container {
    width: 100%;
  }
}
@media (max-width: 767px) {
  .image-editor {
    display: block;
  }

  .pencil-icons .w-25.form-range {
    width: 70% !important;
  }

  canvas.lower-canvas,
  canvas.upper-canvas {
    width: 100% !important;
  }

  .image-editor > .row > :nth-child(2) {
    padding: 0;
  }
}

/* ================================================================
   MOBILE FULLSCREEN IMAGE EDITOR FIX
   Added: October 2025
   Purpose: Make mobile editor behave like native fullscreen app
   ================================================================ */

/* Target the image editor modal specifically */
@media (max-width: 767px) {
  /* Force fullscreen modal on mobile */
  #editorModal .modal-dialog {
    margin: 0 !important;
    max-width: 100% !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex;
    align-items: stretch;
  }

  #editorModal .modal-content {
    border-radius: 0 !important;
    border: none !important;
    height: 100vh !important;
    width: 100vw !important;
    max-height: 100vh !important;
    overflow: hidden;
  }

  #editorModal .modal-body {
    padding: 0 !important;
    height: 100vh !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  /* Fix the main container structure */
  #editorModal .boulder-image-editor {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #editorModal .boulder-image-editor > .row {
    flex: 0 0 auto; /* Header row - fixed height */
    margin: 0;
    width: 100%;
  }

  /* Header buttons container - make it sticky and visible */
  #editorModal .boulder-image-editor > .row:first-child {
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.7));
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  /* Ensure buttons are visible and properly sized for mobile */
  #editorModal .boulder-image-editor button {
    min-height: 44px; /* iOS touch target */
    font-size: 14px;
  }

  /* Save button special styling */
  #editorModal .boulder-image-editor .btn-danger {
    min-width: 80px !important;
    width: auto !important;
  }

  /* Main editor container - fills remaining space */
  #editorModal .image-editor {
    flex: 1 1 auto;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important; /* Override block from line 398 */
    flex-direction: column;
    width: 100%;
  }

  #editorModal .image-editor > .row {
    flex: 1;
    margin: 0;
    display: flex;
    overflow: hidden;
  }

  /* Canvas container - fills available space */
  #editorModal .image-editor .col-12 {
    padding: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    height: 100%;
  }

  /* Canvas responsiveness */
  #editorModal canvas.lower-canvas,
  #editorModal canvas.upper-canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
  }

  /* Tool panels on mobile */
  #editorModal .toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.95);
    border-top: 1px solid rgba(255,255,255,0.2);
    padding: 10px;
    flex-direction: row;
    overflow-x: auto;
    z-index: 1001;
  }

  /* Adjust toolbar buttons for horizontal layout */
  #editorModal .toolbar button,
  #editorModal .toolbar input {
    margin-bottom: 0;
    margin-right: 10px;
  }

  /* Hide labels on mobile for space */
  #editorModal .label-container {
    display: none !important;
  }

  /* Slider adjustments */
  #editorModal .slider-container {
    width: 150px !important;
  }

  /* Safe area handling for iOS */
  @supports (padding-bottom: env(safe-area-inset-bottom)) {
    #editorModal .toolbar {
      padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    #editorModal .modal-content {
      padding-top: env(safe-area-inset-top);
    }
  }
}

/* Landscape orientation adjustments */
@media (max-width: 767px) and (orientation: landscape) {
  #editorModal .boulder-image-editor > .row:first-child {
    padding: 5px 10px;
  }

  #editorModal .boulder-image-editor button {
    min-height: 36px;
    font-size: 12px;
    padding: 4px 8px;
  }

  #editorModal .toolbar {
    padding: 5px;
  }
}

/* Fix for small devices (iPhone SE, etc.) */
@media (max-width: 375px) {
  #editorModal .boulder-image-editor button {
    font-size: 12px;
    padding: 6px 8px;
  }

  #editorModal .btn-danger {
    min-width: 60px !important;
  }
}

/* ================================================================
   CSS FIXES FOR EDITOR MODAL ISSUES
   Added: October 2025
   Purpose: Fix various padding, margin, and display issues
   ================================================================ */

/* 1. Spotlight Tool - Remove unwanted margin */
#editorModal > div > div > div > div > iframe {
  margin-top: 0 !important;
}

/* 2. Editing Tools - Fix padding on mobile */
@media (max-width: 768px) {
  .editing-tools {
    padding: 8px 0px;
  }
}

/* 3. Tabs Content - Fix left padding on mobile */
@media (max-width: 480px) {
  .tabs-content {
    padding: 5px 0px 5px 0px;
  }
}

/* 4. Canvas Section - Remove unwanted padding */
@media (max-width: 768px) {
  .canvas-section {
    padding-top: 0;
  }
}

/* 5. Action Buttons - Prevent hiding on mobile */
@media (max-width: 768px) {
  .action-buttons {
    display: flex !important; /* Override any display: none */
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Additional fixes for better mobile experience */
@media (max-width: 768px) {
  /* Ensure main container has no unwanted padding */
  .main-container > div {
    padding-top: 0;
  }

  /* Unified bottom controls padding adjustment */
  .unified-bottom-controls {
    padding: 0;
  }
}

/* ================================================================
   BOULDER IMAGE EDITOR - UPDATED STYLES
   Added: October 2025
   Purpose: Refined padding, sizing, and color scheme updates
   ================================================================ */

/* Project Actions - Mobile Padding */
@media (max-width: 768px) {
  .project-actions {
    padding: 0px 10px 12px 10px;
  }
}

/* Cancel and Save Buttons - Mobile Sizing */
@media (max-width: 768px) {
  .cancel-btn, .save-btn {
    font-size: 13px;
    padding: 12px 16px;
  }
}

/* Tabs Content - Small Screen Padding Override */
@media (max-width: 480px) {
  .tabs-content {
    padding: 0px; /* Override previous 5px 0px 5px 0px */
  }
}

/* Color Scheme Updates - App Palette Consistency */
/* These apply to both mobile and desktop */

.unified-bottom-controls {
  background: rgb(33, 37, 41) !important; /* Updated from grey/black */
}

.project-actions {
  background: rgb(33, 37, 41) !important; /* Updated from grey/black */
}

.action-buttons {
  background: rgb(33, 37, 41) !important; /* Updated from grey/black */
}

.canvas-section {
  background: rgb(18, 20, 23) !important; /* Updated from #2a2a2a */
}

/* Ensure proper contrast for child elements */
.unified-bottom-controls *,
.project-actions *,
.action-buttons * {
  color: #ffffff; /* Ensure text is visible on dark background */
}

/* ================================================================
   DESKTOP MODAL FIXES - BOULDER IMAGE EDITOR
   Added: October 2025
   Purpose: Fix padding, margin, scroll issues on desktop
   ================================================================ */

/* Override Bootstrap modal defaults for desktop */
#editorModal.modal {
  --bs-modal-margin: 0 !important; /* Remove Bootstrap's default 0.5rem margin */
  margin: 0 !important;
  padding: 0 !important;
}

/* Modal dialog - fullscreen on desktop too */
@media (min-width: 769px) {
  #editorModal .modal-dialog {
    margin: 0 !important;
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex;
    align-items: stretch;
  }

  #editorModal .modal-content {
    border-radius: 0 !important;
    border: none !important;
    height: 100vh !important;
    width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important; /* Prevent any scrolling */
  }

  #editorModal .modal-body {
    padding: 0px !important; /* No padding for fullscreen */
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important; /* No scrollbars */
    display: flex;
    flex-direction: column;
  }

  /* Ensure the boulder-image-editor container fills space properly */
  #editorModal .boulder-image-editor {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
  }

  /* Canvas container - prevent overflow */
  #editorModal .image-editor {
    overflow: hidden !important;
  }

  #editorModal .container,
  #editorModal .row,
  #editorModal .col {
    max-height: 100%;
    overflow: hidden !important;
  }
}

/* Global modal backdrop fix */
.modal-backdrop.show {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* Hide all scrollbars in the modal */
#editorModal *::-webkit-scrollbar {
  display: none !important;
}

#editorModal * {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

/* Ensure canvas doesn't cause overflow */
#editorModal canvas {
  max-width: 100% !important;
  max-height: calc(100vh - 200px) !important; /* Account for buttons/controls */
  object-fit: contain;
}
