/**
 * Video Controls Styles
 */

/* Video controls container */
.video-controls {
  display: none;
  padding: 20px;
  background-color: #1e1e1e;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Video info display */
.video-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #2a2a2a;
  border-radius: 6px;
}

.video-info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.video-info-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-info-value {
  font-size: 16px;
  color: #fff;
  font-weight: bold;
}

/* Audio toggle styling */
.audio-toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555;
  transition: 0.3s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #4caf50;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
  background-color: #333;
  cursor: not-allowed;
}

.toggle-switch input:disabled + .toggle-slider:before {
  background-color: #666;
}

.no-audio-hint {
  font-size: 11px;
  color: #888;
  font-style: italic;
}

/* Preview slider section */
.preview-slider-section {
  margin-bottom: 20px;
}

.preview-slider-section h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

#preview-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #3a3a3a;
  outline: none;
  -webkit-appearance: none;
}

#preview-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2196f3;
  cursor: pointer;
  transition: background-color 0.2s;
}

#preview-slider::-webkit-slider-thumb:hover {
  background: #1976d2;
}

#preview-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2196f3;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
}

#preview-slider::-moz-range-thumb:hover {
  background: #1976d2;
}

#preview-time {
  min-width: 100px;
  text-align: right;
  font-size: 14px;
  color: #ccc;
  font-family: 'Courier New', monospace;
}

/* Video Settings section */
.video-settings-section {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #2a2a2a;
  border-radius: 6px;
}

.video-settings-section h3 {
  margin: 0 0 15px 0;
  font-size: 14px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 10px;
}

.video-settings-section .control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-settings-section .control-group label {
  font-size: 12px;
  color: #aaa;
}

.video-settings-section select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  cursor: pointer;
}

.video-settings-section select:hover {
  border-color: #555;
}

.video-settings-section select:focus {
  outline: none;
  border-color: #2196f3;
}

.video-settings-section input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #444;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
  font-family: 'Courier New', monospace;
}

.video-settings-section input[type="text"]:hover {
  border-color: #555;
}

.video-settings-section input[type="text"]:focus {
  outline: none;
  border-color: #2196f3;
}

.video-settings-section .edge-controls {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #444;
}

.video-settings-section .slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-settings-section input[type="range"] {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #444;
  outline: none;
  -webkit-appearance: none;
}

.video-settings-section input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #9c27b0;
  cursor: pointer;
}

.video-settings-section input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #9c27b0;
  cursor: pointer;
  border: none;
}

.video-settings-section .slider-value {
  min-width: 40px;
  text-align: right;
  font-size: 14px;
  color: #ccc;
  font-family: 'Courier New', monospace;
}

/* Progress section */
.progress-section {
  margin-bottom: 20px;
}

.progress-section h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #ccc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.progress-container {
  position: relative;
  width: 100%;
  height: 30px;
  background-color: #2a2a2a;
  border-radius: 15px;
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background-color: #2196f3;
  transition: width 0.3s ease, background-color 0.3s ease;
  border-radius: 15px;
}

/* Phase-specific colors */
#progress-bar.extracting {
  background-color: #4caf50;
}

#progress-bar.converting {
  background-color: #9c27b0;
}

#progress-bar.encoding {
  background-color: #ff9800;
}

#progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Video action buttons */
.video-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

#convert-video-btn,
#cancel-video-btn {
  padding: 12px 30px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: bold;
}

#convert-video-btn {
  background-color: #2196f3;
  color: white;
}

#convert-video-btn:hover:not(:disabled) {
  background-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

#convert-video-btn:disabled {
  background-color: #555;
  color: #888;
  cursor: not-allowed;
}

#cancel-video-btn {
  background-color: #f44336;
  color: white;
  display: none;
}

#cancel-video-btn:hover:not(:disabled) {
  background-color: #d32f2f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

#cancel-video-btn:disabled {
  background-color: #555;
  color: #888;
  cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
  .video-info {
    grid-template-columns: 1fr;
  }

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

  #convert-video-btn,
  #cancel-video-btn {
    width: 100%;
  }
}
