/* Universal box-sizing to include padding and borders */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Set all fonts to a sans-serif typeface */
body, html, #aero-container, #div1, #div3, .featured-content-div, .featured-title, .featured-name, .featured-description, .feature-container {
    font-family: Arial, Helvetica, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#aero-container {
    display: flex;
    position: absolute;
    flex-direction: column; /* Default: vertical layout */
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100); /* Use JS-calculated viewport height */
    top: 0;
    left: 0;
    overflow: hidden;
}

#map-container {
    flex: 1; /* Fills the remaining space */
    min-height: 0;
    width: 100%;
}

#div1, #div3 {
    background-color: #f8f9fa;
    overflow: hidden;
    padding: 10px;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    flex: 0 0 18vh;
    max-height: 18vh;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Improves touch scrolling on iOS */
    scroll-behavior: smooth; /* Smooth scrolling effect */
}

/* Horizontal layout (screen wider than tall) */
@media (min-aspect-ratio: 1/1) {
    #aero-container {
        flex-direction: row; /* Arrange divs side by side */
    }

    #div1, #div3 {
        flex: 0 0 20vw; /* Set width to 20% of viewport width */
        height: 100%; /* Ensure full height in landscape */
        max-height: 100%; /* Prevent any unwanted height restrictions */
        flex-direction: column; /* Arrange items in a column */
        align-items: flex-start;
        justify-content: flex-start;
        overflow-y: auto; /* Ensure scroll works properly */
    }

    #map-container {
        flex: 1; /* Grow to fill the remaining space */
        height: 100%;
        min-height: 0; /* Prevent flexbox from causing unwanted overflow */
    }

    .feature-container {
        margin-top: 10px;
        margin-right: 20px;
        margin-bottom: 4px;
    }
}

#div1 .featured-title, #div3 .featured-title,
#div1 .featured-name, #div3 .featured-name,
#div1 .featured-description, #div3 .featured-description {
    width: 40%; /* Ensure full width */
}

/* Horizontal layout (screen wider than tall) */
@media (min-aspect-ratio: 1/1) {
    #div1 .featured-title, #div3 .featured-title,
    #div1 .featured-name, #div3 .featured-name,
    #div1 .featured-description, #div3 .featured-description {
        width: 100%; /* Ensure full width */
    }
}

.featured-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.featured-name {
    font-size: 20px;
    font-weight: 600;
    color: #007bff; /* Blue for emphasis */
    display: flex;
    align-items: center;
}

.ancilliary-name {
    font-size: 16px;
    font-weight: 400;
    font-style: italic;
    color: #007bff; /* Blue for emphasis */
    display: flex;
    align-items: center;
}

.featured-eventName, .help-section-heading {
    font-size: 16px;
    font-weight: 600;
    color: #555; 
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.featured-description {
    font-size: 16px;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
}

.star-rating {
    margin-bottom: 10px;
}

.feature-container {
    display: flex;
    flex-wrap: wrap;
}

.feature-container img {
    width: 26px; /* Fixed size */
    height: 36px;
    vertical-align: middle;
    margin: 0px 0px; /* Adjusted spacing */
    object-fit: contain; /* Prevent distortion */
}

/* Default layout: column direction */
#div1 .placeholder-image, #div3 .placeholder-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    background-color: #ddd;
    border-radius: 8px;
    padding: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#div1 .placeholder-image img, #div3 .placeholder-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px; /* or 8px if you want to match container */
}

/* Reduce font size for smaller screens */
@media (max-width: 550px), (max-height: 550px) {
    .featured-title, .featured-name {
        font-size: 18px;
    }
    .ancilliary-name{
        font-size: 14px;
    }
    .featured-eventName, .help-section-heading {
        font-size: 15px;
    }
    .featured-description{
        font-size: 12px;
    }
    .star-rating{
        font-size: 12px;
    }
    .placeholder-image{
        font-size: 12px;
    }
    .feature-container img {
        width: 20px; /* Fixed size */
        height: 25px;
    }
}

@media (max-width: 400px), (max-height: 400px) {
    .featured-title, .featured-name {
        font-size: 14px;
    }
    .ancilliary-name{
        font-size: 12px;
    }
    .featured-eventName, .help-section-heading {
        font-size: 12px;
    }
    .featured-description {
        font-size: 10px;
    }
    .star-rating{
        font-size: 10px;
    }
    .placeholder-image{
        font-size: 10px;
    }
    .feature-container img {
        width: 16px; /* Fixed size */
        height: 20px;
    }
}

/* Optional hover effect for the div */
#div1:hover, #div3:hover {
    background-color: #e9ecef; /* Light hover effect */
    cursor: pointer;
}

#map-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* Background when the checkbox is checked */
input:checked + .slider {
    background-color: #2196F3;
}

/* Move the slider when checked */
input:checked + .slider:before {
    transform: translateX(26px);
}

.popup-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(20vw, 200px);
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    text-align: left;
}

.popup-dialog .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 2001;
    font-size: 16px;
}

.popup-description-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 4px;
  gap: 8px;
}

.popup-description {
  flex: 1;
}

.popup-tour-icon {
  width: 18px;
  height: 22px;
  cursor: pointer;
  margin-left: 6px;
  flex-shrink: 0;
}

.message-heading {
    display: inline-block;
    text-align: left;
    font-size: 16px;
    margin-right: 30px; /* Ensure space for the close button */
}

.message-content {
    margin-top: 20px;
    font-size: 16px;
    word-wrap: break-word;
}

.dialog-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border: 1px solid black;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.dialog-content {
    text-align: center;
}

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

/* WebKit-based browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 2px;  /* Half the default width */
    height: 2px; /* Half the default height for horizontal scrollbars */
}

::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3); /* Adjust thumb color */
    border-radius: 2px; /* Smooth edges */
}

::-webkit-scrollbar-track {
    background: transparent; /* Optional: Makes track transparent */
}

/* Firefox-specific scrollbar styling */
* {
    scrollbar-width: thin;  /* Reduces thickness */
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent; /* Thumb and track */
}

#debugWin {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 200px;
    min-height: 100px; /* Ensures height is respected */
    max-height: 200px; /* Allows scrolling */
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    display: none;
    overflow-y: auto;
    white-space: pre-wrap;
    display: block !important;
    visibility: hidden; /* initially hidden */
}


/* Contact Form - Centered & Scrollable */
.contact-form {
    display: none; /* Initially hidden */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh; /* Prevents overflow on small screens */
    overflow-y: auto; /* Enables scrolling inside the form */
    text-align: center;
    z-index: 1250;
}

/* Ensure scrolling is enabled on small screens */
@media (max-height: 600px) {
    .contact-form {
        max-height: 80vh;
        overflow-y: auto;
    }
}

.contact-form input,
.contact-form textarea {
    width: calc(100% - 20px);
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    box-sizing: border-box;
    max-height: 40vh; /* Prevents textarea from making the form too large */
    overflow-y: auto;
}

.contact-form label {
    display: block;
    margin: 10px 0;
    font-size: 1rem;
    color: #fff;
}

/* Button Styling */
.contact-form button {
    padding: 10px 20px;
    background: #ff7f50;
    color: #fff;
    border: none;
    cursor: pointer;
}


.contact-form button:hover {
    background: #ff5733;
}

/* Form Message */
#formMessage {
    font-size: 1rem;
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

/* Close (X) Button */
.contact-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1255; /* Ensure it’s always on top */
}

.contact-close-button:hover {
    color: #ff7f50; /* Changes color on hover */
}

.contact-form h2,
.contact-form p,
.contact-form label,
.contact-form span {
    color: #fff;
}

/* Hide the default Google reCAPTCHA badge */
.grecaptcha-badge {
    visibility: hidden;
}

.contextmenu {
    background: white;
    border: 1px solid #aaa;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
    border-radius: 4px;
    font-size: 14px;
    padding: 4px 0;
    min-width: 160px;
}
.contextmenu div {
    padding: 6px 12px;
    cursor: pointer;
}

.contextmenu div:hover {
    background-color: #eee;
}

.input-field {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Optional spacing between input and helptip */
}

.input-field input[type="text"] {
    flex: 1; /* Take up remaining space */
    width: auto; /* Prevent overriding flex behavior */
}

.helptip {
    display: inline-flex;           /* So it participates in layout and accepts mouse events */
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    margin-left: 6px;
    text-align: center;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-weight: bold;
    font-size: 0.9em;
    cursor: pointer;
    position: relative;
    user-select: none;
    flex-shrink: 0;
}

.helptip::before {
    content: "?";
    pointer-events: none;  /* Prevent hover bubble from interfering */
}

.switch-label .helptip {
    vertical-align: middle;
    margin-left: 0.5em;
}

.dynamic-tooltip {
    position: fixed;
    min-width: 120px;
    max-width: 320px;
    background: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    text-align: left;
    white-space: normal;         /* allow wrapping */
    word-wrap: break-word;       /* wrap at word boundaries */
    z-index: 9999;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.follow {
    width: 24px;
    height: 24px;
    margin-right: 4px;
    display: inline-block;
    background-size: cover;
    cursor: pointer;
}
.follow.not-favourite {
    background-image: url('images/icons/not_favourite.svg');
}
.follow.favourite {
    background-image: url('images/icons/favourite.svg');
}

.tool-button {
    position: absolute;
    background: white;
    padding: 5px 0px 0px 5px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1300;
    font-size: 18px;
    width: 30px;
    height: 30px;
}

.copy-button {
    top: 45px;
    right: 10px;
}

.copy-button:hover {
    color: #222;
    cursor: pointer;
}
