/*GLOBAL STYLES*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior-y: none;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 24px;
}

a { color: #64b5f6; text-decoration: none; }
a:hover { text-decoration: underline; }

button, .btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    min-height: 44px;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #3259b1;
    color: white;
}
.btn-primary:hover { background-color: #2a4a96; }

.btn-secondary {
    background-color: #444;
    color: white;
}
.btn-secondary:hover { background-color: #555; }

.btn-danger {
    background-color: #c0392b;
    color: white;
}
.btn-danger:hover { background-color: #a33; }

input, select, textarea {
    padding: 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #2a2a3e;
    color: #e0e0e0;
    font-size: 1rem;
    min-height: 44px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3259b1;
}

/*HEADER BANNER*/
#scrollable-banner {
    background-color: rgb(50, 87, 177);
    height: 3.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#penola-weather {
    font-size: 1.5rem;
    color: #c0c0c0;
    font-style: italic;
    font-weight: 300;
}

.sun-o {
    font-style: normal;
    font-size: 1.2rem;
    vertical-align: baseline;
    margin: 0 -2px;
}

@media (min-width: 769px) {
    #scrollable-banner {
        height: 5rem;
    }
    #penola-weather {
        font-size: 2.4rem;
    }
    .sun-o {
        font-size: 1.8rem;
    }
}

/*BOTTOM NAV*/
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #111;
    border-top: 1px solid #333;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #777;
    text-decoration: none;
    font-size: 0.7rem;
    gap: 2px;
    padding: 6px 0;
    transition: color 0.2s;
    min-height: 44px;
}
.nav-tab:hover, .nav-tab.active {
    color: #64b5f6;
    text-decoration: none;
}

.nav-tab-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.nav-tab-label {
    font-weight: 500;
    letter-spacing: 0.02em;
}

/*LOCATION SEARCH*/
.location-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.location-searchbox {
    padding: 12px 14px;
    width: 100%;
    border: 1px solid #444;
    border-radius: 10px;
    background-color: #2a2a3e;
    color: #e0e0e0;
    font-size: 1rem;
}

.location-search-results {
    position: absolute;
    z-index: 50;
    width: 100%;
    top: 100%;
    left: 0;
    background-color: #2a3a4e;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.location-search-option {
    cursor: pointer;
    transition: background-color 0.15s;
}

.location-search-option:hover, .location-search-option:active {
    background-color: #1a2a3e;
}

.location-option-text {
    padding: 12px 14px;
    border-bottom: 1px solid #333;
    font-size: 0.95rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 769px) {
    .search-wrapper {
        width: 320px;
    }
    .location-searchbox {
        width: 320px;
    }
    .location-search-results {
        width: 320px;
    }
}

/*BROADCAST BANNER*/
.broadcast-banner {
    background-color: #e67e22;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.broadcast-banner .dismiss-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

/*UTILITY*/
.card {
    background-color: #222240;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: #888; }
.mt-10 { margin-top: 10px; }
.mb-10 { margin-bottom: 10px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-10 { gap: 10px; }
.gap-16 { gap: 16px; }

/*MOBILE LAYOUT*/
@media (max-width: 768px) {
    main {
        padding: 12px;
    }

    main h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .location-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .location-selector > div {
        width: 100%;
    }

    #current-location-btn {
        width: 100%;
    }
}
