/* Station Component Preview Styles */

.station-component-preview {
  transition: all 0.2s ease-in-out;
  cursor: move;
}

.station-component-preview[data-read-only="true"] {
  cursor: default;
  opacity: 0.85;
}

.station-component-preview:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.station-component-preview.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.station-component-preview.drag-preview {
  pointer-events: none;
  border: 2px dashed #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

.station-component-preview.drag-invalid {
  border-color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}

/* Interactive component styles */
.station-component-preview input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.station-component-preview input[type="range"]::-webkit-slider-track {
  background: #e5e7eb;
  height: 0.5rem;
  border-radius: 0.5rem;
}

.station-component-preview input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: #3b82f6;
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -0.375rem;
}

.station-component-preview input[type="range"]::-moz-range-track {
  background: #e5e7eb;
  height: 0.5rem;
  border-radius: 0.5rem;
}

.station-component-preview input[type="range"]::-moz-range-thumb {
  background: #3b82f6;
  height: 1.25rem;
  width: 1.25rem;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Toggle switch animation */
.station-component-preview button[role="switch"][aria-checked="true"] {
  background-color: #3b82f6;
}

.station-component-preview button[role="switch"][aria-checked="true"] span {
  transform: translateX(1.25rem);
}

/* Grid overlay for alignment */
#component-layout.show-grid {
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 10px 10px;
}

/* Nested component styles */
.station-component-preview .nested-component {
  font-size: 0.75rem;
  line-height: 1rem;
}

.station-component-preview .nested-component button {
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
}

.station-component-preview .nested-component input[type="range"] {
  height: 0.25rem;
}

.station-component-preview .nested-component input[type="range"]::-webkit-slider-thumb {
  height: 0.75rem;
  width: 0.75rem;
  margin-top: -0.25rem;
}

.station-component-preview .nested-component input[type="range"]::-moz-range-thumb {
  height: 0.75rem;
  width: 0.75rem;
}

/* Admin controls visibility */
.station-component-preview:hover .opacity-0 {
  opacity: 1;
}

/* Resource display styles */
.station-component-preview .resource-display {
  min-height: 2rem;
}

/* Ensure overflow is handled properly */
.station-component-preview > div {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.station-component-preview .overflow-auto {
  min-height: 0;
}