/* ===============================
   INTEGRATED Z-OFFSET CONTROLS STYLES
   Add to your style.css or load separately
   =============================== */

/* Asset Item with Z-Offset Controls */
.modern-asset-zoffset {
  margin-top: 12px;
  padding: 12px;
  background: rgba(142, 68, 173, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(142, 68, 173, 0.2);
}

.zoffset-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.zoffset-value {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  color: #4caf50; /* Default green */
  transition: all 0.3s ease;
  min-width: 65px;
  text-align: center;
}

/* Z-Offset Slider with Gradient */
.zoffset-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  margin-bottom: 10px;
  background: linear-gradient(to right, 
    #f44336 0%,      /* Red at -70m */
    #ff9800 25%,     /* Orange */
    #4caf50 50%,     /* Green at 0m */
    #2196f3 75%,     /* Blue */
    #9c27b0 100%     /* Purple at +70m */
  );
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.zoffset-slider:hover {
  box-shadow: 0 2px 8px rgba(142, 68, 173, 0.4);
}

/* Slider Thumb - WebKit */
.zoffset-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 3px solid #8e44ad;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.zoffset-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(142, 68, 173, 0.8);
}

.zoffset-slider::-webkit-slider-thumb:active {
  background: #8e44ad;
  transform: scale(1.3);
}

/* Slider Thumb - Firefox */
.zoffset-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #ffffff;
  border: 3px solid #8e44ad;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  border: none;
}

.zoffset-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px rgba(142, 68, 173, 0.8);
}

.zoffset-slider::-moz-range-thumb:active {
  background: #8e44ad;
  transform: scale(1.3);
}

/* Quick Preset Buttons */
.zoffset-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.zoffset-preset-btn {
  background: rgba(142, 68, 173, 0.2);
  color: #bb86fc;
  border: 1px solid rgba(142, 68, 173, 0.3);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.zoffset-preset-btn:hover {
  background: rgba(142, 68, 173, 0.35);
  border-color: rgba(142, 68, 173, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(142, 68, 173, 0.3);
  color: #d4b0fc;
}

.zoffset-preset-btn:active {
  background: rgba(142, 68, 173, 0.5);
  transform: translateY(0);
}

.zoffset-preset-btn.active {
  background: #8e44ad;
  color: white;
  border-color: #8e44ad;
  box-shadow: 0 2px 8px rgba(142, 68, 173, 0.5);
}

/* Asset Item Enhancement */
.modern-asset-item {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid rgba(102, 126, 234, 0.5);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modern-asset-item:hover {
  background: rgba(0, 0, 0, 0.4);
  border-left-color: rgba(102, 126, 234, 0.8);
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modern-asset-itwin {
  border-left-color: rgba(17, 153, 142, 0.7);
}

.modern-asset-itwin:hover {
  border-left-color: rgba(17, 153, 142, 1);
}

/* Asset Header */
.modern-asset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modern-asset-name {
  font-weight: 600;
  font-size: 14px;
  color: #e2e8f0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 10px;
}

.modern-asset-controls {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* Opacity Control */
.modern-asset-opacity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}

.modern-asset-opacity .modern-label-small {
  min-width: 60px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.modern-asset-opacity .modern-slider-small {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.modern-asset-opacity .modern-slider-small::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modern-asset-opacity .modern-slider-small::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #667eea;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.modern-asset-opacity .modern-value-small {
  min-width: 45px;
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .zoffset-presets {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .zoffset-preset-btn {
    padding: 8px;
    font-size: 12px;
  }
  
  .modern-asset-item {
    padding: 12px;
  }
  
  .modern-asset-name {
    font-size: 13px;
  }
}

/* Animation for slider interaction */
@keyframes sliderGlow {
  0%, 100% {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }
  50% {
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.6);
  }
}

.zoffset-slider:active {
  animation: sliderGlow 0.5s ease-in-out;
}

/* Empty State */
.modern-assets-list:empty::after {
  content: 'No assets loaded';
  display: block;
  text-align: center;
  padding: 30px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

/* Scrollbar for Asset List */
.modern-assets-list {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding-right: 8px;
}

.modern-assets-list::-webkit-scrollbar {
  width: 8px;
}

.modern-assets-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modern-assets-list::-webkit-scrollbar-thumb {
  background: rgba(142, 68, 173, 0.5);
  border-radius: 4px;
}

.modern-assets-list::-webkit-scrollbar-thumb:hover {
  background: rgba(142, 68, 173, 0.7);
}

/* Icon Buttons */
.modern-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.modern-icon-btn:active {
  transform: scale(0.95);
}

.modern-icon-btn-danger {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.3);
  color: #ff6b6b;
}

.modern-icon-btn-danger:hover {
  background: rgba(231, 76, 60, 0.25);
  border-color: rgba(231, 76, 60, 0.5);
  color: #ff8787;
}
