/* =============================================================================
   styles.css
   Fully updated to unify sidebar button styles and reorganize layout.
   Original:  [oai_citation:1‡styles.css](file-service://file-XGeMQz79YWMXmh2S1M3SNb)
   ============================================================================= */

/* ─── Global Resets ────────────────────────────────────────────────────────── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    overflow: hidden;
}

h1, h2, h3, h4 {
    color: #333;
}

/* ─── Container Layout ─────────────────────────────────────────────────────── */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* ─── Top Controls (Header) ───────────────────────────────────────────────── */
.top-controls {
    display: flex;
    background-color: #fff;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap; /* allow wrapping on narrow screens */
}

.top-controls h1 {
    flex: 1 1 auto;
    font-size: 1.2em;
    cursor: pointer; /* preserved from inline style */
      margin: 0 auto;
        text-align: center;
}

.top-controls button,
.top-controls input[type="file"] {
    margin-left: 10px;
}

/* ─── Main Content Split ───────────────────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* ─── Sidebar (Left Pane) ──────────────────────────────────────────────────── */
.sidebar {
    width: 400px;
    background-color: #fff;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    padding: 10px;
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.3);
    border-radius: 3px;
}

/* ─── Note Controls Container (Right Pane) ────────────────────────────────── */
.note-controls-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 10px;
}

/* Grid of Note Controls */
#notes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    overflow-y: auto;
}

.note-controls-container::-webkit-scrollbar {
    width: 6px;
}

.note-controls-container::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.3);
    border-radius: 3px;
}

/* Individual Note Control Card */
.note-control {
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
}

.note-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.note-header label {
    margin-left: 5px;
    font-weight: bold;
    flex: 1;
}

.note-settings {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.note-settings label {
    margin-bottom: 5px;
    font-weight: bold;
}

.note-settings input[type="number"],
.note-settings input[type="range"],
.note-settings select {
    width: 100%;
    margin-bottom: 10px;
}

.note-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.note-buttons button {
    flex: 1;
    padding: 5px;
    border: none;
    background-color: #4CAF50;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.note-buttons button:hover {
    background-color: #45a049;
}

.modulation-section {
    display: flex;
    flex-direction: column;
}

.modulation-section label {
    font-weight: bold;
    margin-bottom: 5px;
}

.modulation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.modulation-grid .modulation-control {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modulation-grid label {
    font-size: 0.9em;
}

.modulation-grid input[type="range"] {
    width: 100%;
}

/* Visualization Canvas */
#visualization {
    width: 100%;
    height: 200px;
    background-color: #222;
    border-radius: 4px;
    margin-top: 10px;
}

/* ─── Responsive Media Queries ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #ccc;
    }
    .main-content {
        flex-direction: column;
    }
    #notes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #notes {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   ——— REVISED SIDEBAR STYLING BELOW ——————————————————————————————————————————
   ============================================================================= */

/* ─── Section Headings ─────────────────────────────────────────────────────── */
.sidebar .section h2 {
    margin-bottom: 8px;
    font-size: 1.2em;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.sidebar .section h3 {
    margin-top: 12px;
    margin-bottom: 8px;
    font-size: 1em;
    color: #555;
}

/* ─── Control Rows ───────────────────────────────────────────────────────── */
.control-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.control-row label {
    flex: 0 0 120px; /* fixed width for labels */
    font-weight: bold;
    font-size: 0.95em;
    color: #333;
}

.control-row input[type="number"],
.control-row input[type="range"],
.control-row select {
    flex: 1 1 auto;
    margin-right: 8px;
}

.control-row span {
    width: 40px;
    text-align: right;
    font-size: 0.9em;
}

/* ─── Shared Button Styling ───────────────────────────────────────────────── */
.sidebar-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 4px;
    background-color: #2196F3; /* primary blue */
    color: #fff;
    cursor: pointer;
    font-size: 0.9em;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: background-color 0.15s ease-in-out;
}

.sidebar-btn:hover {
    background-color: #0b7dda;
}

/* ─── Button Modifier Classes ─────────────────────────────────────────────── */
.btn-secondary {
    background-color: #607D8B; /* grey-blue */
}
.btn-secondary:hover {
    background-color: #546e7a;
}

.btn-warning {
    background-color: #f44336; /* red for undo/redo */
}
.btn-warning:hover {
    background-color: #da190b;
}

.btn-danger {
    background-color: #E74C3C; /* danger red */
}
.btn-danger:hover {
    background-color: #C0392B;
}

/* ─── Button Grid for Randomize/Morph Section ────────────────────────────── */
.btn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 4px;
}

/* ─── Octave Display Styling ─────────────────────────────────────────────── */
#octave-display {
    font-weight: bold;
    margin-top: 6px;
    text-align: center;
    font-size: 0.95em;
}

.param-label {
  cursor: pointer;
  text-decoration: underline dotted;
}
.param-label:hover {
  color: #007acc;
}

.param-label, .header-label {
  user-select: none;
  cursor: pointer;
}

.note-control.inactive {
  background-color: #e0e0e0;
  opacity: 0.7;
}
