/* Custom styling for select boxes and inputs in settings */

/* Add stylish radial gradient background */
body {
  background: radial-gradient(circle at center, #1e0c2e 0%, #0f0617 60%, #080808 100%) !important;
  background-attachment: fixed !important;
}

/* Set consistent width for all selects in settings */
.settings-table select {
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  height: 36px;
}

/* Center settings tables in their containers */
.settings-table {
  margin: 0 auto;
}

/* Set consistent width for number inputs */
.settings-table input[type="number"] {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  height: 36px;
  text-align: center;
}

/* Vertical alignment for cells */
.settings-table td {
  vertical-align: middle;
  text-align: left;
  padding: 8px 16px;
  height: 50px; /* Consistent row height */
}

/* First column alignment (labels) */
.settings-table td:first-child {
  text-align: right;
  width: 280px;
  min-width: 280px;
  padding-right: 20px;
  white-space: nowrap;
}

/* Second column alignment (inputs) */
.settings-table td:nth-child(2) {
  text-align: left;
  min-width: 250px; /* Ensure there's enough space for inputs */
}

/* Fix input groups for sliders */
.settings-table .input-group {
  display: flex;
  align-items: center;
  width: auto;
  max-width: 250px;
}

/* Remove duplicate */

/* Tempo, embellishChance, and other specific sliders */
#tempo, #restChance, #embellishChance, #silenceChance, 
#changeDirChance, #flamAmount, #verseNumNotesToJump,
#chorusNumNotesToJump, #bridgeNumNotesToJump, 
#soloNumNotesToJump, #maxDeviation {
  width: 75px !important;
  min-width: 75px !important;
}

/* Value display for sliders */
.settings-table .input-group::after {
  display: inline-block;
  min-width: 35px; /* Consistent width for value display */
  text-align: left;
}

/* Table level styling */
.settings-table {
  width: 100%;
  max-width: 900px;
  border-collapse: separate;
  border-spacing: 0 2px;
  margin: 0 auto;
}

/* Setting fieldset styling */
.shrink-center {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(rgba(40, 20, 60, 0.3), rgba(25, 10, 35, 0.3));
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  border: 1px solid rgba(122, 28, 178, 0.3);
}

/* Center content within settings panels */
.settings-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Parts and drums tables */
.parts-settings table,
.drum-settings table {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
}

/* Center parts and drums containers */
.parts-settings,
.drum-settings {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.parts-settings th,
.drum-settings th {
  font-size: 0.9em;
  padding: 8px 4px;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.2);
}

.parts-settings td,
.drum-settings td {
  padding: 6px 4px;
  text-align: center;
  vertical-align: middle;
  height: 46px; /* Consistent row height */
}

/* Set consistent width for instrument/drum selects */
.parts-settings select, 
.drum-settings select {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 36px;
}

/* Checkbox alignment */
input[type="checkbox"] {
  margin: 0 auto;
  display: block;
}

/* Switches section checkbox alignment */
.flex-col .settings-table input[type="checkbox"] {
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Add alternate row styling for better readability */
.settings-table tr:nth-child(even) {
  background-color: rgba(30, 30, 30, 0.3);
}

/* Hover effect for rows */
.settings-table tr:hover {
  background-color: rgba(122, 28, 178, 0.1);
}

/* Add spacing between fieldsets and sections */
fieldset {
  margin-bottom: 30px;
}

/* Fix for range sliders to prevent them from appearing cut off */
input[type="range"] {
  margin-top: 3px;
  margin-bottom: 3px;
  width: 75px !important; /* 50% of original 150px */
  min-width: 75px !important;
}

/* Make switches more compact and centered while using available space */
.flex-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  overflow-x: visible;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.flex-col {
  flex: 0 0 calc(33.333% - 10px);
  white-space: normal;
  min-width: 280px;
  max-width: 350px;
}

/* Compact checkbox table cells for switches */
.flex-col .settings-table td {
  padding: 3px 6px;
  height: 36px;
  vertical-align: middle;
}

/* Make switches labels more compact */
.flex-col .settings-table td:first-child {
  width: auto;
  min-width: auto;
  padding-right: 10px;
  font-size: 0.9em;
}

/* Ensure all fieldsets in settings panel use full width and are centered */
.settings-panel fieldset.shrink-center {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 15px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Center tables within fieldsets while using full width */
.settings-panel fieldset.shrink-center .settings-table {
  max-width: 850px;
  width: 100%;
}

/* Specifically target the switches tab fieldset */
#app [v-show="chordSubTab==='switches'"] fieldset.shrink-center {
  padding: 12px 10px;
  width: 100%;
}

/* Make switches table more compact */
.flex-col .settings-table {
  width: 100%;
  border-spacing: 0;
  margin-bottom: 0;
}

/* Alternate background for switches rows */
.flex-col .settings-table tr:nth-child(even) {
  background-color: rgba(30, 30, 30, 0.4);
}

/* Special styling for labels in the general settings tab */
#numBars, #progChordLength, #notesPerChord {
  width: 80px;
  min-width: 80px;
}

/* Ensure tempo display has adequate space */
.tempo-name {
  text-align: left;
  min-width: 400px;
}

/* Enhanced tab styling */
.tabs, .nested-tabs {
  background: linear-gradient(to right, rgba(10, 5, 15, 0.8), rgba(30, 12, 46, 0.8), rgba(10, 5, 15, 0.8));
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.tab, .nested-tab {
  position: relative;
  transition: all 0.3s ease;
  padding: 12px 20px;
  overflow: hidden;
}

.tab.active, .nested-tab.active {
  background: linear-gradient(to bottom, rgba(122, 28, 178, 0.7), rgba(90, 20, 130, 0.7));
  box-shadow: 0 0 15px rgba(122, 28, 178, 0.5);
  border-bottom: none;
}

.tab:hover, .nested-tab:hover {
  background: rgba(122, 28, 178, 0.3);
}

/* Glow effect for inputs */
select:focus, input[type="number"]:focus, input[type="range"]:focus {
  box-shadow: 0 0 8px rgba(122, 28, 178, 0.7);
}

/* Style range sliders track and thumb */
input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #1e0c2e, #7a1cb2);
  border-radius: 4px;
  height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
  background: #9a3ce2;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Improve settings table row styling */
.settings-table tr:hover {
  background: linear-gradient(to right, rgba(122, 28, 178, 0.05), rgba(122, 28, 178, 0.1), rgba(122, 28, 178, 0.05));
}

/* Custom styling for drum name labels */
.drum-name, .instrument-name {
  font-weight: 600;
  font-size: 0.95em;
  text-align: center;
  color: #e0e0e0;
  min-width: 120px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 5px;
  font-family: 'Roboto', sans-serif;
}