/* Define color scheme */
:root {
    --text: #f1f1f1;  
    --marker: #72b656;  
    --background: #704a3b;  
    --accent: #dd5590;
    --secondary: #9e4e62;
    --button: #a48a7e;
}

@font-face {
    font-family: CMRDD;
    src: url(fonts/CMRDD-Regular.ttf);
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: CMRDD;
    src: url(fonts/CMRDD-Bold.ttf);
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: CMRDD;
    src: url(fonts/CMRDD-ExtraBold.ttf);
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: CMRDD;
    src: url(fonts/CMRDD-Italic.ttf);
    font-weight: 400;
    font-style: italic;
}

* {
    font-family: CMRDD;
    font-weight: 400;
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    margin: 16px 16px;
    text-rendering: optimizeLegibility;
    display: block;
    background-color: var(--background); /* Updated background color */
    color: var(--text);  /* Default text color */
}

header {
    margin-bottom: 16px;
    background-color: var(--background); /* Header background */
    color: var(--text); /* Header text color */
    border-radius: 8px;
    transition: opacity 0.5s ease-out;
}

#drawing {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    height: auto;
    display: none; /* Hide initially */
    opacity: 0; /* Initial opacity */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    z-index: -1; /* Ensure it appears below other elements */
    transform-origin: bottom center; /* Rotation axis */
}

#controls {
    margin-bottom: 16px;
    border-style: solid;
    border-width: 1px;
    border-color: var(--text); /* Controls border color */
    color: var(--text); /* Controls text color */
    padding: 16px;
    border-radius: 8px;
    transition: opacity 0.5s ease-out;
    z-index: 1002; /* Ensure it remains above other content */
    width: fit-content; /* Set width to auto */
}

#language-toggle {
    width: auto; /* Set width to auto */
    margin-right: 16px;
}

#wind-switch{
    margin-right: 0px;
}

#map-address-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
    margin-top: -8px;
}

#map-container {
    width: 100%;
    border-style: solid;
    border-width: 1px;
    border-color: var(--text); /* Controls border color */
    color: var(--text); /* Address list text color */
    background-color: var(--secondary);
    padding: 16px;
    border-radius: 8px;
    transition: opacity 0.5s ease-out;
    height: 320px; /* Ensure appropriate height on mobile */
    margin-bottom: 16px;
}

#address-list {
    width: 100%;
    border-style: solid;
    border-width: 1px;
    border-color: var(--text); /* Controls border color */
    color: var(--text); /* Address list text color */
    background-color: var(--secondary);
    padding: 16px;
    padding-top: 0;
    border-radius: 8px;
    transition: opacity 0.5s ease-out;
    height: 320px; /* Ensure appropriate height on mobile */
    overflow-y: auto;
}

#map {
    width: 100%;
    height: 100%;
}

#about {
    transition: opacity 0.5s ease-out;
}

.location {
    display: flex;
    align-items: center;
    margin: 4px 0;
    padding: 4px;
    background: var(--button); /* Location background */
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    color: var(--text); /* Location text color */
}

.location:hover,
.location.highlighted {
    background: var(--accent); /* Hover and highlighted background */
}

.location .list-number {
    background-color: var(--marker); /* List number background */
    color: var(--text); /* List number text color */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.logo{
    max-height: 48px;
    margin-right: 16px;
    margin-bottom: 8px;
}

h1{
    font-size: 30px;
    font-weight: 700;
}

h2{
    font-size: 24px;
    font-weight: 400;
}

h3 {
    font-weight: 700;
    font-size: 18px;
    margin-top: 16px;
    color: var(--text); /* Header text color */
}

p{
    font-weight: 400;
    margin-bottom: 16px;
    font-size: 16px;
    max-width: 1024px;
}

a{
    color: var(--marker);
}

a:visited{
    color: var(--marker);
}

a:hover{
    color: var(--accent);
}

.custom-icon .marker-number {
    background-color: var(--marker); /* Marker background */
    color: var(--text); /* Marker text color */
    padding: 4px;
    border-radius: 50%;
    text-align: center;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-icon:hover .marker-number {
    background-color: var(--accent); /* Highlighted marker background */
}

.custom-icon {
    font-size: 16px;
}

#wind-button {
    position: fixed;
    bottom: 26px;
    right: 16px;
    background-color: var(--marker);
    color: var(--text);
    border: none;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    z-index: 1003; /* Ensure the button appears above the poetry box */
}

#wind-button:hover {
    background-color: var(--accent);
}

.hidden {
    opacity: 0;
    display: none;
    pointer-events: none;
    width: 0px;
    height: 0px;
}

#poetry-container {
    width: 100%;
    max-width: 480px;
    text-align: center; /* Center the text */
    color: var(--text);
    padding: 16px;
    border-radius: 8px;
    z-index: 1000; /* Ensure the poetry container appears above other elements but below the button */
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* Desktop view adjustments */
@media (min-width: 768px) {
    #map-address-container {
        flex-direction: row;
        justify-content: space-between;
        height: 560px; /* Ensure equal height */
    }

    #map-container, #address-list {
        width: calc(50% - 8px);
        margin-bottom: 0;
        height: 560px; /* Ensure equal height */
    }

    #map {
        height: 100%; /* Ensure the map fills its container */
    }

    #controls {
        width: fit-content; /* Ensure controls do not stretch to full width */
    }

    #poetry-container{
        position: relative;
        left: 33%;    
    }

    #language-toggle {
        width: auto; /* Ensure language toggle does not stretch to full width */
    }
}
