/* BoulderManager specific styles */

/* Hide scrollbar for sector filter container */
.sector-filter-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Add boulder button slot - uniform with add stage button */
.add-boulder-slot-btn {
  width: 100%;
  height: 64px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0;
  outline: none;
  /* Remove any button default styling */
  background-image: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.add-boulder-slot-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
}

.add-boulder-slot-btn:hover svg {
  transform: scale(1.1);
}

.add-boulder-slot-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* Boulder box styles */
.boulder-box-mobile {
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 10px;
  overflow: hidden;
  height: 90px;
  position: relative;
}

.boulder-box-mobile.editing-mode {
  border: 1px solid transparent;
}

.boulder-box-mobile.editing-mode:hover {
  border-color: #F5484D;
  box-shadow: 0 2px 8px rgba(245, 72, 77, 0.15);
}

.adddata-boulders-data-box-row.editing-mode {
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.adddata-boulders-data-box-row.editing-mode:hover {
  border-color: #F5484D;
  background-color: rgba(245, 72, 77, 0.03);
}

/* Edit mode specific - boulder points width */
.editing-mode .adddata-boulder-points {
  width: 1%;
}

/* Video validation section */
.video-val-section {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 16px;
}

.v-v-text {
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.v-filter-icon {
  color: #666;
  transition: all 0.2s ease;
}

.v-filter-icon:hover {
  color: #F5484D;
  transform: scale(1.1);
}

/* Flash score badge */
.flash-score-log {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFD700;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin: 0 8px;
}

/* Grade custom badge - Desktop */
.grade-custom-badge {
  padding: 4px 10px;
  border-radius: 15px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* Grade badge - Mobile */
.grade-badge-mobile {
  color: #fff;
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-block;
}

/* Mobile specific styles */
.boulder-img-mobile {
  width: 90px;
  height: 90px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.boulder-name-mobile {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

/* Ensure mobile content doesn't push actions */
.boulder-box-mobile .flex-grow-1 {
  min-width: 0;
  overflow: hidden;
}

/* Mobile action icons styling */
.mobile-action-wrapper {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  text-align: center;
}

.mobile-action-wrapper.inline {
  display: inline;
}

.mobile-video-icon {
  cursor: pointer;
}

.mobile-construction-icon {
  color: #F5484D;
  cursor: pointer;
}

/* Status badges */
.boulder-status-badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

.boulder-status-badge.draft {
  background: rgba(255, 255, 255, 0.2);
  color: #a3a3a3;
}

.boulder-status-badge.published {
  background: #9AD746;
  color: #000000;
}

/* Desktop boulder row - NEW GRID LAYOUT */
.boulder-left-section {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.boulder-thumbnail-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 10px 0px 0px 10px;
  overflow: hidden;
}

.boulder-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.boulder-placeholder-desktop {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.boulder-placeholder-mobile {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.boulder-title-section {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.boulder-title-section h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.boulder-grade-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

.boulder-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.boulder-status-column {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Legacy classes for backward compatibility */
.adddata-boulder-img {
  width: 120px;
  height: 80px;
  overflow: hidden;
  border-radius: 10px;
}

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

.adddata-boulder-title {
  flex: 1;
  min-width: 0;
}

.adddata-boulder-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.truncate-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adddata-boulder-complate {
  flex-shrink: 0;
}

.adddata-boulder-icons-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Override background indesiderati da OngoingStagePanels.css */
.adddata-boulders-data-box {
  background: transparent !important;
}

.dark-mode-active .adddata-boulders-data-box {
  background: transparent !important;
}

/* Rimuovere hover effects in edit mode */
.boulder-box-mobile.editing-mode:hover {
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.adddata-boulders-data-box-row.editing-mode:hover {
  border-color: transparent !important;
  background-color: transparent !important;
  transform: none !important;
}

/* Boulder title with truncation */
.boulder-title-truncate {
  font-size: inherit;
  font-weight: inherit;
  max-width: 100%;
}

/* Boulder info row icons hover effect */
.boulder-info-row svg {
  cursor: pointer;
  transition: opacity 0.2s;
}

.boulder-info-row svg:hover {
  opacity: 1 !important;
}

/* Mobile badges in 3 columns */
.mobile-badges-three-columns {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.mobile-badge-column {
  display: flex;
  align-items: center;
}

.mobile-badge-column svg {
  cursor: pointer;
  transition: opacity 0.2s;
}

.mobile-info-icon {
  cursor: pointer;
}

.desktop-info-icon {
  cursor: pointer;
}

/* Mobile actions container */
.mobile-actions-container {
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 90px;
  flex-shrink: 0;
  position: relative;
}

/* Mobile edit buttons 2x2 grid - fill available space */
.mobile-edit-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 82px;
  /* Square to match height minus padding */
  height: 82px;
  /* 90px - 8px padding */
  aspect-ratio: 1 / 1;
}

/* Ensure title area expands properly */
.adddata-boulder-title {
  min-width: 0;
  /* Allow flex shrinking */
}

/* Desktop alignment fixes - HIGH-SPECIFICITY CSS GRID LAYOUT */
@media (min-width: 769px) {

  /* Edit mode - 5 columns (with status column) */
  .adddata-boulders-data-box .adddata-boulders-data-box-row.new.editing-mode {
    display: grid !important;
    grid-template-columns: minmax(300px, 1fr) 120px 170px 60px minmax(100px, auto);
    /*                     left-section  grade  info  status actions */
    gap: 16px;
    align-items: center;
    min-height: 80px;
    width: 100%;
    padding: 0 16px 0 0;
    border-bottom: 1px solid #c4c4c4;
    transition: background-color 0.2s ease;
  }

  /* Play mode - 5 columns (with points column) */
  .adddata-boulders-data-box .adddata-boulders-data-box-row.new:not(.editing-mode) {
    display: grid !important;
    grid-template-columns: minmax(300px, 1fr) 120px 170px 60px minmax(100px, auto);
    /*                     left-section  grade  info  POINTS actions */
    gap: 16px;
    align-items: center;
    min-height: 80px;
    width: 100%;
    padding: 0 16px 0 0;
    border-bottom: 1px solid #c4c4c4;
    transition: background-color 0.2s ease;
  }

  /* Points column styling */
  .adddata-boulder-points {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
  }

  /* Hide points in edit mode, show status instead */
  .editing-mode .adddata-boulder-points {
    display: none;
  }

  /* Hide status in play mode, show points instead */
  .adddata-boulders-data-box-row:not(.editing-mode) .boulder-status-column {
    display: none;
  }

  /* Left section (image + title) - flex container within grid cell */
  .boulder-left-section {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  /* Grade column - center aligned with specificity */
  .adddata-boulders-data-box .boulder-grade-column {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Width controlled by grid template, not needed here */
  }

  /* Info icons row - LEFT aligned with high specificity */
  .adddata-boulders-data-box .boulder-info-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* LEFT align icons */
    gap: 8px;
    /* Width controlled by grid template */
  }

  /* Info icons should not wrap */
  .boulder-info-row svg {
    flex-shrink: 0;
  }

  /* Status column - center aligned with specificity */
  .adddata-boulders-data-box .boulder-status-column {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Width controlled by grid template */
  }

  /* Actions container - aligned to end with specificity */
  .adddata-boulders-data-box .adddata-boulder-icons-container {
    display: flex;
    align-items: center;
    justify-self: end;
    /* Align to end of grid cell */
    gap: 8px;
  }

  /* Points column is now used - removed display: none */

  /* Grade badge styling */
  .grade-custom-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  /* Status badge styling */
}

.dark-mode-active .adddata-boulders-data-box {
  background: transparent !important;
}

/* Rimuovere hover effects in edit mode */
.boulder-box-mobile.editing-mode:hover {
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.adddata-boulders-data-box-row.editing-mode:hover {
  border-color: transparent !important;
  background-color: transparent !important;
  transform: none !important;
}

/* Boulder title with truncation */
.boulder-title-truncate {
  font-size: inherit;
  font-weight: inherit;
  max-width: 100%;
}

/* Boulder info row icons hover effect */
.boulder-info-row svg {
  cursor: pointer;
  transition: opacity 0.2s;
}

.boulder-info-row svg:hover {
  opacity: 1 !important;
}

/* Mobile badges in 3 columns */
.mobile-badges-three-columns {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.mobile-badge-column {
  display: flex;
  align-items: center;
}

.mobile-badge-column svg {
  cursor: pointer;
  transition: opacity 0.2s;
}

.mobile-info-icon {
  cursor: pointer;
}

.desktop-info-icon {
  cursor: pointer;
}

/* Mobile actions container */
.mobile-actions-container {
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 90px;
  flex-shrink: 0;
  position: relative;
}

/* Mobile edit buttons 2x2 grid - fill available space */
.mobile-edit-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  width: 82px;
  /* Square to match height minus padding */
  height: 82px;
  /* 90px - 8px padding */
  aspect-ratio: 1 / 1;
}

/* Ensure title area expands properly */
.adddata-boulder-title {
  min-width: 0;
  /* Allow flex shrinking */
}

/* Desktop alignment fixes - HIGH-SPECIFICITY CSS GRID LAYOUT */
@media (min-width: 769px) {

  /* Edit mode - 5 columns (with status column) */
  .adddata-boulders-data-box .adddata-boulders-data-box-row.new.editing-mode {
    display: grid !important;
    grid-template-columns: minmax(300px, 1fr) 120px 170px 60px minmax(100px, auto);
    /*                     left-section  grade  info  status actions */
    gap: 16px;
    align-items: center;
    min-height: 80px;
    width: 100%;
    padding: 0 16px 0 0;
    border-bottom: 1px solid #c4c4c4;
    transition: background-color 0.2s ease;
  }

  /* Play mode - 5 columns (with points column) */
  .adddata-boulders-data-box .adddata-boulders-data-box-row.new:not(.editing-mode) {
    display: grid !important;
    grid-template-columns: minmax(300px, 1fr) 120px 170px 60px minmax(100px, auto);
    /*                     left-section  grade  info  POINTS actions */
    gap: 16px;
    align-items: center;
    min-height: 80px;
    width: 100%;
    padding: 0 16px 0 0;
    border-bottom: 1px solid #c4c4c4;
    transition: background-color 0.2s ease;
  }

  /* Points column styling */
  .adddata-boulder-points {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
  }

  /* Hide points in edit mode, show status instead */
  .editing-mode .adddata-boulder-points {
    display: none;
  }

  /* Hide status in play mode, show points instead */
  .adddata-boulders-data-box-row:not(.editing-mode) .boulder-status-column {
    display: none;
  }

  /* Left section (image + title) - flex container within grid cell */
  .boulder-left-section {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  /* Grade column - center aligned with specificity */
  .adddata-boulders-data-box .boulder-grade-column {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Width controlled by grid template, not needed here */
  }

  /* Info icons row - LEFT aligned with high specificity */
  .adddata-boulders-data-box .boulder-info-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* LEFT align icons */
    gap: 8px;
    /* Width controlled by grid template */
  }

  /* Info icons should not wrap */
  .boulder-info-row svg {
    flex-shrink: 0;
  }

  /* Status column - center aligned with specificity */
  .adddata-boulders-data-box .boulder-status-column {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Width controlled by grid template */
  }

  /* Actions container - aligned to end with specificity */
  .adddata-boulders-data-box .adddata-boulder-icons-container {
    display: flex;
    align-items: center;
    justify-self: end;
    /* Align to end of grid cell */
    gap: 8px;
  }

  /* Points column is now used - removed display: none */

  /* Grade badge styling */
  .grade-custom-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  /* Status badge styling */
  .boulder-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: none !important;
  }

  .adddata-boulders-data-box-row.editing-mode:hover {
    border-color: transparent !important;
    background-color: transparent !important;
    transform: none !important;
  }

  /* Boulder title with truncation */
  .boulder-title-truncate {
    font-size: inherit;
    font-weight: inherit;
    max-width: 100%;
  }

  /* Boulder info row icons hover effect */
  .boulder-info-row svg {
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .boulder-info-row svg:hover {
    opacity: 1 !important;
  }

  /* Mobile badges in 3 columns */
  .mobile-badges-three-columns {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
  }

  .mobile-badge-column {
    display: flex;
    align-items: center;
  }

  .mobile-badge-column svg {
    cursor: pointer;
    transition: opacity 0.2s;
  }

  .mobile-info-icon {
    cursor: pointer;
  }

  .desktop-info-icon {
    cursor: pointer;
  }

  /* Mobile actions container */
  .mobile-actions-container {
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 90px;
    flex-shrink: 0;
    position: relative;
  }

  /* Mobile edit buttons 2x2 grid - fill available space */
  .mobile-edit-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    width: 82px;
    /* Square to match height minus padding */
    height: 82px;
    /* 90px - 8px padding */
    aspect-ratio: 1 / 1;
  }

  /* Ensure title area expands properly */
  .adddata-boulder-title {
    min-width: 0;
    /* Allow flex shrinking */
  }

  /* Unchecked boulder icon style */
  .adddata-boulders-data-box-setting-icon.boulder-unchecked-icon {
    border: 1px solid rgba(155, 155, 155, 0.1) !important;
    border-radius: 50%;
  }
}