/* Main styles for ArtEO sonification */
:root {
    --bgcolor: rgb(13, 13, 13);
    --maincolor: rgb(207, 207, 207);
    --bordercolor: var(--maincolor);
}

html, body {
    top: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    font-family: Lexend, Arial, sans-serif;
    font-size: small;
    background-color: var(--bgcolor);
    color: var(--maincolor);
    touch-action: manipulation;
    overscroll-behavior: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

#image-container {
    position: relative;
    top: 80px;
    width: 100%;
    height: auto;
    min-height: calc(100vh - 80px);
    touch-action: none;
    display: flex;
    justify-content: center;
}

#img {
    width: 100%;
    height: auto;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-tap-highlight-color: transparent; /* Remove the tap highlight */
    object-fit: contain;
    z-index: 1;
}

#palette-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin: 10px;
}

.palette-color {
    width: 30px;
    height: 30px;
}

.palette-table {
    margin-left: 10px
}

.pickers {
    border-radius: 30px;
    text-align: center;
    color: var(--maincolor);
    border: 2px solid var(--maincolor);
    margin: 20px;
}

#tools {
    position: fixed;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--bgcolor);
    color: var(--maincolor);
    width: 100%;
    z-index: 2;
}

#controls {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
}

#picker {
    display: none;
    position: absolute;
    left: 100px;
    top: 200px;
    z-index: 10;
    border-color: var(--bordercolor);
}

#form1 {
    display: inline;
}

/* Help popup styles */
.help-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(13, 13, 13, 0.85); /* Using the bgcolor with transparency */
}

.help-content {
    background-color: var(--bgcolor);
    margin: 10% auto;
    padding: 20px;
    color: var(--maincolor);
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
}

.help-popup a:link {
    color: var(--maincolor);
    font-weight: bold;
    text-decoration: underline;
}

.help-popup a:visited {
    color: var(--maincolor);
    font-weight: bold;
    text-decoration: underline;
}

.hidden {
    display: none;
}

.close-button {
    color: var(--maincolor);
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover, 
.close-button:focus {
    opacity: 0.7;
    text-decoration: none;
    cursor: pointer;
}

#arteo-logo {
    width: 80px;
    float: right;
    height: auto;
    margin: -30px;
    margin-right: 15px;
    display: block;
}

button, select, input {
    font-family: Lexend, Arial, sans-serif;
    background-color: var(--bgcolor);
    color: var(--maincolor);
    border: 2px solid var(--maincolor);
    padding: 5px;
    margin: 10px;
    border-radius: 30px;
    min-width: 30px;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}

button:hover {
    opacity: 0.8;
    cursor: pointer;
}

/* General link styling */
a:link, a:visited {
    color: var(--maincolor);
    font-weight: bold;
    text-decoration: underline;
}

a:hover {
    opacity: 0.8;
}

/* Media Queries */
@media screen and (max-width: 1050px) {
    #tools {
        flex-direction: column;
        padding: 10px 0;
    }
    
    #palette-container {
        margin-top: -10px;
    }
    
    #image-container {
        top: 120px; /* Adjust top margin to account for taller header */
    }
}

@media screen and (max-width: 700px) {
    #controls {
        padding: 10px 0;
    }
    #select-label {
        display: none;
    }

    #select-img {
        max-width: 200px;
    }

}

/* Media query for portrait orientation */
@media screen and (orientation: portrait) {
    #image-container {
        position: relative;
        top: 80px;
        width: 100%;
        height: calc(100vh - 80px);
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    
    #img {
        width: auto;
        height: 100%;
        object-fit: contain;
        display: block;
        margin: 0 auto;
    }
}