/* --------------------------------
   Mobile layout
--------------------------------- */

/* Hide scrollbars while preserving scrolling */
html,
body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
#birdList::-webkit-scrollbar {
    display: none;
}

/* Header */
.date-time,
.date-time p,
.date-time span {
    font-size: 15px;
    margin-bottom: 5px;
}

header h1 {
    width: 100%;
    margin: 0;

    font-size: 20px;
    letter-spacing: 2px;
    text-align: center;
}

header h2 { 
    margin-top: -15px;
    margin-bottom: 5px;
    font-family: "Cormorant Garamond", serif;
    font-weight: normal;
    letter-spacing: 2px;
    font-size: 15px;
}

.statistics-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: "Cormorant Garamond", serif;
    font-size: 20px;
    text-transform: lowercase;
}

/* Main layout */
main {
    width: 100%;
    box-sizing: border-box;
}

.bird-layout {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 100%;
    max-width: 100%;
    gap: 20px;

    box-sizing: border-box;
}

/* Card order */
.current-bird {
    order: 1;
}

.today {
    order: 2;
}

.weather {
    order: 3;
}

/* Current bird */
.bird-card {
    width: 90vw;
    height: 90vw;
    max-width: 600px;
    max-height: 600px;

    box-sizing: border-box;
}

/* Visitor and weather cards */
.weather-card,
.visit-card {
    width: 90vw;
    height: 300px;
    max-width: 600px;

    box-sizing: border-box;
}

/* Visitor card */
.visit-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;

    overflow: hidden;
}

.visit-card h1 {
    flex-shrink: 0;

    width: 100%;
    margin: 15px 0 10px;

    white-space: nowrap;
    text-align: center;
}

#birdList {
    width: 95%;
    max-height: 220px;

    margin: 0;
    padding: 0 10px 10px;

    overflow-y: auto;
    box-sizing: border-box;

    text-align: center;
    list-style-position: inside;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    header {
        position: relative;
        padding-bottom: 15px;
    }
}

/* Statistics and Back buttons */
.statistics-button {
    position: static;
    display: flex;
    width: fit-content;
    margin: 12px auto 0;
    padding: 7px 12px;
    align-items: center;

    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.statistics-button > i {
    margin-right: 4px;
    font-size: 13px;
}

/* Mobile PNG bird graph */
.stats-gallery {
    width: 100%;
    overflow: visible;
    margin-bottom: -10px;
}

#commonBirds {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    padding-bottom: 0;
    overflow: visible;
}

.birdStat {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
    outline: none;
}

.birdStat img {
    max-width: 42vw;
    object-fit: contain;
}

.birdStat:focus img {
    filter: drop-shadow(0 10px 8px rgba(61, 52, 43, 0.28));
    transform: translateY(-5px) scale(1.04);
}