@font-face {
    font-family: 'Air';
    src: url('ABCFavoritExpanded-Bold-Trial.otf') format('truetype');
}

html {
    height: -webkit-fill-available;
    height: 100%;
    background: black;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    font-family: 'Air', sans-serif;
    color: black;
    overflow: hidden;
    background: transparent !important;
    z-index: 0;
    background-color: black;
}

body::before,
body::after {
    display: none !important;
}

.content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
    background: transparent;
    z-index: 1;
    mix-blend-mode: normal;
}

.content-container::before,
.content-container::after {
    display: none !important;
}

.map-selector, .chat-selector {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    z-index: 2;
    mix-blend-mode: normal;
    border: 2px solid black;
    width: 50px;
    height: 10px;
}

.map-selector a, .chat-selector a {
    color: black;
    text-decoration: none;
    transition: opacity 0.3s ease;
    width: 100%;
    text-align: center;
}

.map-selector a:hover, .chat-selector a:hover {
    opacity: 0.7;
}

.chat-selector {
    top: 38.5px;
}

.logo-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    mix-blend-mode: normal;
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

.logo-container, .location-dropdown {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

.viewing-info .location-dropdown {
    opacity: 0;
    pointer-events: none;
}

.viewing-info .logo-container{
    opacity: 0;
}

.logo {
    width: auto;
    max-width: 90%;
    height: auto;
    max-height: 50vh;
    display: block;
    margin: 0 auto;
}

.location-dropdown {
    display: flex;
    flex-direction: column;
    width: 300px;
    border: 2px solid black;
    position: absolute;
    top: 62%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    margin-top: -10px;
    mix-blend-mode: normal;
}

.location-search {
    border: none;
    background: transparent;
    font-family: 'Air', sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    width: 100%;
    padding: 0;
    cursor: pointer;
    text-transform: uppercase;
}

/* Placeholder styling for different browsers */
.location-search::placeholder {
    opacity: 0.8;
    color: black;
}
.location-search::-webkit-input-placeholder {
    opacity: 0.8;
    color: black;
}
.location-search::-moz-placeholder {
    opacity: 0.8;
    color: black;
}
.location-search:-ms-input-placeholder {
    opacity: 0.8;
    color: black;
}
.location-search:-moz-placeholder {
    opacity: 0.8;
    color: black;
}

.location-search:focus {
    outline: none;
}

.location-select {
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.neighborhood-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    position: absolute;
    top: 100%;
    left: -.75%;
    width: 101.35%;
    height: 500%;
    background-color: transparent;
    border: 2px solid black;
    border-top: none;
    box-sizing: border-box;
    display: none;
}

.location-dropdown:hover .neighborhood-list,
.neighborhood-list.show {
    max-height: 300px;
    overflow-y: auto;
    display: block;
}

.neighborhood {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: block;
}

.neighborhood:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.neighborhood.hidden {
    display: none;
}

.down-arrow {
    font-size: 8px;
    margin-left: 4px;
}

#air-quality-info {
    position: fixed;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    background-color: transparent;
    color: black;
    padding: 20px;
    font-family: 'Air', sans-serif;
    z-index: 999;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#air-quality-info.visible {
    opacity: 1;
    visibility: visible;
}

#air-quality-info .info-logo {
    width: auto;
    max-width: 55%;
    height: auto;
    margin-bottom: -50px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#air-quality-info.visible .info-logo {
    opacity: 1;
}

#air-quality-info h2,
#air-quality-info p,
#air-quality-info .aqi-container,
#air-quality-info .parameters {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#air-quality-info.visible h2,
#air-quality-info.visible p,
#air-quality-info.visible .aqi-container,
#air-quality-info.visible .parameters {
    opacity: 1;
}

#air-quality-info .parameter,
#air-quality-info .data-source,
#air-quality-info .last-updated {
    transition-delay: 0s;
}

#air-quality-info h2 {
    margin-top: 0;
    font-size: 20px;
    letter-spacing: -.5px;
    margin-bottom: 10px;
}

#air-quality-info .location-name {
    font-size: 16px;
    margin-bottom: 15px;
    letter-spacing: -.5px;
}

#air-quality-info .aqi-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
}

#air-quality-info .aqi-value {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

#air-quality-info .aqi-category {
    font-size: 14px;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

#air-quality-info .parameters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

#air-quality-info .parameter {
    display: flex;
    justify-content: space-between;
    border-bottom: 3px solid black;
    padding-bottom: 5px;
}

#air-quality-info .param-name {
    font-weight: bold;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available;
    z-index: -1;
    pointer-events: none;
    transition: background 1s ease;
    margin: 0;
    padding: 0;
}

/* Fix for mobile Safari */
@supports (-webkit-touch-callout: none) {
    .background {
        height: 100vh;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
    
    body {
        min-height: -webkit-fill-available;
        height: 100vh;
    }
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: url('img/grain.jpg');
    background-size: cover;
    pointer-events: none;
    mix-blend-mode: overlay;
}

@media screen and (max-width: 768px) {
    #air-quality-info {
        margin-bottom: -5.5vh;
        width: 80%;
        height: auto;
    }
}

@supports (-webkit-touch-callout: none) {
    #air-quality-info {
        margin-bottom: -5.5vh;
    }
}