/* ============================================
   BEATCONTROL STYLESHEET
   Requires base.css to be loaded first
   ============================================ */

/* ============================================
   BEATCONTROL-SPECIFIC LAYOUT UTILITIES
   ============================================ */

.min-h-screen {
  min-height: 100vh;
}

.max-w-7xl {
  max-width: 80rem;
}

.max-w-2xl {
  max-width: 42rem;
}

.ml-auto {
  margin-left: auto;
}

.ml-1 {
  margin-left: 0.25rem;
}

/* Flex Layout */
.flex {
  display: flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.justify-between {
  justify-content: space-between;
}

/* Grid Layout */
.grid {
  display: grid;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.pl-6 { padding-left: 1.5rem; }

.mb-3 { margin-bottom: 0.75rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }

/* Width */
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-28 { width: 7rem; }
.w-32 { width: 8rem; }
.w-40 { width: 10rem; }
.w-full { width: 100%; }

/* Height */
.h-12 { height: 3rem; }

/* Background Colors */
.bg-black { background-color: var(--black); }
.bg-gray-500 { background-color: var(--gray-500); }
.bg-gray-600 { background-color: var(--gray-600); }
.bg-gray-700 { background-color: var(--gray-700); }
.bg-gray-800 { background-color: var(--gray-800); }
.bg-gray-900 { background-color: var(--gray-900); }
.bg-red-500 { background-color: var(--red-500); }
.bg-red-600 { background-color: var(--red-600); }
.bg-green-500 { background-color: var(--green-500); }
.bg-green-600 { background-color: var(--green-600); }
.bg-purple-500 { background-color: var(--purple-500); }
.bg-purple-600 { background-color: var(--purple-600); }
.bg-cyan-500 { background-color: var(--cyan-500); }
.bg-cyan-600 { background-color: var(--cyan-600); }

.bg-opacity-75 { background-color: rgba(0, 0, 0, 0.75); }

/* Text Colors */
.text-white { color: var(--white); }
.text-gray-400 { color: var(--gray-400); }
.text-gray-500 { color: var(--gray-500); }
.text-cyan-400 { color: var(--cyan-400); }
.text-red-300 { color: var(--red-300); }
.text-red-400 { color: var(--red-400); }
.text-transparent { color: transparent; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.uppercase { text-transform: uppercase; }

/* Background Clip */
.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--cyan-400), var(--purple-400));
}

/* Border */
.border-2 { border-width: 2px; border-style: solid; }
.border-dashed { border-style: dashed; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }

.border-cyan-500 { border-color: var(--cyan-500); }
.border-gray-500 { border-color: var(--gray-500); }
.border-gray-700 { border-color: var(--gray-700); }

/* Border Radius */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Shadow */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-2xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Ring (for focus states) */
.ring-4 {
  box-shadow: 0 0 0 4px var(--yellow-400);
}

.ring-yellow-400 {
  --tw-ring-color: var(--yellow-400);
}

/* Transform */
.scale-105 { transform: scale(1.05); }

.transform {
  transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) 
             rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) 
             scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}

/* Transitions */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Position */
.fixed { position: fixed; }

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.z-50 { z-index: 50; }

/* Hover States */
.hover\:bg-gray-500:hover { background-color: var(--gray-500); }
.hover\:bg-gray-600:hover { background-color: var(--gray-600); }
.hover\:bg-red-600:hover { background-color: var(--red-600); }
.hover\:bg-green-600:hover { background-color: var(--green-600); }
.hover\:bg-purple-500:hover { background-color: var(--purple-500); }
.hover\:bg-cyan-600:hover { background-color: var(--cyan-600); }
.hover\:text-red-300:hover { color: var(--red-300); }
.hover\:border-cyan-500:hover { border-color: var(--cyan-500); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* Button Styles */
button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

button:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

button.preset-export,
button.preset-load {
  background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
  color: var(--white);
}

button.preset-export:hover,
button.preset-load:hover {
  background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
}

/* Select Dropdown */
select.preset-select {
  background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
  color: var(--white);
  border: 2px solid var(--cyan-500);
  cursor: pointer;
}

select.preset-select:hover {
  background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-800) 100%);
}

select.preset-select option {
  background-color: var(--gray-700) !important;
  color: var(--white) !important;
  padding: 8px !important;
}

select.preset-select option:disabled {
  color: var(--gray-400) !important;
  background-color: var(--gray-800) !important;
}

select.preset-select optgroup {
  background-color: var(--gray-800) !important;
  color: var(--cyan-400) !important;
  font-weight: bold !important;
}

/* Range Sliders */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan-400);
  cursor: pointer;
}

input[type="range"]::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cyan-400);
  cursor: pointer;
  border: none;
}

/* Select Styles */
select {
  cursor: pointer;
  border: none;
  outline: none;
}

select:focus {
  outline: 2px solid var(--cyan-500);
  outline-offset: 2px;
}