/* ==========================================================================
   HTML5 Boilerplate styles - h5bp.com (generated via initializr.com)
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

img {
    vertical-align: middle;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}


/* ==========================================================================
   Author's custom styles
   ========================================================================== */

body {
    background-color: #f5f4f0;
    background-image: url("/img/background.png");
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    font-weight: 600;
    width: 100%;
    font-size: 1.3em;
    text-align: center;
    color: #555;
    letter-spacing: 0.02em;
}
header {
    width: 100%;
}

section {
    width: 100%;
}
p {
    width: 100%;
}
#graphics {
    margin-bottom: 1.5em;
    transition: opacity 0.8s;
}

#graphics.compass {
    position: relative;
    background-image: url('/img/compass.png');
    background-size: cover;
    height: 158px;
    width: 149px;
}

#compass-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 83px;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: compass-spin 2s ease-in-out infinite;
}

@keyframes compass-spin {
    0%   { transform: translate(-50%, -50%) rotate(0deg); }
    30%  { transform: translate(-50%, -50%) rotate(200deg); }
    50%  { transform: translate(-50%, -50%) rotate(170deg); }
    80%  { transform: translate(-50%, -50%) rotate(380deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

#graphics.weather {
    background-image: url('/img/weather.png');
    height: 389px;
    width: 412px;
}

#graphics.no_umbrella,
#graphics.umbrella {
    background-size: cover;
}

#graphics.no_umbrella {
    background-image: url('/img/weather.png');
    height: 150px;
    width: 159px;
}

#graphics.umbrella {
    background-image: url('/img/umbrella.png');
    height: 150px;
    width: 152px;
}

.center {
    margin-left: auto;
    margin-right: auto;
}

#message {
    font-size: 2em;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}

#weather_info {
    color: #444444;
    text-align: center;
    margin-top: 0;
}

footer {
    text-align: center;
}

footer .panel p {
    color: #888;
    font-size: 0.85em;
}

#sitelink {
    text-align: center;
    margin: 0;
}

#sitelink a {
    color: #888;
    text-decoration: none;
}

@media (min-height: 500px) {
    #sitelink {
        position: fixed;
        bottom: 0.75em;
        left: 0;
        right: 0;
    }
}


/* Error state */
#status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4em;
}

.error-title {
    color: #888;
    font-size: 1.1em;
}

.error-hint {
    color: #aaa;
    font-size: 0.85em;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

.hidden {
    display: none !important;
    visibility: hidden;
}

/* Tab buttons */
.panel-tabs {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.5em;
    margin-bottom: 0.5em;
}

.tab-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 0.85em;
    font-family: inherit;
    padding: 0;
    user-select: none;
}

.tab-btn:hover {
    color: #555;
}

.tab-btn.active {
    color: #444;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.panel {
    transition: opacity 0.3s;
}

#hourly_forecast {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: auto;
    gap: 0.75em;
    margin: 0.5em auto;
    padding: 0.25em 0.5em;
    font-size: 0.82em;
    color: #888;
}

.hourly-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2em;
    min-width: 4em;
    flex-shrink: 0;
}

.hourly-row.wet {
    color: #444;
}

.hour {
    color: #bbb;
    white-space: nowrap;
}

.hourly-row.wet .hour {
    color: #888;
}

.condition {
    text-align: center;
    line-height: 1.3;
}

.precip {
    color: #aaa;
}

/* Map */
#map {
    height: 200px;
    width: 100%;
    max-width: 320px;
    margin: 0.5em auto;
    border-radius: 6px;
    overflow: hidden;
    filter: saturate(0.3) brightness(1.05);
}
