/* ------------------------------------------------------------------
   Almost Autumn – Minimalistic Hugo Theme
   Version: 0.19
   Changes: Aligned "Playing" text and audio player on the same line.
            Consolidated all previous fixes.
   ------------------------------------------------------------------ */

/* 1. Global settings ------------------------------------------------- */
html {
    font-size: 110%;
    box-sizing: border-box;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family:
        "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, sans-serif;
    line-height: 1.7;
    background-color: #e8e8ce;
    color: #222;
}

#wrapper {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
    min-height: 100vh;
}

/* 2. Header Layout --------------------------------------------------- */
#header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    border-bottom: 10px solid #9bbb38;
    background-color: #e8e8ce;
    gap: 20px;
}

.site-title {
    flex: 0 0 auto;
}

.site-title h1 {
    margin: 0;
    font-size: 2.2em;
    white-space: nowrap;
}

.site-title h1 a {
    color: #80904f !important;
    text-decoration: none !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px; /* Suurem vahe otsingu ja playeri vahel */
    flex: 1;
    justify-content: flex-end;
}

/* 3. Search Bar ------------------------------------------------------ */
.search-container {
    flex: 0 1 250px;
    position: relative;
    margin: 0;
}

#search-input {
    width: 100%;
    padding: 8px 14px;
    border: 2px solid #9bbb38;
    border-radius: 8px;
    background-color: #fdfdf5;
    outline: none;
    font-size: 15px;
}

#search-results {
    list-style: none;
    padding: 5%;
    margin: 5px 0 0 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: absolute;
    width: 200%;
    z-index: 1000;
    display: none;
}

/* 4. Audio Player (Nüüd ühel real) ----------------------------------- */
#sticky-audio-container {
    display: none;
    flex: 0 0 auto;
}

#sticky-audio-container.is-active {
    display: flex;
    align-items: center;
}

.global-player-inner {
    display: flex;
    flex-direction: row; /* Tekst ja player kõrvuti */
    align-items: center;
    gap: 12px; /* Vahe teksti ja nupu vahel */
}

#current-track-title {
    font-size: 0.8rem;
    color: #80904f;
    margin-bottom: 0; /* Eemaldasin margin-bottomi */
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

#global-audio-player {
    height: 35px;
    width: 200px;
}

/* 5. Main Content ---------------------------------------------------- */
#main {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}

#content {
    flex: 1 1 600px;
    background-color: #fff;
    padding: 40px;
    min-width: 0;
}

.post-meta {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
}

/* 6. Typography & Links --------------------------------------------- */
h1,
h2,
h3 {
    color: #333;
}
a {
    color: #e58712;
    text-decoration: none;
}
a:hover {
    color: #9bbb38;
}

.post-title {
    background-color: #9bbb38;
    color: #fff !important;
    padding: 15px 25px;
    font-size: 1.8em;
    display: block;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* 7. Sidebar --------------------------------------------------------- */
#sidebar {
    flex: 0 0 280px;
    background-color: #fafaf0;
    border-left: 1px solid #eee;
    padding: 40px 25px;
}

/* 8. Images ---------------------------------------------------------- */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
}

/* 9. Responsive Mobile View ----------------------------------------- */
@media (max-width: 800px) {
    #header {
        flex-direction: column;
        padding: 20px 15px;
        gap: 15px;
    }
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }
    .global-player-inner {
        flex-direction: column; /* Mobiilis tagasi ülestikku, et mahuks ära */
        gap: 5px;
    }
    #current-track-title {
        max-width: 100%;
    }
    /* ... muu mobiili sisu jääb samaks ... */
}

/* 10. Footer --------------------------------------------------------- */
#footer {
    background-color: #f5f5e7;
    border-top: 10px solid #9bbb38;
    padding: 40px;
    text-align: center;
}

/* 11. Audio Player UI Elements (The "Kuula lugu" button) ------------- */
.play-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #9bbb38;
    color: #ffffff !important;
    font-family:
        "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-font-smoothing: antialiased;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin: 15px 0;
    border: none !important;
    outline: none !important;
    text-decoration: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.play-trigger:hover {
    background-color: #e58712;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.play-trigger svg {
    fill: #ffffff;
    width: 14px;
    height: 14px;
}

/* 12. Map ------------------------------------------------------------ */
.tcx-map-container {
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
}
