
/* ========== GLOBAL STYLES ========== */
:root {
    --header-h: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(to bottom right, #0f172a, #1e293b);
    color: white;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* ========== HEADER (GRADIENT RESTORED) ========== */
h1 {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(90deg, #60a5fa, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
}

.language-dropdown {
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
}

.language-float {
    position: fixed;
    bottom: 10px;
    left: calc(50% - 30px);
    transform: translateX(-100%);
    padding: 5px 15px;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    color: #cbd5e1;
    border: none;
    white-space: nowrap;
    opacity: 0.8;
}

.language-float:hover {
    background: rgba(0, 0, 0, 0.9);
}

#language-container {
    position: fixed; /* Keeps it at the bottom even when scrolling */
    bottom: 10px; /* Matches footer position */
    right: 50%; /* Anchors it inside the left column */
    padding: 8px;
}

#languageSwitcher {
    font-size: 14px;
    padding: 5px;
    border-radius: 5px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
}

/* Ensure the results container is positioned relatively so the selector stays inside it */
#results {
    position: relative;
    padding-bottom: 40px; /* Ensures space for the floating dropdown */
}


/* ========== NAVIGATION ========== */
#siteHeader {
    position: sticky;
    top: 0;
    z-index: 3000;
    width: 100%;
    background: rgba(20, 24, 38, 0.9);
    backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.navbar {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    padding-right: 16px;
}

.nav-brand {
    font-weight: 700;
    text-decoration: none;
    font-size: 24px;
    background: linear-gradient(90deg, #60a5fa, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 16px;
}

.nav-logo-img {
    height: 28px;
    width: 28px;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #cbd5e1;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-links a.active {
    outline: 2px solid rgba(255, 255, 255, 0.2);
    color: #60a5fa;
}

.nav-links a:focus {
    outline: 2px dashed rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    font-size: 1.25rem;
    cursor: pointer;
    color: #cbd5e1;
}

/* Prevent old vertical styles from winning */
header ul, header li {
    width: auto !important;
}

header li {
    display: inline !important;
}

/* ========== DESKTOP LAYOUT ========== */
body {
    scroll-padding-top: var(--header-h);
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-h));
    padding: 20px;
}

#results {
    position: relative;
    width: 50%;
    padding: 20px;
    overflow-y: auto;
}

#map {
    width: 50%;
    height: calc(100vh - var(--header-h));
}

/* ========== SEARCH INPUT & BUTTON ========== */
input {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

input::placeholder {
    color: #cbd5e1;
}

#searchButton {
    width: 100%;
    background: linear-gradient(90deg, #3b82f6, #9333ea);
    color: white;
    border: none;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
}

#searchButton:hover {
    background: linear-gradient(90deg, #2563eb, #7e22ce);
}

#defaultOptions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
    justify-content: center;
}

#defaultOptions label {
    position: relative;
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #aaa;
    border-radius: 20px;
    background-color: #1e1e2f;
    color: #fff;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

#defaultOptions label:hover {
    background-color: #333;
}

#defaultOptions input[type="checkbox"] {
    display: none;
}

#defaultOptions input[type="checkbox"]:checked + label {
    background-color: #6c63ff;
    border-color: #6c63ff;
    color: white;
}



/* ========== RESULTS BOX ========== */
#resultsList {
    display: none;
    margin-top: 20px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    color: white;
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(255, 255, 255, 0.2);
    text-align: left;
}

#resultsList h2 {
    margin-bottom: 10px;  /* Adjust the value for desired spacing */
}

.load-time {
    font-size: 0.8em;
    font-style: italic;
    color: rgb(223, 217, 217);
    margin-top: 10px;
}



/* ========== LOADING SPINNER ========== */
#loadingSpinner {
    display: none;
    text-align: center;
    margin-top: 15px;
}

#loadingSpinner i {
    font-size: 30px;
    color: #74C0FC;
    animation: spin 1s linear infinite;
}

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

/* ========== FLOATING FOOTER (RESTORED) ========== */
.footer {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 14px;
    color: #cbd5e1;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 8px;
    white-space: nowrap;
}

.footer a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

/* ========== ABOUT PAGE STYLES ========== */
.about-main {
    min-height: calc(100vh - var(--header-h));
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-top: var(--header-h);
}

.about-container {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 40px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.about-container h1 {
    font-size: 32px;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #60a5fa, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.about-container h2 {
    font-size: 24px;
    margin: 30px 0 15px 0;
    color: #93c5fd;
}

.about-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #cbd5e1;
}

.about-steps {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.about-steps li {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.extension-link {
    text-align: center;
    margin: 30px 0;
}

.extension-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #3b82f6, #9333ea);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.extension-btn:hover {
    background: linear-gradient(90deg, #2563eb, #7e22ce);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.contact-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.contact-section a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: bold;
}

.contact-section a:hover {
    text-decoration: underline;
}

/* ========== RESPONSIVE DESIGN (MOBILE LAYOUT - FORCED) ========== */
@media (max-width: 768px) {
    .nav-toggle {
        display: inline-block;
    }

    .nav-links {
        position: absolute;
        left: 0;
        right: 0;
        top: var(--header-h);
        display: none;
        flex-direction: column;
        gap: 12px;
        background: rgba(20, 24, 38, 0.98);
        padding: 12px 16px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .nav-links.is-open {
        display: flex;
    }

    .main-container {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 15px !important;
        min-height: calc(100vh - var(--header-h)) !important;
    }

    #results {
        width: 100% !important;
        padding: 15px !important;
    }

    #map {
        width: 100% !important;
        height: 300px !important;
    }

    /* Make inputs and button bigger on mobile */
    input {
        font-size: 18px !important;
        padding: 14px !important;
    }

    #searchButton {
        font-size: 20px !important;
        padding: 16px !important;
    }

    /* Adjust spinner for mobile */
    #loadingSpinner i {
        font-size: 24px !important;
    }

    /* About page mobile styles */
    .about-main {
        padding: calc(var(--header-h) + 20px) 15px 20px;
    }

    .about-container {
        padding: 25px;
    }

    .about-container h1 {
        font-size: 28px;
        margin-bottom: 25px;
    }

    .about-container h2 {
        font-size: 22px;
        margin: 25px 0 12px 0;
    }
}

/* ========== PRIVACY FOOTER ========== */
.privacy-footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    z-index: 1000;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.privacy-footer:hover {
    background: rgba(0, 0, 0, 0.9);
}

.privacy-footer a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.privacy-footer:hover a {
    color: #60a5fa;
}

@media (max-width: 768px) {
    .privacy-footer {
        bottom: 5px;
        right: 5px;
        padding: 6px 12px;
    }

    .privacy-footer a {
        font-size: 11px;
    }
}

/* ========== EXTENSION PROMO POPUP ========== */
#extPromo {
    position: fixed;
    top: calc(var(--header-h) + 16px);
    left: 16px;
    max-width: 320px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 3500;
    font-family: 'Poppins', sans-serif;
    color: white;
}

.extPromo-text {
    margin: 0 0 14px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #cbd5e1;
    padding-right: 20px;
}

.extPromo-btn {
    display: inline-block;
    background: linear-gradient(90deg, #3b82f6, #9333ea);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.extPromo-btn:hover {
    background: linear-gradient(90deg, #2563eb, #7e22ce);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.extPromo-btn:active {
    transform: translateY(0);
}

.extPromo-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: #cbd5e1;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 300;
}

.extPromo-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.extPromo-close:focus {
    outline: 2px solid #60a5fa;
    outline-offset: 1px;
}

/* Responsive design for popup */
@media (max-width: 768px) {
    #extPromo {
        left: 8px;
        right: 8px;
        top: 8px;
        max-width: calc(100vw - 16px);
        width: auto;
    }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .extPromo-btn:hover {
        transform: none;
    }

    .extPromo-close {
        transition: none;
    }
}
