/* Basic styling for AtmoPredict site */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    color: #333;
}

header {
    background: #2a6596;
    color: white;
    padding: 1rem 2rem;
    text-align: left;
}

header .header-wrapper {
    display: flex;
    align-items: center;
}

header .logo {
    height: 48px;
    width: 48px;
    margin-right: 1rem;
}

header .title-info {
    flex: 1;
}

header .search-bar {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
/* search section outside header */
.search-section {
    background: #2a6596;
    color: white;
    padding: 0.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.search-section form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-section input {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: none;
    width: 100px;
}

.search-section button {
    padding: 0.3rem 0.8rem;
    background: #ffffff;
    color: #2a6596;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-section .cities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-section .cities-list li a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
}

header .search-bar form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

header .search-bar input {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: none;
    width: 100px;
}

header .search-bar button {
    padding: 0.3rem 0.8rem;
    background: #ffffff;
    color: #2a6596;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

header .cities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

header .cities-list li a {
    color: #ffffff;
    text-decoration: underline;
    font-weight: bold;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    color: #2a6596;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #eef2f5;
}

tr:nth-child(even) {
    background: #f9fbfc;
}

.hourly-cards {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0.5rem;
    min-width: 70px;
    text-align: center;
}

.card-time {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.2rem;
}

.card-temp {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2a6596;
}

.city-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.city-card {
    flex: 1 1 280px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 0.5rem 1rem;
}

.city-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.city-card .mini-hourly {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.mini-entry {
    background: #f0f4f8;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
}

.mini-table {
    font-size: 0.8rem;
}

/* Adjust table cell font sizes for mini tables */
.mini-table th, .mini-table td {
    padding: 0.2rem 0.3rem;
}

canvas {
    width: 100% !important;
    height: auto !important;
}

footer {
    text-align: center;
    padding: 1rem;
    background: #f5f7fa;
    font-size: 0.9rem;
    color: #666;
    margin-top: 2rem;
}

/* Default chart height (desktop) */
canvas {
    width: 100% !important;
    height: 400px !important;
}

/* Taller charts on smaller screens */
@media (max-width: 768px) {
    canvas {
        height: auto !important;  /* increase height on mobile */
    }
}

@media (max-width: 480px) {
    canvas {
        height: auto !important;  /* even taller for small phones */
    }
}
