body {
    font-family: Arial, sans-serif;
    text-align: left;
    margin-top: 50px;
    background-color: #f4f4f4;
}

h1 {
    color: #1995AD;
    font-size: 2.5em;
}

/* General Page Styling */
body {
    font-family: Calibri, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: white;
}


/* Main Container */
.container {
    max-width: 1100px;
    margin: auto;
    background: #ffffff; /* White background */
    padding: 20px;
    border-radius: 0px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Headings */
h2 {
    color: #0096D8; /* Deep green */
    font-size: 22px;
    font-weight: bold;
}

/* Map Styling */
#map {
    width: 100%;
    height: 450px;
    border-radius: 10px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#controls {
    display: flex;         /* ✅ Makes input & button sit in a row */
    gap: 10px;             /* ✅ Adds spacing between input & button */
    align-items: center;   /* ✅ Aligns them vertically */
    flex-wrap: nowrap;     /* ✅ Prevents button from wrapping below */
}

#splitValue {
    width: 80px;           /* ✅ Set a fixed width for the input */
    min-width: 60px;       /* ✅ Avoids being too small */
}

#calculateButton {
    white-space: nowrap;
    padding: 8px 12px;
    border-radius: 8px;
    border: none; /* ✅ Removes any black border */
    background: #0096D8;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s;
    outline: none; /* ✅ Removes the thick outline on click */
}

#calculateButton:hover {
    background: #007bb3;
    transform: scale(1.03);
}

#calculateButton:focus {
    outline: 2px solid rgba(0, 150, 216, 0.5); /* ✅ Adds a subtle focus effect */
}


/* Stage Table Styling */
/* Improve Table Style in the Map */
#stagesTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px; /* Smaller font for compact look */
}

#stagesTable th, 
#stagesTable td {
    padding: 4px 6px; /* Reduce padding */
    text-align: left;
    border-bottom: 1px solid #ddd; /* Light bottom border */
}

#stagesTable th {
    background-color: #0096D8; /* Drauradwegwirte Blue */
    color: white;
    font-weight: bold;
    text-align: center;
}

#stagesTable td {
    background: #f9f9f9; /* Light grey background */
}

#stagesTable tr:nth-child(even) {
    background: #f1f1f1; /* Subtle row alternating color */
}

#stagesTable button {
    background-color: #0096D8; /* Matching button color */
    color: white;
    border: none;
    padding: 3px 6px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 11px;
}

#stagesTable button:hover {
    background-color: #0078A0;
}


/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff; /* White background */
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Table Headers */
th {
    background-color: #0096D8; /* Bright Blue */
    color: #ffffff; /* White text */
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

/* Alternating row colors */
tr:nth-child(even) {
    background-color: #f9f9f9; /* Light gray */
}

tr:nth-child(odd) {
    background-color: #ffffff; /* White */
}

/* Table cells */
td {
    padding: 12px;
    border-bottom: 1px solid #dddddd;
    border-radius: 5px;
}

/* Input fields in tables */
table input, table select {
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    width: 100%;
    background: #ffffff; /* White background */
}

/* Buttons */
.button {
    display: inline;
    margin-top: 10px;
    padding: 8px 12px;
    background: #0096D8; /* Bright Blue */
    color: #ffffff; /* White text */
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
}

.button:hover {
    background: #007bb3; /* Slightly darker blue */
    transform: scale(1.03);
}

/* Delete Button */
.delete-button {
    background: #e74c3c; /* Red */
}

.delete-button:hover {
    background: #c0392b; /* Darker red */
}

/* 🚴 Predefined Route Button */
.option button {
    background: linear-gradient(to right, #0096D8, #007bb3); /* ✅ Stylish gradient */
    color: white;
}

.option button:hover {
    background: linear-gradient(to right, #007bb3, #005f8c);
    transform: translateY(-2px); /* ✅ Subtle lift effect */
}

/* 🚴 Predefined Route Button */
.option:nth-child(1) button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.15);
}

.option:nth-child(1) button:hover {
    background: linear-gradient(to right, #1e8449, #27ae60);
    transform: scale(1.03);
}

/* 📂 Upload GPX Button */
.option:nth-child(2) button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.15);
}

.option:nth-child(2) button:hover {
    background: linear-gradient(to right, #1e8449, #27ae60);
    transform: scale(1.03);
}

/* 🌍 Generate Route Button */
.option:nth-child(3) button {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 16px;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    color: white;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.15);
}

.option:nth-child(3) button:hover {
    background: linear-gradient(to right, #1e8449, #27ae60);
    transform: scale(1.03);
}

/* Button Click Effect */
button:active {
    transform: scale(0.97);
}


/* Fix for file input spacing */
input[type="file"] {
    margin-top: 8px;
}

/* Form Fields */
input, select {
    border: 1px solid #cccccc;
    border-radius: 6px;
    padding: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Focus effect for form fields */
input:focus, select:focus {
    border-color: #0096D8; /* Bright Blue */
    box-shadow: 0 0 5px rgba(0, 150, 216, 0.5);
}

.button-container {
    position: absolute;
    top: 10px;  /* Distance from top */
    right: 10px; /* Distance from right */
    z-index: 1000; /* Ensure it stays on top */
    display: flex; /* Arrange buttons in a row */
    gap: 10px; /* Adds spacing between buttons */
}

.hotel-popup {
    border-radius: 10px !important;  /* Softer rounded edges */
    background-color: white;
    padding: 15px;  /* More breathing room */
    font-family: "Arial", sans-serif;
    font-size: 14px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    line-height: 1.5; /* Better spacing for text */
    max-width: 300px; /* Prevents overly wide popups */
    text-align: left; /* Align text properly */
}

/* Make headings inside popups stand out */
.hotel-popup h3 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Add spacing to paragraphs for better readability */
.hotel-popup p {
    margin: 5px 0;
}

/* Style links in the popup */
.hotel-popup a {
    color: #007bff; /* A nice blue color */
    text-decoration: none;
    font-weight: bold;
}

.hotel-popup a:hover {
    text-decoration: underline;
}

/* Improve buttons inside the popup */
.hotel-popup button {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.hotel-popup button:hover {
    background-color: #0056b3;
}


.mapboxgl-popup-content {
    display: none !important;
    border-radius: 12px !important;
    background-color: white !important;
    padding: 10px !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3) !important;
}

.mapboxgl-popup {
    display: none !important;
    z-index: 1500 !important;  /* Ensures popups are above all markers */
}

.mapboxgl-popup-close-button {
    display: none !important;
    background: red !important;   /* Change background color */
    color: white !important;      /* Change text color */
    font-size: 5px !important;   /* Make "×" bigger */
    border: none !important;      /* Remove border */
    width: 5px !important;       /* Adjust size */
    height: 5px !important;
    border-radius: 50% !important; /* Make circular */
    font-weight: bold !important;
}

.hotel-label {
    position: absolute;
    top: -30px; /* Moves the label a bit higher */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.2); /* Darker background for contrast */
    color: rgb(0, 0, 0) !important; /* ✅ Force black text */
    font-size: 15px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 8px;
    box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    pointer-events: none;
    text-align: center;
    filter: none !important;  /* ✅ Reset any filter effects */
}




.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    padding: 20px;
    width: 80%;
    max-width: 600px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    cursor: pointer;
}

iframe {
    width: 100%;
    height: 400px;
    border-radius: 5px;
}

/* Ensure the entire route selection stays in one line */
#routeContainer {
    display: flex;
    align-items: center;
    gap: 10px; /* Adds spacing between elements */
    flex-wrap: wrap; /* Allows wrapping if needed */
    overflow-x: auto; /* Enables scrolling if too many waypoints */
    padding: 10px;
    border-radius: 8px;
    background: #f8f9fa; /* Light background for clarity */
}

/* Waypoints container stays inline */
#waypointsContainer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Individual waypoint block */
.waypoint-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Waypoint input field */
.waypoint {
    width: 130px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Reduce the size of the add (+) and remove (❌) buttons */
.remove-btn,
.add-waypoint-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
    transition: background 0.2s ease-in-out;
}

/* Add button style */
.add-waypoint-btn {
    font-size: 18px;
    color: #007bb3;
    background: #e8f4fa;
    border: 1px solid #007bb3;
}

.add-waypoint-btn:hover {
    background: #007bb3;
    color: white;
}

/* Remove button (❌) */
.remove-btn {
    font-size: 16px;
    color: red;
    background: #fdecec;
    border: 1px solid red;
}

.remove-btn:hover {
    background: red;
    color: white;
}

/* Generate Route button */
.generate-route-btn {
    margin-left: 10px;
    padding: 8px 12px;
    background: #27ae60;
    color: white;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.generate-route-btn:hover {
    background: #1e8449;
}

/* Responsive fix for smaller screens */
@media (max-width: 768px) {
    #routeContainer {
        flex-direction: column;
        align-items: stretch;
    }
    #waypointsContainer {
        justify-content: center;
    }
}

#accommodationTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px; /* Smaller text */
}

#accommodationTable th, #accommodationTable td {
    padding: 5px 10px; /* Compact spacing */
    border: 1px solid #ddd; /* Light borders */
    text-align: center;
}

#accommodationTable input, #accommodationTable select {
    font-size: 12px; /* Smaller input fields */
    padding: 3px;
    width: 100%; /* Make sure it aligns properly */
}

.button {
    font-size: 12px;
    padding: 5px 8px;
}
