/* tune picocss spacing to be a bit less generous */
:root {
    --spacing: .4rem;
    --typography-spacing-vertical: .4rem;
    --background-color: #fff;
}

h1 {
    display: block;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
}

.content {
    max-width: 520px;
    align-items: center;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.primaryText {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.015em;
    color: #18181b;
    text-align: center;
}

.secondaryText{
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    color: #52525b;
    text-align: right;
}

.firmwareContent{
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.readonlyInput{
    width: 100%;
    padding: 1rem;
    background-color: #f4f4f5;
    border: 1px solid #e4e4e7;
    margin: 0 0 0 0 !important;
}

form{
    margin-bottom: 0 !important;
}

.primaryButton{
    background-color: #18181b;
    padding: 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.015em;
    color: white;
    text-align: center;
    border: none;
    text-transform: uppercase;
}

.primaryButton:hover{
    background-color: #fff;
    outline: 1px solid #18181b;
    transition: ease-in;
    transition-duration: 150ms;
    color: #18181b;
}

.firmwareSection{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.img-logo {
    width: 500px;
    height: 77px;
    display: block;
    margin: 0 auto;
    position: relative;
    background: url(../img/fm_logo.png) center / cover;
}


/* light theme config */
@media (prefers-color-scheme: light) {
    body { background: #fff; color: black; }
    table, th, td { border: 1px solid black; }
    .lds-ripple div {
        position: absolute;
        border: 4px solid #fff;
    }
    .dfuBar {
        data-stroke: #000;
    }
    .ldBar {
        data-stroke: #000;
    }
    .img-logo {
        background: url(../img/fm_logo.png) center / cover;
    }
    :root {
        --background-color: #fff;
        --primary: #000;
    }
}


/* dark theme config */
@media (prefers-color-scheme: dark) {
    body { background: #000; color: white; }
    table, th, td { border: 1px solid white; }
    .primaryButton{
        background-color: #fafafa;
        color: #18181b;
    }

    .primaryButton:hover{
        background-color: #000;
        outline: 1px solid #fff;
        transition: ease-in;
        transition-duration: 150ms;
        color: #fff;
    }

    .secondaryText{
        color: #a1a1aa;
    }

    .primaryText{
        color: #fff;
    }

    .readonlyInput{
        background-color: #27272a;
        border: 1px solid #3f3f46;
        color: #fff;
    }

    .lds-ripple div {
        position: absolute;
        border: 6px solid #000;
    }
    .dfuBar {
        data-stroke: #fff;
    }
    .ldBar {
        data-stroke: #fff;
    }
    .img-logo {
        background: url(../img/fm_logo_dark.png) center / cover;
    }
    :root {
        --background-color: #000;
        --primary: #fff;
    }
}

@media only screen and (prefers-color-scheme: dark) {
    :root:not([data-theme=light]) {
        --background-color: #000;
        --switch-checked-background-color: var(--secondary);
    }
}

@media only screen and (prefers-color-scheme: light) {
    :root:not([data-theme=dark]) {
        --switch-checked-background-color: var(--secondary);
    }
}

/* spinner config */
.lds-ripple {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}
.lds-ripple div {
    position: absolute;
    border: 4px solid #fff;
    opacity: 1;
    border-radius: 50%;
    animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
.lds-ripple div:nth-child(2) {
    animation-delay: -0.5s;
}
@keyframes lds-ripple {
    0% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 0;
    }
    4.9% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 0;
    }
    5% {
        top: 36px;
        left: 36px;
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        top: 0px;
        left: 0px;
        width: 72px;
        height: 72px;
        opacity: 0;
    }
}

