/* VibeCoding Settings System - Consolidated */

/* Settings Panel with Tabs */
.settings-panel {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #1e1e1e;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 24px;
  border: 1px solid #2c2c2c;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 90%;
  max-width: 600px;
  box-sizing: border-box;
  margin: 0 auto;
}

/* Settings Panel Heading */
.settings-panel h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #fff;
  font-size: 22px;
  text-align: center;
}

/* Tab Navigation */
.tab-navigation {
  display: flex;
  border-bottom: 1px solid #333;
  margin-bottom: 20px;
  width: 100%;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 2px;
  overflow-x: auto;
}
.tab-button {
  background: transparent;
  border: none;
  color: #aaa;
  padding: 10px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  border-radius: 6px;
  white-space: nowrap;
  min-width: fit-content;
  flex: 1 1 0;
  text-align: center;
  position: relative;
  box-shadow: none;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  font-weight: 500;
}
  margin: 0 2px;
}

.tab-button:hover {
  color: #fff;
}

.tab-button.active {
  color: #fff;
  font-weight: 500;
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  width: 100%;
  height: 2px;
  background-color: #4CAF50;
}

/* Tab Content */
.tab-content {
  width: 100%;
}

.tab-pane {
  display: none;
  width: 100%;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* Setting Styles */
.setting {
  margin-bottom: 24px;
  width: 100%;
  padding-right: 10px;
}

.setting label {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-weight: 500;
}

.setting-description {
  display: block;
  color: #999;
  font-size: 12px;
  margin-bottom: 10px;
}

.setting-value {
  display: inline-block;
  margin-top: 8px;
  color: #4CAF50;
  font-family: monospace;
  font-size: 14px;
  padding: 4px 8px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  min-width: 40px;
  text-align: center;
}

/* Range Sliders */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #333;
  border-radius: 3px;
  outline: none;
  margin: 10px 0;
  max-width: calc(100% - 5px);
  border: none;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
  margin-left: 15px;
  flex-shrink: 0;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #555;
  transition: .3s;
  border: 1px solid #444;
  box-sizing: border-box;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: #bbb;
  transition: .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

input:checked + .slider {
  background-color: #4CAF50;
  border-color: #388E3C;
}

input:checked + .slider:before {
  background-color: white;
  transform: translateX(20px);
}

.slider.round {
  border-radius: 22px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Enhanced Color Picker - from colors-tab-fix.css */
#colorPicker {
  width: 50px !important;
  height: 40px !important;
  border-radius: 4px !important;
  border: 2px solid white !important;
  cursor: pointer !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.color-picker-container {
  display: flex !important;
  align-items: center !important;
  margin: 15px 0 !important;
  padding: 5px !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  gap: 10px;
}

#addColor {
  background-color: #4CAF50 !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 8px 16px !important;
  min-height: 40px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
  flex: 1;
  font-size: 14px;
}

#customColorsList {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 15px !important;
  min-height: 50px !important;
  padding: 10px !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.custom-colors-list {
  display: flex;
  flex-wrap: wrap;
  margin: 10px 0 20px;
  gap: 8px;
}

.color-swatch {
  position: relative;
  width: 35px;
  height: 35px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#customColorsList .color-swatch button {
  position: absolute !important;
  top: -5px !important;
  right: -5px !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}
.color-swatch button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  background: rgba(50, 50, 50, 0.7);
  color: #ddd;
  border: none;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.color-swatch button:hover {
  background: rgba(220, 50, 50, 0.85);
  color: white;
  transform: scale(1.05);
}

.color-swatch button:active {
  transform: scale(1);
  background: rgba(200, 40, 40, 0.9);
}

/* Color Theme Select */
select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  background: #2a2a2a;
  color: white;
  border: 1px solid #444;
  cursor: pointer;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Settings Controls */
.settings-controls {
  display: flex;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
  gap: 12px;
}
.settings-btn {
  padding: 10px 16px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

#resetSettings {
  background-color: #555;
  flex: 1;
}

#closeSettings {
  background-color: #4CAF50;
  flex: 2;
}

.settings-btn .icon {
  margin-right: 6px;
}

/* Enhanced tabs sections */
#colors-tab {
  padding: 10px !important;
  background-color: rgba(0, 0, 0, 0.2) !important;
  border-radius: 8px !important;
}

#customColorsSetting {
  margin-top: 20px !important;
  padding: 15px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
  display: none !important; /* Hidden by default, shown only when Custom theme is selected */
}

/* Ensure custom colors section is visible only when explicitly shown */
#customColorsSetting.custom-colors-visible {
  display: block !important;
}

/* Toggle Setting Layout */
.toggle-setting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.toggle-setting > label[for] {
  display: inline;
  margin-bottom: 0;
}

.toggle-setting > .setting-description {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 0;
}

.empty-colors-message {
  width: 100%;
  padding: 10px;
  text-align: center;
  color: #777;
  font-style: italic;
}

/* Desktop Responsive */
@media (min-width: 768px) {
  .settings-panel {
    max-width: 650px;
    width: 650px;
    padding: 28px;
  }
  
  .tab-navigation {
    flex-wrap: nowrap;
    gap: 4px;
  }
  
  .tab-button {
    padding: 12px 10px;
    font-size: 13px;
    flex: 1 1 0;
    min-width: 0;
    line-height: 1.2;
  }
}

/* Tablet Responsive */
@media (min-width: 481px) and (max-width: 767px) {
  .settings-panel {
    max-width: 600px;
    width: 95%;
    padding: 24px;
  }
  
  .tab-navigation {
    flex-wrap: nowrap;
    gap: 3px;
  }
  
  .tab-button {
    padding: 10px 8px;
    font-size: 12px;
    flex: 1 1 0;
    min-width: 0;
    line-height: 1.2;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .tab-navigation {
    flex-wrap: wrap;
    gap: 2px;
  }
  
  .tab-button {
    padding: 8px 4px;
    font-size: 11px;
    min-width: calc(33.33% - 2px);
    flex: none;
  }
  
  .settings-panel {
    padding: 18px 16px;
    max-height: 85vh;
  }
  
  .settings-panel h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }
}