/* General styles */
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-sizing: border-box;
    background: #fffbe6;
    padding: 0 20px;
    overflow-x: hidden; /* Prevent horizontal scroll */
}


#map, #map-container {
    width: 100%;
    max-width: 1000px;
    display: block;
    cursor: pointer;
    position: relative;
}



/* Floating navigation styles */
#controls {
    width: 100%;
    max-width: 1000px;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    margin-top: -20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Form element styles */
label {
    font-size: 12px;
    white-space: nowrap;
    color:white;
}

input[type="range"] {
    width: 100px;
    height: 5px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
}

select, button.map, #exportContainer {
    font-size: 12px;
    padding: 5px 15px;
    border-radius: 15px;
    border: none;
    height: 30px;
    line-height: 20px;
    box-sizing: border-box;
}

button.map, #exportContainer {
    background-color: #000000;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
}

select {
    background-color: rgb(255, 255, 255);
}

#exportContainer {
    justify-content: space-between;
}

#clipboardCheck {
    margin: 0 0 0 10px;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

/* Coffee icon styles */
#coffeeIcon {
    font-size: 20px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    margin-left: 15px;
}

#coffeeIcon:hover {
    transform: scale(1.2);
}

#peaksValue, #levelsValue {
    display:none;
}

#contour-generator-logo {
    max-width: 750px;
    margin: 100px 0 40px 0;
}

#contour-generator-logo img {
    width: 100%;
    height: auto;
}

/* Add styles for the new simple toolbar */
#simple-toolbar {
    width: 100%;
    max-width: 250px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    display: flex;
    gap: 10px;
    box-sizing: border-box;
    justify-content: center;
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
}

#simple-toolbar button,
#simpleExportContainer {
    font-size: 12px;
    padding: 5px 15px;
    border-radius: 15px;
    border: none;
    height: 30px;
    line-height: 20px;
    box-sizing: border-box;
    background-color: #000000;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#simpleExportContainer {
    justify-content: space-between;
    position: relative;
    z-index: 1002;
}

#simpleClipboardCheck {
    margin: 0 0 0 10px;
    cursor: pointer;
    position: relative;
    z-index: 1003;
}

h2.description {
    font-size: 18px;
    color: #000000;
    text-align: center;
    margin: 0 auto;
    max-width: 500px;
    font-weight: 400;
    margin-bottom: 60px;
}

/* General styles for sections */
section {
    width: 100%;
    max-width: 1000px; /* Match the width of other containers */
    padding: 20px; /* Add some padding */
    margin-top: 20px; /* Space above the section */
    text-align: center; /* Center text */
    display: flex;
    flex-direction: column;
    align-items: center;
 }

#library h2, #demo h2 {
    font-size: 24px; /* Adjust heading size */
    color: #000000; /* Darker text color */
    max-width: 500px;
}

#library p, #demo p {
    font-size: 16px; /* Adjust paragraph size */
    color: #000000; /* Lighter text color */
    max-width: 500px;   
    margin-bottom: 50px;
}

#divider {
    height: 150px;
}

.demo-image {
    filter: sepia(10%) grayscale(100%); /* Apply desaturated sepia effect */
    transition: filter 0.5s ease; /* Smooth transition for the filter */
}

/*.demo-image:hover {
    filter: sepia(0%) grayscale(0%); 
}*/
 
.demo-image.visible {
    filter: sepia(0%) grayscale(0%); /* Remove sepia and grayscale when visible */
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contour page override: keep shared footer full-bleed like homepage */
.footer-cards {
    align-self: stretch;
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
}

/* The include wrapper is a flex child; make it full-bleed too. */
[data-include="/partials/footer.html"] {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    align-self: stretch;
}