/**
 * VISUAL STYLE EDITOR STYLES
 * Cyberpunk-themed visual editor interface
 */

/* Main Editor Panel */
#visual-style-editor {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 380px;
  max-height: calc(100vh - 40px);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  border: 2px solid var(--neon-blue, #0ff);
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3),
              0 0 60px rgba(0, 255, 255, 0.1);
  z-index: 9998;
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-blue, #0ff);
  overflow: hidden;
  animation: vseSlideIn 0.3s ease;
}

@keyframes vseSlideIn {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Header */
.vse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 2px solid var(--neon-blue, #0ff);
  background: rgba(0, 255, 255, 0.05);
}

.vse-header h3 {
  margin: 0;
  font-size: 16px;
  text-shadow: 0 0 10px var(--neon-blue, #0ff);
  color: var(--neon-blue, #0ff);
}

.vse-header-actions {
  display: flex;
  gap: 5px;
}

/* Content Area */
.vse-content {
  padding: 15px 20px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
}

/* Custom Scrollbar */
.vse-content::-webkit-scrollbar {
  width: 8px;
}

.vse-content::-webkit-scrollbar-track {
  background: #0a0a0a;
}

.vse-content::-webkit-scrollbar-thumb {
  background: var(--neon-blue, #0ff);
  border-radius: 4px;
}

.vse-content::-webkit-scrollbar-thumb:hover {
  background: var(--neon-pink, #f0f);
}

/* Action Buttons */
.vse-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.vse-btn {
  background: transparent;
  border: 1px solid var(--neon-blue, #0ff);
  color: var(--neon-blue, #0ff);
  padding: 8px 16px;
  border-radius: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.vse-btn:hover {
  background: var(--neon-blue, #0ff);
  color: #0a0a0a;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.vse-btn.primary {
  background: var(--neon-blue, #0ff);
  color: #0a0a0a;
  font-weight: bold;
}

.vse-btn.primary:hover {
  background: var(--neon-pink, #f0f);
  border-color: var(--neon-pink, #f0f);
}

/* Sections */
.vse-section {
  margin-bottom: 15px;
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.vse-section:hover {
  border-color: var(--neon-blue, #0ff);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.vse-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(0, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
}

.vse-section-header:hover {
  background: rgba(0, 255, 255, 0.1);
}

.vse-section-title {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--neon-pink, #f0f);
  text-shadow: 0 0 5px var(--neon-pink, #f0f);
}

.vse-section-toggle {
  font-size: 12px;
  color: var(--neon-blue, #0ff);
  transition: transform 0.3s ease;
}

.vse-section.collapsed .vse-section-toggle {
  transform: rotate(-90deg);
}

.vse-section-content {
  padding: 15px;
  display: block;
  animation: vseSlideDown 0.3s ease;
}

.vse-section.collapsed .vse-section-content {
  display: none;
}

@keyframes vseSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Controls */
.vse-control {
  margin-bottom: 15px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 255, 0.2);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.vse-control:hover {
  background: rgba(0, 255, 255, 0.05);
  border-color: var(--neon-blue, #0ff);
}

.vse-control:last-child {
  margin-bottom: 0;
}

.vse-control label {
  display: block;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Color Input */
.vse-color-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.vse-color-picker {
  width: 50px;
  height: 35px;
  border: 2px solid var(--neon-blue, #0ff);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s ease;
}

.vse-color-picker:hover {
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Size Input */
.vse-size-input {
  display: flex;
  gap: 10px;
  align-items: center;
}

.vse-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 255, 255, 0.2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.vse-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-blue, #0ff);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.vse-slider::-webkit-slider-thumb:hover {
  background: var(--neon-pink, #f0f);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
  transform: scale(1.2);
}

.vse-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--neon-blue, #0ff);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.vse-slider::-moz-range-thumb:hover {
  background: var(--neon-pink, #f0f);
  box-shadow: 0 0 15px rgba(255, 0, 255, 0.7);
  transform: scale(1.2);
}

/* Text Input */
.vse-text-input {
  flex: 1;
  min-width: 120px;
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid var(--neon-blue, #0ff);
  color: var(--neon-blue, #0ff);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  outline: none;
  transition: all 0.3s ease;
}

.vse-text-input:focus {
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
  background: rgba(0, 255, 255, 0.1);
}

.vse-text-input::placeholder {
  color: rgba(0, 255, 255, 0.5);
}

/* Save Indicator */
.vse-save-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--neon-blue, #0ff), var(--neon-pink, #f0f));
  color: #0a0a0a;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  animation: vsePulse 2s ease forwards;
  z-index: 10001;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

@keyframes vsePulse {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.9);
  }
  20% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateX(-50%) scale(1.02);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Notification */
.vse-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--neon-pink, #f0f), var(--neon-purple, #c526ff));
  color: #fff;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: bold;
  font-family: 'Orbitron', sans-serif;
  font-size: 13px;
  animation: vseNotify 3s ease forwards;
  z-index: 10001;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

@keyframes vseNotify {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  15% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Glitch Effect for Panel */
#visual-style-editor::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    var(--neon-blue, #0ff),
    var(--neon-pink, #f0f),
    var(--neon-blue, #0ff),
    transparent
  );
  animation: vseGlitchLine 2s linear infinite;
}

@keyframes vseGlitchLine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Responsive Design */
@media (max-width: 768px) {
  #visual-style-editor {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: 20px;
    width: auto;
    max-height: 50vh;
  }

  .vse-header {
    padding: 12px 15px;
  }

  .vse-header h3 {
    font-size: 14px;
  }

  .vse-content {
    padding: 10px 15px;
    max-height: calc(50vh - 80px);
  }

  .vse-actions {
    flex-direction: column;
  }

  .vse-btn {
    width: 100%;
  }
}

/* Cyberpunk Preset Colors */
.vse-color-presets {
  display: flex;
  gap: 5px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.vse-preset-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid rgba(0, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.vse-preset-color:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px currentColor;
  border-color: #fff;
}

/* Live Preview Badge */
.vse-live-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 255, 65, 0.2);
  border: 1px solid #00ff41;
  color: #00ff41;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: vsePulse 2s ease-in-out infinite;
}

/* Disabled State */
.vse-control.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Focus States */
.vse-color-picker:focus,
.vse-text-input:focus,
.vse-slider:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--neon-pink, #f0f);
}

/* Hover Effects for Controls */
.vse-control:hover .vse-control-label {
  color: var(--neon-blue, #0ff);
}

/* Section Transitions */
.vse-section-content {
  transition: all 0.3s ease;
}

/* Button Group */
.vse-button-group {
  display: flex;
  gap: 5px;
  margin-top: 8px;
}

.vse-button-group .vse-btn {
  flex: 1;
  padding: 6px 12px;
  font-size: 10px;
}

/* Tooltip */
.vse-tooltip {
  position: relative;
}

.vse-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.vse-tooltip:hover::after {
  opacity: 1;
}

/* Range Slider Value Display */
.vse-slider-value {
  min-width: 60px;
  text-align: right;
  font-size: 11px;
  color: var(--neon-blue, #0ff);
  font-family: monospace;
}

/* Empty State */
.vse-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* Loading Overlay */
.vse-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.vse-loading::after {
  content: '';
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-top-color: var(--neon-blue, #0ff);
  border-radius: 50%;
  animation: vseSpin 1s linear infinite;
}

@keyframes vseSpin {
  to { transform: rotate(360deg); }
}
