/* Style for the entire page */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    font-family: Roboto, sans-serif;
    display: flex;
    flex-direction: row;
    
}

p {
    margin: 2px;
}



th, td {
    text-align: center;
    padding: 8px; /* Optional, for some spacing */
  }


/* Logo and Info button positioning */
.top-left {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001;
    display: flex;
    align-items: center; /* Ensures vertical centering */
    justify-content: center; /* Centers the content horizontally */
    background-color: rgba(30, 42, 71, 0.8); /* Greenish background */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 6px rgba(180, 184, 176, 0.1); /* Subtle shadow for depth */
    height: auto; /* Allow content to define the height dynamically */
}

/* Style for the SolarScan logo */
#logo {
    padding:20px;
    font-size: 34px; /* Adjusted font size for better proportions */
    font-weight: 600; /* Poppins with medium weight */
    color: #ffffff; /* White text for contrast */
}

/* Style for the info button */
#infoButton {
    padding:5px 10px;
    cursor: pointer;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    top: 110px;
    left:0;
    margin: 20px;
    z-index: 999;
    color: white;
    border: none;
    font-size: 24px; /* Keeps the button prominent but not overwhelming */
    border-radius: 12px; /* Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#infoButton:hover {
    background-color: white; /* Darker red for hover effect */
    transform: scale(1.1); /* Slightly enlarge on hover */
}

/* Add a subtle animation for the appearance of the logo and button */
#logo {
    animation: fadeIn 1s ease-out;
}

/* Keyframes for the fade-in effect */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* The popup control panel */
#controlPanel {
    position: absolute;
    top: 110px;
    left:0;
    margin: 20px;
    /* transform: translateX(-50%); */
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width:100%;
    max-width: 400px;
    font-size: 16px;
    max-height: 80%;
    overflow-y: auto;
}


/* Close button style */
.close-button {
    position: absolute;
    top: 10px;     /* Position it at the top */
    right: 10px;   /* Position it to the right */
    font-size: 24px;
    font-weight: bold;
    color: #2a2a2a; /* Color of the close button */
    cursor: pointer; /* Make it clickable */
    background-color: transparent;
    border: none;
    padding: 5px;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #000000; /* Darken the color on hover */
}


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

/* Search bar styling */
#searchContainer {
    position: absolute; /* Position it over the map */
    top: 20px; /* Distance from the top */
    right: 5%; /* Move it to the center horizontally */
    z-index: 1000; /* Ensure it appears above the map */
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: white; /* Optional, for contrast against the map */
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Optional: adds shadow to the search box */
}

#addressSearch {
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-right: 10px;
    width: 200px; /* Adjust the width of the input */
}

#searchButton {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
}

#searchButton:hover {
    background-color: #0056b3;
}

#detectButton {
    position: absolute;
    bottom: 25%;  /* Distance from the bottom */
    left: 50%;     /* Center horizontally */
    transform: translateX(-50%); /* Adjust positioning to ensure it's truly centered */
    z-index: 1000;  /* Ensure it appears above other map elements */
    padding: 10px 20px;
    font-size: 20px;
    background-color: #D87F33; /* Button color */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: none;  /* Hidden by default */
}

#detectButton:hover {
    background-color: #F29C11;
}



#searchButton:hover {
    background-color: #0056b3;
}

.spinner {
    position: fixed;  /* Change from absolute to fixed to keep it in place while scrolling */
    z-index: 1010;    /* Ensure it appears above other map elements */
    top: 50%;         /* Center vertically */
    left: 50%;        /* Center horizontally */
    transform: translate(-50%, -50%); 
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 12px solid #3498db;
    border-radius: 50%;
    width: 100px;
    height: 100px;
    animation: spin 2s linear infinite;
  }
    
@keyframes spin {
    0% { 
        transform: translate(-50%, -50%) rotate(0deg); /* Initial position and rotation */
    }
    100% { 
        transform: translate(-50%, -50%) rotate(360deg); /* Final position and rotation */
    }
}

  
#feedbackContainer {
    margin-top:20px;
}

.feedbackButton {
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    display: inline-block;
    transition: background-color 0.3s ease;
}


#noButton {
    background-color: #af8b4c; /* Green background */
}

#noButton:hover {
    background-color: #a08045; /* Darker green when hovered */
}

#yesButton {
    background-color: #4c8caf; /* Green background */
}

#yesButton:hover {
    background-color: #457fa0; /* Darker green when hovered */
}


/* Responsive design for smaller screens */
@media (max-width: 768px) {
    html, body {
        flex-direction: column;
        align-items: stretch; /* Ensure it stretches across the full width */
    }

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

    #searchContainer {
        width: 80%; /* Make search bar a bit smaller on mobile */
        justify-content: space-between;
        top:auto;
        bottom: 10px; /* Distance from the top */
        left: 50%; /* Move it to the center horizontally */
        transform: translateX(-50%); /* Perfectly center the container */
        max-width: 300px;
    
    }

    #detectButton {
        width:40%;
    }

    #addressSearch {
        width: 70%; /* Input takes 70% of the container */
    }

    #searchButton {
        width: 25%; /* Button takes 25% of the container */
        padding:10px 5px;
    }
    
    .hideMedium{
        display: none
    }

    #controlPanel {
        margin: auto;
        width:90%;
    }

}

