body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
    text-align: center;
    margin: 0;
    padding: 20px;
}

h1 {
    font-size: 2em;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
}

h2, h3 {
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    text-align: center; /* Pealkirjad keskele */
}

p {
    font-size: 1.2em;
}

canvas {
    background: white;
    border-radius: 10px;
    width: 60% !important; /* Graafiku laius protsendina */
    max-width: 1000px; /* Maksimaalne laius */
    height: 400px !important; /* Kindel kõrgus */
    display: block; /* Väldib vaikimisi inline käitumist */
    border: 1px solid red !important; /* Punane ääris, nagu CSS-is */
    margin: 20px auto; /* Keskele joondamine ja vahe */
}

button {
    background: #ff5733;
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 1.1em;
    margin: 10px;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background: #ff7733;
}

audio {
    margin-top: 20px;
}

/* unvisited link */
a:link {
  color: #F3E5AB;
  text-decoration: none;
}

/* visited link */
a:visited {
  color: #F3E5AB;
  text-decoration: none;
}

/* mouse over link */
a:hover {
  color: red;
  text-decoration: none;
}

/* selected link */
a:active {
  color: blue;
  text-decoration: none;
}

.tabs {
    list-style-type: none;
    padding: 0;
    margin: 10px auto;
    display: flex; /* Muudab tabid horisontaalseks */
    flex-wrap: wrap; /* Kindlustab, et tabid ei murduks uuele reale */
    justify-content: center; /* Joondab tabid keskele */
    background: rgba(0, 0, 0, 0.5); /* Taustavärv */
    border-radius: 10px;
    overflow: hidden;
}

.tabs li {
    display: inline-block; /* Tagab, et tabid jäävad üksteise kõrvale */
    margin: 0;
    padding: 0;
}

.tabs a {
    display: inline-block;
    padding: 12px 20px;
    margin: 5px; /* Loob visuaalselt eraldatuse */
    background: #ff5733;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
    white-space: nowrap; /* Väldib tabide murdumist uuele reale */
}

.tabs a:hover {
    background: #ff7733;
}

/* Aktiivse tabi stiil */
.tabs a.active {
    background: #c70039;
}

/* Tabeli ümbrise joondamine keskele */
.table-container {
    max-width: 1000px;
    margin: 0 auto; /* Keskele joondamine */
    background: none; /* Eemaldame tausta tabelist, et kasutada body tausta */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px; /* Lisa vahet üles */
}

.graph-container {
    max-width: 1000px;
    margin: 0 auto; /* Keskele joondamine */
    background: none; /* Eemaldame tausta tabelist, et kasutada body tausta */
    display: flex;
    flex-wrap: wrap;
    flex-direction: column; /* Graafikud üksteise all */
    align-items: center; /* Joondame graafikud keskele */
    gap: 20px; /* Vahe graafikute vahel */
    justify-content: center;
    padding: 20px;
}

.graph-container-roos {
    max-width: 1000px;
    margin: 0 auto; /* Keskele joondamine */
    display: flex;
    flex-direction: column; /* Tuulteroosid üksteise all */
    align-items: center; /* Joondame keskele */
    gap: 40px; /* Vahe tuulterooside vahel */
}

.graph-container img {
    max-width: 90%;
    height: auto;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 10px;
}

/* Tabeli stiil */
table {
    border-collapse: collapse;
    width: 90%; /* Suurendab tabeli laiust */
    max-width: 1000px;
    margin: 20px auto; /* Keskele joondamine */
    display: table;
    background: #1e3c72;
    border: 2px solid black;
}

/* Päise ja lahtrite stiil */
th, td {
    padding: 8px 15px; /* Väheneb lahtrite kõrgus */
    border: 2px solid black;
    min-width: 120px; /* Muudab lahtrite laiust */
    text-align: center;
    vertical-align: middle; /* Keskelt joondamine vertikaalselt */
    color: white; /* Tekst valge, et sobida sinise taustaga */
}

/* Päise taustavärv */
th {
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: white;
}

/* Tabeli esimene lahter (kuupäev ja kellaaeg) */
td:first-child {
    white-space: normal; /* Aitab kuvada teksti mitmel real */
    min-width: 130px; /* Muudab lahtrite laiust */
    line-height: 1.2; /* Väheneb lahtri kõrgus */
}

.footer {
    margin-top: 20px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    text-align: center;
    font-size: 0.9em;
}
.footer a {
    color: white;
    text-decoration: underline;
}
.footer a:hover {
    color: #ff5733;
}

.search-form {
    max-width: 1000px;
    margin: 20px auto;
    text-align: center;
}

.search-form form {
    display: inline-block;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
}

.search-form label, .search-form input, .search-form select {
    margin: 5px;
    padding: 5px;
    color: red; /* Valge tekst vormis */
}

.search-form input[type="submit"] {
    background: #ff5733;
    border: none;
    color: white;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 5px;
}

.search-form input[type="submit"]:hover {
    background: #ff7733;
}

.no-data {
    color: white;
    background: rgba(255, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 1000px;
}
        
.archive-grid{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:20px;
}

.zoom-overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.9);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
}

.zoom-overlay img{
    max-width:95%;
    max-height:95%;
}

.windrose-monthly {
    max-width: 1000px;
    margin: 0 auto 30px;
}

/* ── Kontrolliriba ───────────────────────────── */
.wr-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.wr-controls label {
    font-weight: bold;
    font-size: 1em;
    color: white;
}

.wr-controls select {
    background: #1e3c72;
    color: white;
    border: 2px solid black;
    border-radius: 5px;
    padding: 6px 10px;
    font-size: 1em;
    cursor: pointer;
}

.wr-controls select:focus {
    outline: none;
    border-color: #ff7733;
}

.wr-controls select option:disabled {
    color: #888;
}

.wr-controls button {
    background: #ff5733;
    border: none;
    color: white;
    padding: 8px 22px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
    margin: 0;
}

.wr-controls button:hover {
    background: #ff7733;
}

.wr-controls button:disabled {
    background: #555;
    cursor: default;
}

/* ── Olekuriba ───────────────────────────────── */
.wr-status {
    font-size: .95em;
    min-height: 1.4em;
    color: #ff9999;
    text-align: center;
    margin: 6px 0;
    background: none;
    padding: 0;
}

.wr-status.ok {
    color: #90ee90;
}

/* ── Laadimisindikaat ────────────────────────── */
.wr-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    font-size: 1em;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 12px;
    border-radius: 10px;
    margin: 10px 0;
}

.wr-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ff5733;
    border-radius: 50%;
    animation: wr-spin .7s linear infinite;
}

@keyframes wr-spin {
    to { transform: rotate(360deg); }
}

/* ── Pildi plokk ─────────────────────────────── */
.wr-label {
    font-size: .9em;
    color: #F3E5AB;
    text-align: center;
    font-style: italic;
    margin: 8px 0 6px;
    background: none;
    padding: 0;
}

#wr-image {
    display: block;
    max-width: 100%;
    height: auto;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    margin: 0 auto;
}
