@property --text-color {
    syntax: "<color>";
    inherits: false;
    initial-value: #212529;    
}

@property --input-text-color {
    syntax: "<color>";
    inherits: false;
    initial-value: black;
}

@property --background-color {
    syntax: "<color>";
    inherits: false;
    initial-value: #F2F2F2;
}

@property --input-color {
    syntax: "<color>";
    inherits: false;
    initial-value: #ffffff;    
}

@property --border-color {
    syntax: "<color>";
    inherits: false;
    initial-value: #3F678A;    
}

* {
    border-color: var(--border-color);
    color: var(--text-color);
}

#box {
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    max-width: 100%;
    min-width: 320pt;
    padding: 1rem;
    position: relative;
    background-color: var(--background-color);
}

@media screen and (min-width: 441pt) {
    #box {
        max-width: 576px;
    }
}

p {
    margin: 0.4rem;
}

#waveLedSection {
    --ledRows: 16;
    --ledColumns: 16;
    border: 1px solid var(--border-color);
    width: fit-content;
    aspect-ratio: 1 / 1;
    display: grid;
    grid-template-columns: repeat(var(--ledColumns), 1fr); /* ledAmount columns of equal width */
    grid-template-rows: repeat(var(--ledRows), 1fr);  /* ledAmount rows of equal height */
    place-items: center;
    margin: auto;
    touch-action: none;
    position: relative; /* Add relative positioning for pseudo-elements */
}

#waveLedSection::before,
#waveLedSection::after {
    content: "";
    position: absolute;
    background-color: var(--border-color);
    z-index: 1;
}

/* Horizontal line */
#waveLedSection::before {
    width: 100%;
    height: 0.5px;
    top: 50%; /* Center it vertically */
    left: 0;
}

/* Vertical line */
#waveLedSection::after {
    height: 100%;
    width: 0.5px;
    left: 50%; /* Center it horizontally */
    top: 0;
}

.waveLed {
    --ledSize: 0.7em;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    height: var(--ledSize);
    width: var(--ledSize);
    margin: 1px;
}

#stepLedSection {
    --ledRows: 2;
    --ledColumns: 8;
    height: 5rem;
    max-width: 75%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(var(--ledColumns), 1fr); /* ledAmount columns of equal width */
    grid-template-rows: repeat(var(--ledRows), 1fr);  /* ledAmount rows of equal height */
    place-items: center;
}

.stepLed {
    --ledSize: 1.3rem;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    height: var(--ledSize);
    width: var(--ledSize);    
}

#waveSelectors, #stepControls, #pitches, #modifyPitches {
    display: flex;
    place-items: center;
    justify-content: flex-start;
}

#globalControls {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 1rem;
    right: 1rem;
    place-items: center;
}
#playButton {
    margin: 0.5rem 0;
}

#wavePresets, #toneControls {
    margin: auto;
    width: fit-content;
    text-align: center;
}

#stepControls, #pitches, #modifyPitches {
    height: 2.5rem;
}

.tactileSwitch {
    --size: 2.2rem;
    border-radius: 50%;
    height: var(--size);
    width: var(--size);
    font-size: 0.75rem;
    margin: 0 0.5rem;
}

.tactileSwitch, input {
    background-color: var(--input-color);
    color: var(--input-text-color)
}

input {
    margin: 0 0.25rem;
}

#saveLabel {
    color: var(--border-color);
}

.hidden {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.visible {
    opacity: 1;
    transition: opacity 0.25s ease-in;
}

#bpmInput, #dutyCycleInput {
    width: 3rem;
}

#hzInput{
    width: 6rem;
}