/* Yleiset tyylit -- Overflow wrapperi tassa ettei profiilin tiedot mene yli jonkun ~~250px nayton..*/ 
body { overflow-wrap: break-word; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background-color: #f0f2f5; margin: 0; color: #1c1e21; max-width: 100vw; width: auto;}


.unread-badge {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px; /* Pieni väli palleron ja tekstin välissä */
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    opacity: 0;
}

.user-list li a:hover .unread-badge {
    opacity: 0.7;
}

.unread-badge.red {
    background-color: #e577fff7; /* Purppura */
}

.unread-badge.green {
    background-color: #60ff88b5; /* Vihreä */
}

.unread-badge.blue {
    background-color: #71d5ff45; /* Vaaleansininen */
}

/* Aseta linkin containerille suhteellinen positio, jotta pallero on oikein */
.user-list a {
    position: relative;
    padding-left: 25px; /* Tekee tilaa pallerolle */
}


.language-flags-absolute {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 100; /* Varmista, että näkyy muiden elementtien päällä */
}

.language-flags-absolute .lang-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    border-radius: 0px 0px 4px 4px;
    border: 1px solid #ccc;
    text-decoration: none;
    font-size: 11px; /* Pieni teksti */
    color: #555;
    background-color: rgba(255, 255, 255, 0.7);
    transition: background-color 0.2s, opacity 0.2s;
    position: fixed;
    top: 0px;
    right: 7px;
}

.language-flags-absolute .lang-flag.active {
    background-color: #f0f0f0b8;
    opacity: 1;
    border-color: #00000069; /* Esim. sininen korostus */
    width: 40px;
}

.language-flags-absolute .lang-flag:hover {
    background-color: #dadadac9;
    opacity: 1;
}

.language-flags-absolute .lang-flag span {
    margin-left: 3px;
    font-weight: bold;
}



a { color: #00224e; text-decoration: none; }
.post-card a, .profile-card a { color: #000000c2; }
.post-card a:hover, .profile-card a:hover { color: #000000; transition: 0.1s;}
a:hover { text-decoration: underline; }

section#search-filter-panel h1 {
    display: none;
}

audio {
    background: #f1f3f4;
    border-radius: 9px;
}

.user-list li img {
    border: 3px solid transparent;
}

/* Styling for online user avatars */
.user-list li img.is-online {
    border: 3px solid #7abdff;
}

.post-card-header img{
border-bottom: 3px solid #00000017;
border-right: 1px solid #00000026;
}

/*

.post-card-header img.is-online{
border-bottom: 3px solid #7abdff85;
border-right: 1px solid #7abdffc9;
}

*/

.post-card-header img.is-online, img.clickable-avatar.Array.is-online {
    border-bottom: 3px solid #7abdffcc;
    border-right: 1px solid #7abdffe6;
}

@keyframes shake-rotate {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(2deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(7deg); }
    80% { transform: rotate(-14deg); }
    100% { transform: rotate(0deg);}
}

.post-card-header img.is-online:hover {
    animation: shake-rotate 0.6s ease-in-out infinite;
}

/* Optional: Add a subtle transition for a smoother visual effect when users go online/offline */
img {
    transition: border 0.3s ease-in-out;
}

article.post-card {
    padding: 0.5rem;
}

.user-list-container { margin-top: 0.5rem; }
.user-list { list-style: none; padding: 0; margin: 0; }
.user-list li a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 6px; transition: background-color 0.2s; }
.user-list li a:hover { background-color: #f0f2f5; }
.profile-center-column .user-list li a:hover { background-color: transparent; }
.user-list li img { width: 32px; height: 32px; border-radius: 16%; object-fit: cover; }
.user-list li span { font-weight: 600; font-size: 0.9em; }
.user-list-empty-text { font-size: 0.85em; color: #65676b; }


.reaction-set[data-category-name=secret] {
    display: none;
}

.reaction-set[data-category-name=emoji] .reaction-chip:last-of-type, .reaction-set[data-category-name=kuolaus], .reaction-set[data-category-name=magic] {
    display: none;
}

.reaction-set[data-category-name=magic] .reaction-chip:last-of-type, .reaction-set[data-category-name=magic] .reaction-chip:first-of-type {
    display: none;
}

.profile-center-column .user-list li a, section.profile-card a {
    text-decoration: none !important;
}

.profile-center-column .user-list li a:hover span {
    text-decoration: underline !important;
}



.auth-container form input[type="checkbox"] {
    width: 10px !important;
}

/* Yläpalkki */
.main-header { background-color: #fff; border-bottom: 1px solid #ddd; padding: 0 2px; position: relative; top: 0; width: calc(100% - 2rem); z-index: 1000; }
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 100%; margin: 0 auto; height: 60px; }
.logo { font-size: 1.5rem; font-weight: bold; color: #00224e; }
.main-header nav a { font-weight: 600; }

/* Autentikaatio (kirjautuminen/rekisteröinti) */
.auth-container { max-width: 400px; margin: 3rem auto; padding: 2rem 4.5rem; background: #fff; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.auth-container h2 { text-align: center; margin-bottom: 1.5rem; border-bottom: 2px solid #0000004a; padding-bottom: 28px; }
.auth-container form label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.auth-container input[type="radio"] { width: 10px !important; vertical-align: -webkit-baseline-middle; }
.auth-container form input, .auth-container form select { width: calc(100% - 1.5rem); padding: 0.75rem; margin-bottom: 1rem; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.auth-container form button { width: 100%; padding: 12px 0px; background-color: #4bc5f7cf; color: #fff; border: none; border-radius: 7px; font-size: 18px; font-weight: bold; cursor: pointer; }
.auth-container { font-size: 130%; }
.auth-container form input, .auth-container form select, .auth-container textarea#description { font-size: 110%; width: 100% !important;}
.name, .email, .manufacture, .location, .gender-group, .password { padding: 8.5px 0px; margin: 8.5px 0px; /* border-bottom: 1px solid #0000004a; */ }
.switch-link { text-align: center; margin-top: 1rem; }
.errors { background: #ffebe8; border: 1px solid #ffc8c2; color: #c00; padding: 1rem; border-radius: 4px; margin-bottom: 1rem; }
.errors ul { margin: 0; padding-left: 1.2rem; }
.message { background: #e7f3ff; border: 1px solid #b8d9ff; color: #00224e; padding: 1rem; border-radius: 4px; }

/* Profiilisivu */
.profile-body { display: flex; max-width: 100%; margin: 1rem auto; gap: 1rem; }
.profile-left-column { width: 20%; }
.profile-center-column { width: 60%; }
.profile-right-column { width: 20%; }

    .header-content-wrapper {
        margin-right: 20px;
    }

.post-card-header { display: flex; align-items: center; padding: 1rem; }
.post-card-header img { width: 140px; height: 140px; object-fit: cover; border-radius: 12%; margin-right: 1rem;}


    :root {
        --profile-padding: 1.5rem;
        --border-radius: 8px;
        --grey-background: #f0f2f5;
        --card-background: #ffffff;
        --primary-text: #1c1e21;
        --secondary-text: #65676b;
        --primary-accent: black;
        --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        --color-border: #ccc; 
    }
    .profile-page-container { max-width: 100%; margin: 0 auto; }
    
    /* KORJATTU HEADER-ULKOASU */
    .profile-header {
        position: relative;
        height: 35vh;
        min-height: 250px;
        background-color: var(--grey-background);
        overflow: visible; /* Sallitaan laatikon mennä yli */
    }
    .profile-header-canva {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background-size: cover;
        background-position: center;
        z-index: 1;
    }
    
    
/*    
    
    .profile-clickname-box {
        position: absolute;
        bottom: 44px; 
        left: 50%;
        transform: translate(-50%, 50%);
        z-index: 3;
        background: rgb(0 0 0 / 41%);
        backdrop-filter: blur(5px);
        color: white;
        padding: 25px 25px 20px 25px;
        border-radius: 10px 10px 0px 0px;
        border: 2px solid rgb(255 255 255 / 0%);
        text-align: center;
        white-space: nowrap;
    }
    
    
    
*/    
    
    
    
    
    
    
    
    
    
    
.profile-clickname-box {
  position: absolute;
  bottom: 0; /* KIINNITETÄÄN SUORAAN ALAREUNAAN */
  left: 50%;
  transform: translateX(-50%); /* KESKITETÄÄN VAIN VAAKASUUNNASSA */
  z-index: 3;
  background: rgb(0 0 0 / 41%);
  backdrop-filter: blur(5px);
  color: white;
  padding: 20px 25px; /* Säädetty hieman paddingia */
  border-radius: 10px 10px 0 0;
  border: 2px solid rgb(255 255 255 / 0%);
  text-align: center;
    /* Poistettu white-space: nowrap, jotta teksti voi rivittyä */
}    
    
    
    
    
    
    .profile-clickname-box h1 {
        margin: 0;
        font-size: 2.5rem;
        text-shadow: 0px 2px 4px rgba(0,0,0,0.5);
    }
    
    .edit-trigger, button.profile-hashtag-filter, .community-buttons button { background: rgba(255,255,255,0.9); color: var(--primary-text); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 0.9em; font-weight: 600; font-family: system-ui !important; box-shadow: var(--box-shadow); border: 1px solid #0000004d; }
    button.profile-hashtag-filter { font-size: 1.07em;}
    .edit-trigger:hover, button.profile-hashtag-filter:hover, .community-buttons button:hover, .post-creation-misc button:hover {
    opacity: 0.75;
    transition: 0.024s;
    filter: contrast(1.05);
}

.post-card-hashtags a:hover {
    text-decoration: none;
}

.edit-trigger, button.profile-hashtag-filter, .community-buttons button {
    padding: 4px 8px;
}

    aside.profile-right-column section.profile-card .edit-trigger { width: 100%; }
    button.default-css-option.action-btn { border: 1px solid #0a004708; width: calc(100%); border-radius: 6px; font-size: 10px; padding: 7px; margin-bottom: 5px; margin-top: 8px; }

    .edit-buttons { gap: 20px; } 
    
    .edit-buttons button#cancel-edit-btn, .edit-buttons button#save-edit-btn { width: 50%; padding-top: 8px; padding-bottom: 8px; color: var(--primary-text); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 0.9em; font-weight: 600; box-shadow: var(--box-shadow); border: 1px solid #0000004d; }
    button#cancel-edit-btn { background: #ffc7c7; }
    button#save-edit-btn { background: #c7ffd0; }
    
    button#change-avatar-btn { background: #c7f6ff; /* margin-top: 10px; */ /* margin-bottom: 10px; */ }
    
    section.profile-card hr { margin: 20px 0px; }
    
    .post-creation-misc { margin-top: 1rem; }
    
.post-creation-misc button, .edit-controls button {
    color: var(--primary-text);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: var(--box-shadow);
    border: 1px solid #0000004d;
    margin: 2px;
    transition: 0.15s;
    border-radius: 5px;
}

    button#publish:hover, .edit-controls button:hover {
    background: #eeffe5;
    box-shadow: -0.5px 2px 7px #0100182b;
    transition: 0.07s;
    opacity: 1;
}

    .edit-controls button:hover {
    box-shadow: -0.5px 2px 7px #0100182b;
    transition: 0.07s;
}
    
    button#upload-audio-btn {
    background: #ff4444;
    color: white;
}
    
    button#upload-image-btn {
    color: white;
    background: #d344ff;
}

button#publish {
    margin-top: 1rem;
    font-size: 18px;
    padding: 0.47rem;
    background: #e8ffdb;
    color: #134e01cf;
    color: #153f09d4;
    font-weight: 500;
    text-shadow: 1px 2px 4px #f5fff2cf;
}









button#start-record-btn {
    color: white;
    background: #f85a8ded;
    width: calc(25% - 4px);
    text-shadow: 0 0 1px #35013436, 0 0 4px #2900264d;
}


button#upload-audio-btn {
    background: #f6c9d6ed;
    color: white;
    width: calc(25% - 4px);
    text-shadow: 0 0 1px #3b014436, 0 0 4px #6104514d;
}


button#upload-image-btn {
    color: white;
    background: #5fe7afed;
    width: calc(25% - 4px);
    text-shadow: 0 0 1px #16390091, 0 0 4px #013d1547;
}
    
button#share-location-btn {
    color: white;
    background: #4bc5f7ed;
    width: calc(25% - 4px);
    text-shadow: 0 0 1px #00034736, 0 0 4px #0008444d;
}

.post-creation-misc button{
    width: calc(100% - 4px);
}






button#start-record-btn:hover {
    color: white;
    background: #f85a8d;
}

button#upload-audio-btn:hover {
    background: #f6c9d6;
    color: white;
}

button#upload-image-btn:hover {
    color: white;
    background: #f6c9d6;
}


button#upload-image-btn:hover {
    color: white;
    background: #5fe7af;
}
    
button#share-location-btn:hover {
    color: white;
    background: #4bc5f7;
}








div#recording-controls button {
    padding: 5px 20px;
    border-radius: 12px;
    border: 1px solid #0000006b;
}

button#pause-resume-btn {
    background: white;
}




button.cancel-edit-btn.action-btn {
    background: #ff000042;
    width: 48%;
    margin-top: 12px;
}

button.save-edit-btn.action-btn {
    background: #00ff1142;
    width: 48%;
    margin-top: 12px;
}

.edit-area.profile-card.post-creation-form {
    box-shadow: none;
}







    
    
    
    .profile-body { display: flex; flex-wrap: wrap; gap: var(--profile-padding); padding: var(--profile-padding); }
    .profile-left-column, .profile-right-column { flex: 1 1 22%; min-width: 250px; }
    .profile-center-column { flex: 1 1 46%; min-width: 300px; }
    .profile-card { background: var(--card-background); border-radius: var(--border-radius); padding: 1.5rem; box-shadow: var(--box-shadow); margin-bottom: 1.5rem; }
    .profile-card h4 { margin-top: 0; }
    .profile-card h4 p { text-decoration: underline #ffc35bb8; display: inline ;}
    .details-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem 1rem; align-items: start; }
    .details-grid strong { font-weight: 600; text-align: right; color: var(--secondary-text); }
    .details-grid span { word-break: break-word; }
    .deco-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 1rem; }
    .media-slot { position: relative; background: var(--grey-background); border-radius: var(--border-radius); aspect-ratio: 1 / 1; overflow: hidden; }
    .media-slot img { width: 100%; height: 100%; object-fit: cover; }
    .media-slot-add { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--secondary-text); cursor: pointer; font-size: 2rem; color: white; text-shadow: 0.1px 0.3px 1px #002043, 0.1px 0.3px 2px #0000003d, 0.1px 0.3px 1px #0000003b;}
    .media-slot-add:hover { color: var(--secondary-text); }

    
    
    
    
    
    .audio-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
    .audio-module { border-radius: var(--border-radius); padding: 0.75rem; }
    .audio-module audio { width: 100%; height: 40px; }
    .post-card { background: var(--card-background); border-radius: var(--border-radius); box-shadow: var(--box-shadow); margin-bottom: 1.5rem; }
    .post-card-header { display: flex; align-items: center; padding: 1rem; }
    .post-card-body iframe { width: 100%; border: none !important; min-height: 0px; }
    
    /* LISÄÄ NÄMÄ TYYLIT STYLE-LOHKOOSI */
    .detail-item {
        margin-bottom: 1rem;
    }
    .detail-item strong {
        display: block;
        font-weight: 600;
        color: var(--secondary-text);
        font-size: 0.9em;
        margin-bottom: 0.25rem;
    }
    .detail-item p, .detail-item span {
        margin: 0;
    }
    .details-edit-form .form-group {
        margin-bottom: 1rem;
    }
    .details-edit-form label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    .details-edit-form input, .details-edit-form select, .details-edit-form textarea {
        width: 100%;
        padding: 8px;
        border: 1px solid #0000004d;
        border-radius: 4px;
        box-sizing: border-box;
    }
    .details-view { display: block; }
    .details-edit-form { display: none; }
    
    .profile-card textarea {
        width: calc(100% - 12px);
        min-height: 110px;        
        font-size: 14px;
        padding: 6px;
        border-radius: 4px;
        font-family: system-ui;
    }
    
        #change-canva-btn {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        z-index: 4;
        opacity: 0; /* ALUKSI NÄKYMÄTÖN */
        transition: opacity 0.3s ease-in-out; /* PEHMEÄ SIIRTYMÄ */
    }
    
    /* KUN HIIRI ON HEADERIN PÄÄLLÄ, TEE NAPPI NÄKYVÄKSI - TÄMÄ ON UUSI SÄÄNTÖ */
    .profile-header:hover #change-canva-btn {
        opacity: 1;
    }
    
    /* UUDET TYYLIT VIESTILAATIKOILLE */
.profile-message-box {
        /* justify-self: anchor-center; */
        place-self: center !important;
        padding: 0.75rem 1.5rem; /* Pienempi padding */
        background-color: transparent; /* Läpinäkyvä tausta */
        border: none; /* Ei reunoja */
        border-radius: 0; /* Ei pyöristettyjä kulmia */
        color: black; /* Musta teksti */
        text-align: center; /* Keskitä teksti */
        max-width: 800px; /* Varmista, ettei levittäydy liian leveäksi */
        font-weight: 600; /* Tee tekstistä paksumpaa */
        margin-bottom: -0.5rem !important;
}

.profile-error-box {
        margin: 1rem auto;
        padding: 0.75rem 1.5rem;
        background-color: transparent; /* Läpinäkyvä tausta */
        border: none; /* Ei reunoja */
        border-radius: 0;
        color: red; /* Virheteksti punaisena, ilman taustaväriä */
        text-align: center;
        max-width: 800px;
        font-weight: 600;
}
    
    .profile-body {
        display: flex;
        max-width: 100%;
        margin: 0.41rem auto;
        gap: 1rem;
}
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    













/* HEADER */


/* Pääotsikko (Header) */
.main-header {
    background-color: #ffffff; /* Valkoinen tausta headerille */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Kevyt varjo */
    display: flex;
    justify-content: center; /* Keskittää sisällön vaakasuunnassa */
    align-items: center;
    width: 100%;
    box-sizing: border-box; /* Sisältää paddingin ja reunat leveyteen */
}

.header-content-wrapper {
    max-width: 100%; /* Rajoita headerin sisällön leveyttä */
    width: 100%;
    display: flex;
    justify-content: space-between; /* Logo vasemmalla, navigaatio oikealla */
    align-items: center;
}


/* Navigaatio */
.main-nav {
    display: flex;
    gap: 15px; /* Väli navigaatiopainikkeiden välille */
}

.nav-button {
    color: #ffffff; /* Valkoinen teksti */
    padding: 10px 15px; /* Pehmuste painikkeisiin */
    border-radius: 5px; /* Hieman pyöristetyt kulmat */
    text-decoration: none; /* Poista alleviivaus */
    font-weight: 600;
    transition: background-color 0.3s ease; /* Animaatio hoverille */
    white-space: nowrap; /* Estää tekstin rivittymisen */
}

i.fa.fa-users {
    color: #0045f5;
}

i.fa.fa-object-group {
    color: #ab05e2;
}

i.fa.fa-id-card-o {
    color: #ffa90c;
}

i.fa.fa-sign-out {
    color: #ff0a1a;
}

.header-content-wrapper {
    margin-right: 5px;
}








.main-header nav a {
    font-weight: 600;
    color: black;
    border-radius: 13px;
}

.nav-button {
    font-size: 20px;
    padding: 7px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.header-content-wrapper {
    margin-right: 7px;
}












i.fa.fa-users {
    color: #43bdf9;
}

i.fa.fa-object-group {
    color: #51e6ab;
}

i.fa.fa-id-card-o {
    color: #fad768;
}

i.fa.fa-sign-out {
    color: #f64b84;
}








i.fa.fa-users {
    color: #00abff;
    opacity: 0.8;
}

i.fa.fa-object-group {
    color: #00ff9a;
    opacity: 0.8;
}

i.fa.fa-id-card-o {
    color: #ffc200;
    opacity: 0.8;
}

i.fa.fa-sign-out {
    color: #ff0055;
    opacity: 0.8;
}

/*


i.fa.fa-users:hover:after {
    content: "Yhteisöt";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.8;
}

i.fa.fa-object-group:hover:after {
    content: "Luo yhteisö";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -27px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.8;
}

i.fa.fa-id-card-o:hover:after {
    content: "Profiili";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -11px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.8;
}

i.fa.fa-sign-out:hover:after {
    content: "Logout";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.8;
}


*/






































































.tagit .profile-card {
    background: transparent;
    box-shadow: none;
}


/* Profiilisivun hashtag-suodattimien tyylit */
.profile-hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

textarea#post-content-textarea, input.hashtags {
    border: 1px solid #00000054;
}

textarea#post-content-textarea {
    resize: vertical;
}

.edit-area.profile-card.post-creation-form textarea#post-content-textarea {
    height: 500px;
}

section.profile-card.post-creation-form {
    background: transparent;
    box-shadow: none;
    padding: 0.89rem 0.3rem;
    backdrop-filter: none;
    border: none;
}

section.profile-card.post-creation-form h4 {
    padding: 0rem 0.1rem;
}
/*
button.profile-hashtag-filter:hover {
    background-color: #47a7ff3d;
    filter: saturate(0.2); 
    opacity: 0.945;
    transition: 0.1s;
}
*/
.profile-hashtag-filter {
    background-color: #e3f7ff4d;
    border: 2px solid #1fb8ff73;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 1.4em;
    font-weight: 500;
    font-family: monospace;
    color: #1251a3;
    cursor: pointer;
    transition: 0.4s;
/*    filter: saturate(0.1); */
}

/* Aktiivisen suodatin-napin korostus */
.profile-hashtag-filter.active-filter {
    background-color: #00224e;
    color: #ffffff;
}

button.profile-hashtag-filter.active-filter {
    color: #010b1f;
}

.profile-hashtag-filter.active-filter {
    background-color: #fbfdff;
    border: 2px solid #070a32de;
}



























.post-card-body iframe {
    width: 100%;
    border: none;
    height: 70vh; /* Asettaa iframen korkeudeksi koko katseluikkunan korkeuden */
    display: block; /* Varmistaa, että iframe käyttäytyy kuin lohkoelementti */
    margin: 0; /* Poista mahdolliset ylimääräiset marginaalit */
    padding: 0; /* Poista mahdolliset ylimääräiset paddingit */
    /* Jos haluat rajoittaa sen vanhemman elementin korkeuteen, voit käyttää height: 100%; ja varmistaa, että .post-card-bodyllä on fixed height. */
    /* Mutta "koko näytön korkuinen" viittaa yleensä vh-yksikköön. */
}























/* ========================================= */
/* POSTAUSSYÖTTEEN JA SISÄLLÖN ULKOASUKORJAUKSET */
/* ========================================= */

/* Yleinen containeri syötteelle, esim. home.php ja hashtag.php */
.feed-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Yksittäinen postauskortti syötteessä */
.post-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    /* TÄRKEÄ: estää sisällön "vuotamisen" yli */
    overflow: hidden; 
}

/* Postauksen sisältöalue */
.post-card-body {
    font-size: 14px;
    line-height: 1.6;
    padding: 0.5rem 1.5rem 0.5rem 1.5rem;
    word-wrap: break-word;
}

/* Kuvat, videot ja audiot postauksen sisällä */
.post-embedded-image,
.post-embedded-audio,
.post-embedded-youtube {
    max-width: 100%;
    max-height: 100vh;
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
}

.post-embedded-audio {
    width: 100%;
}

.post-embedded-youtube {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 kuvasuhde */
    height: 0;
    overflow: hidden;
}

.post-embedded-youtube iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.post-card-hashtags { font-size: 0.9em; color: #555; padding-top: 16px;}

















.post-card-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    position: relative; /* Tarvitaan toimintonappien asemointiin */
}
.post-user-info {
    flex-grow: 1;
}
.post-actions {
    position: absolute;
    top: 10px;
    right: 10px;
}

.post-action-btn {
    width: 40px;
    height: 40px;
    cursor: pointer;
}

.post-actions button {
    border: none;
    background: none;
    font-size: 15px;
}

.post-action-btn.edit-post-btn {
    color: #0034ba69;
}

.post-action-btn.edit-post-btn:hover {
    color: #0034ba;
}

.post-action-btn.delete-post-btn {
    color: #e7002066;
}

.post-action-btn.delete-post-btn:hover {
    color: #e70020;
}


.post-action-btn.toggle-pin-btn {
    color: #0000009c;
}

.post-action-btn.toggle-pin-btn:hover {
    color: black;
}














/* ========== UUDEN REAKTIOJÄRJESTELMÄN TYYLIT ========== */

/* Poista vanhan pickerin tyylit kokonaan tai kommentoi ne pois */
/* .reaction-picker { ... } */
/* .react-button { ... } */


.reactions-container.new-reaction-style {
    display: flex;
    flex-direction: column; /* Aseta pääsuunta pystysuoraksi */
    gap: 7%; /* Väli rivien välille */
    align-items: flex-start; /* Tasaa rivit vasemmalle */
}

.reaction-set {
    display: flex;
    flex-wrap: wrap; /* Salli emojien rivittyä */
    gap: 0; /* Väli emojien välille */
/*    width: 50%;
    max-width: 250px; */
    width: 100%;
    max-width: unset;
    justify-content: space-around;
}

.reaction-chip.direct-reaction {
    display: flex;
    align-items: center;
    gap: 1px;
    background-color: transparent;
    border: none;
    padding: 1px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s, border-color 0.2s;
    font-size: 1rem;
    line-height: 1;
}

.reaction-chip.direct-reaction .emoji:hover {
    transform: scale(1.2);
}

.reaction-chip.direct-reaction .emoji {
    font-size: 1.8rem;
}

.reaction-chip.direct-reaction .reaction-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

/* Korosta reaktio, jonka käyttäjä on itse antanut */
.reaction-chip.direct-reaction.reacted {
    text-shadow: rgba(7, 6, 32, 0.1) 0px 0px 8px, rgba(0, 4, 75, 0.16) 0px 0px 18px;
}


.post-footer {
    margin-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.reaction-set {
    padding: 10px 0px;
}


section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"], input.list-search-input {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-text);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: var(--box-shadow);
    border: 1px solid #0000004d;
    width: 100%;
    margin: 0px 0 10px 0px;
}

input.list-search-input {
    font-weight: 500;
}

section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"] {
    font-size: 17px;
    font-weight: 400;
}

.filter-checkboxes label {
    font-size: 15px;
}

.filter-checkboxes label p {
    font-family: none;
    display: inline;
    vertical-align: middle;
}

.filter-checkboxes {
    margin: 10px 0px;
}

.filter-grid input[type="checkbox"] {
    accent-color: #00a0ce;
    opacity: 0.7;
    transform: scale(1.5);
    transition: 0.2s;
    height: 11px !important;
    margin-top: -4px;
}

.filter-grid input[type="checkbox"]:hover {
    opacity: 0.62 !important;
    transition: 0.17s;
}

.profile-center-column h1 {
    font-size: 35px;
    padding: 0px 3px;
    margin-top: -12px;
}

section#search-filter-panel h1 {
    font-size: 240%;
    text-decoration: underline;
    text-decoration-color: #4bc8f952;
}

.filter-checkboxes {
    display: grid;
    grid-auto-flow: column;
}

main.main-content {
    min-height: 100vh;
    place-self: center;
}

.favorite-btn { font-size: 21px !important; color: #ffd700; }

.copy-post-link-btn { font-size: 1.1rem !important; margin-top: 2px; color: #000135;}


.report-post-btn { font-size: 1rem !important; color: #1c3f8f; }

.block-user-btn { font-size: 1rem !important; color: #d60000; }

.post-actions button {
    width: 33px;
    transition: 0.04s;
}

.post-actions button:hover {
    transform: scale(1.5);
    transition: 0.1s;
}





.media-slot-container, .audio-module-container {
    position: relative;
}

.delete-media-btn {
    position: absolute;
    top: -10px;
    right: 2px;
    background-color: transparent;
    color: #e70020;
    text-shadow: 0px 0px 2px #ffffffbf;
    border: none;
    font-size: 30px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0; /* Oletuksena piilossa PC:llä */
    transition: 0.3s ease-in-out;
}

/* Poistonappi näkyviin, kun hiiri on säiliön päällä */
.media-slot-container:hover .delete-media-btn,
.audio-module-container:hover .delete-media-btn {
    opacity: 1;
    color: #ff0023c7;
    transition: 0.2s ease-in-out;
}

.delete-media-btn:hover{
    color: #e70020 !important;
    transition: 0.25s ease-in-out;
}

/* Kursorin muutos audio-moduuleille, joissa on sisältöä (osoittaa klikattavuuden) */
.audio-module[data-type="playlist_audio"]:has(audio) {
    cursor: pointer;
}














*:focus,
*:active {
    -webkit-tap-highlight-color: transparent !important; /* Estää mobiililaitteiden napautuskorostuksen */
}

span.reaction-count {
    position: absolute;
    left: 37px;
    top: 6.5px;
}

















/* ================================================================= */
/* KORJATUT JA MINIMALISTISET TYYLIT: TOP 10 YHTEISÖN VALINTA */
/* ================================================================= */

/* Piilottaa oletuslomakkeen, koska sitä ei enää tarvita */
#top-communities-form {
    display: none;
}

/* Poistetaan listapallerot sekä muokkaus- että näyttötilasta */
.top-communities-editor .user-list,
.top-communities-display .user-list {
    list-style-type: none; /* TÄMÄ POISTAA RIVIPALLEROT */
    padding: 0;
    margin: 0;
}

/* Yksittäinen rivi listassa (label toimii klikattavana elementtinä) */
.top-community-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.top-community-item:hover {
    background-color: #f0f2f5;
}

.top-community-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.top-community-item .community-name {
    font-weight: 600;
    font-size: 0.95em;
    flex-grow: 1;
    color: #1c1e21;
}

.top-community-item input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffffcc;
}

.top-community-item input:checked + .custom-checkbox {
    background-color: white;
    border-color: #ffc35b;
}

.custom-checkbox::after {
    content: '✔';
    color: #ffc35b;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.top-community-item input:checked + .custom-checkbox::after {
    opacity: 1;
}

.top-community-item.limit-reached {
    opacity: 0.6;
    cursor: not-allowed;
}
.top-community-item.limit-reached:hover {
    background-color: transparent;
}

.top-community-item.saving {
    opacity: 0.5;
    pointer-events: none;
}


.hashtags {
    font-size: 15px;
    padding: 5px;
    border-radius: 4px;
    border-width: 1px;
}


.post-normal-content {
    max-height: 2500px;
    overflow: auto;
}

.post-normal-content img, #post-preview img {
    max-height: 450px;
    display: inline;
}
































/* Yhdenmukaistetaan CSS-editorin ja profiilieditorin ulkoasua */

/* Varmistetaan, että molempien lomakkeiden labelit ja form-groupit ovat samanlaisia */
.custom-css-section .form-group {
    margin-bottom: 1rem;
}

.custom-css-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Varmistetaan, että molempien lomakkeiden tekstikentät ovat samanlaisia */
.custom-css-section textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #0000004d;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: monospace; /* Pidetään monospace-fontti CSS-koodille */
}

/* Annetaan CSS-editorin napeille samat tyylit kuin profiilieditorin napeille */
#reset-custom-css-btn {
    background: #ffc7c7; /* Sama punertava kuin Peruuta-napissa */
}

#save-custom-css-btn {
    background: #c7ffd0; /* Sama vihertävä kuin Tallenna-napissa */
}

/* Yhteinen tyyli kaikille editorin napeille .edit-buttons-luokan sisällä */
.edit-buttons #reset-custom-css-btn,
.edit-buttons #save-custom-css-btn {
    width: calc(50% - 4px);
    color: var(--primary-text);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    box-shadow: var(--box-shadow);
    border: 1px solid #0000004d;
    display: inline-block;
    margin-bottom: 6.5px;
    margin-top: 6.5px;
}











































button.profile-hashtag-filter {
    max-width: 100% !important
}



.post-actions {
    opacity: 0; /* Piilotettu oletuksena */
}

.post-card:hover .post-actions {
    opacity: 1;
}


    
    .profile-clickname-box {
        min-width: calc(100% - 54px);
        border-radius: 0;
    }  
    
    
    
    
    
    
    
    
    
    
    
   .auth-container .profile-card {
    box-shadow: none;
} 
    
    
    
    
.community-buttons {
    display: flex;
    place-items: baseline;
    gap: 5px;
}    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

 
    
    
    /* HUOM. __ISOILLE NAYTOILLE__!! */
    @media (min-width: 1200px) {
        
        
section.profile-card .edit-trigger { font-size: 11px; }        
        
    .post-creation-misc {
    display: flex; 
} 
  
        
    .deco-grid { grid-template-columns: repeat(1, 1fr) !important; }    
        
    .profile-clickname-box {
        min-width: 49.5%;
        border-radius: 10px 10px 0px 0px;
    }    
        
    .profile-left-column {
    flex: 0 1 22%;
    min-width: unset !important;
}

.hidden-post {
    display: none;
}

.header-content-wrapper {
    margin-right: 20px;
}

.profile-card h4 {
    font-size: 15px;
}

.profile-body {
    margin: 0.25rem auto;
}

.profile-left-column h1 {
    font-size: 2rem;
}

i.fa.fa-users:hover:after {
    content: "Yhteisöt";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-object-group:hover:after {
    content: "Luo yhteisö";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -27px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-id-card-o:hover:after {
    content: "Profiili";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -11px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-sign-out:hover:after {
    content: "Logout";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.5;
}

main.main-content { max-width: 99vw; }

.reaction-set {
    justify-content: space-between;
}

/*
.reaction-set[data-category-name="emoji"], .reaction-set[data-category-name="kuolaus"] {
    width: 50%;
    max-width: 250px; 
} */

.reaction-set[data-category-name="emoji"], .reaction-set[data-category-name="kuolaus"] {
        max-width: 320px;
        align-self: center;
}































































































































































 



       


aside.profile-right-column {
    min-width: 17%;
}


.mobile {
        display: none;
}

}
/* Responsiivisuus pienemmille näytöille */
@media (min-width: 700px) and (max-width: 1200px) {
    
section.profile-card .edit-trigger { font-size: 11px; }
    
aside.profile-right-column {
    min-width: 17%;
}
    
.profile-right-column {
    min-width: 100%; /* Voit säätää leveyttä tarpeen mukaan */
}    
    
.mobile {
        display: none;
}

.profile-body {
    max-width: 96vw !important;
}
    
i.fa.fa-users:hover:after {
    content: "Yhteisöt";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 15px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-object-group:hover:after {
    content: "Luo yhteisö";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -27px;
    font-size: 15px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-id-card-o:hover:after {
    content: "Profiili";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -11px;
    font-size: 15px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-sign-out:hover:after {
    content: "Logout";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 15px;
    font-family: system-ui;
    opacity: 0.5;
}
    
    .post-creation-misc {
    display: flex; 
} 
    
/*    .profile-clickname-box {
        bottom: 47px;
    } */

.profile-left-column, .profile-right-column {
    flex: 1 1 1%;
    min-width: unset;
}

.profile-right-column {
    flex: 1 1 1%;
    min-width: unset;
}

aside.profile-left-column section.profile-card, aside.profile-right-column section.profile-card {
    padding: 0.75rem;
}

.audio-module {
    padding: 0;
}

.profile-body {
    padding: 0.7rem;
    gap: 0.57rem;
    margin: 0;
}

.profile-card {
    padding: 1.3rem;
    margin-bottom: 0.57rem;
}

div#details-view-section, form#details-edit-form, .details-edit-form input, .details-edit-form select, .details-edit-form textarea {
    font-size: 10px;
    width: 100%;
}

#change-canva-btn {
        opacity: 1; /* ALUKSI NÄKYMÄTÖN */
    }

.edit-buttons {
    gap: 5px;
}

section.profile-card hr { margin: 10px 0px; }

.details-edit-form .form-group { margin-bottom: 0rem; }


.filter-checkboxes label p {
    font-size: 11.4px;
    font-family: none;
    display: block;
    max-width: min-content;
}

.auth-container { margin: 3rem auto; padding: 1rem 2.25rem; }

section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"] {
    font-size: 14px;
}


.edit-buttons #reset-custom-css-btn, .edit-buttons #save-custom-css-btn { width: 100%; }    

aside.profile-left-column section.profile-card, aside.profile-right-column section.profile-card {
    padding: 0.55em;
}

.edit-buttons button#cancel-edit-btn, .edit-buttons button#save-edit-btn {
    padding: 8px 4px;
}

section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"], input.list-search-input { 
    padding: 8px 8px;
}

.auth-container {
    margin: 20px;
}


















}
/* Responsiivisuus pienemmille näytöille */
@media (max-width: 700px) {

.pc {
        display: none;
}

.auth-container {
    margin: 20px !important;
}

.post-actions {
    margin-top: -1.2rem;
    margin-right: -1rem;
}

.post-actions {
    opacity: 0.2; 
}


.post-card:hover .post-actions {
    opacity: 0.7;
}




.user-list li img {
    width: 45px;
    height: 45px;
}

.profile-body {
    gap: unset !important;
}

.profile-card {
    margin-bottom: 1rem;
}

.profile-hashtag-list button {
    margin-right: 2px;
}

.profile-hashtag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: unset;
}

.tagit section.profile-card {
    padding: 8px 0px;
}

.audio-module {
    padding: 0px;
}

p.audio-caption {
    margin: 8px 0px;
    margin-top: 0px;
}

.delete-media-btn {
    top: -9px;
}

.community-buttons button, .community-buttons a {
    font-size: 14px;
}

.community-buttons {
    display: grid;
    grid-template-columns: repeat(2, 2fr);
    text-align: -webkit-center;
    place-items: center;
}

.community-buttons a.edit-trigger, .community-buttons form, button.action-btn {
    width: -webkit-fill-available !important;
    max-width: unset !important;
}

.community-buttons {
    display: block !important;
    min-height: 100px;
    margin: 0% -1%;
}

.community-buttons button, a.edit-trigger {
    margin: 0% 1%;
}

a.edit-trigger {
    width: 100% !important;
    display: block;
}

.community-buttons button.action-btn {
    width: 48% !important;
    float: inline-start;
}
























    
    .post-creation-misc {
    display: flex; 
} 
    
    .profile-body { 
        display: flex; flex-wrap: wrap; gap: var(--profile-padding); 
        padding: 0.7rem; 
    }
    
    .auth-container { max-width: 400px; margin: 3rem auto; padding: 1.5rem 1.175rem; max-width: 80vmin; }
    
    
    .header-content-wrapper {
        align-items: flex-start; /* Kohdista vasemmalle */
        gap: 15px; /* Väli pinottujen elementtien välille */
    }
    
    #change-canva-btn {
        opacity: 1; /* ALUKSI NÄKYMÄTÖN */
        top: 5px !important;
        right: 5px !important;
        background: rgb(255 255 255 / 82%);
        backdrop-filter: blur(3px);
    }

    
    .main-header {
        padding-top: 2px;
    }

    .main-nav {
        gap: 4vh; 
        margin-top: 5%;
        display: grid;
        grid-auto-flow: column;
        max-width: 100% !important;
        justify-items: end;
        width: 100%;
    }

    .nav-button {
        text-align: center; /* Teksti keskelle painikkeessa */
        width: 100%; /* Painikkeet täyttävät koko leveyden */
    }

    .site-branding {
        justify-content: center; /* Keskittää logon ja nimen pienellä näytöllä */
    }

    i.fa.fa-users:after {
    content: "Yhteisöt";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.7;
}

i.fa.fa-object-group:after {
    content: "Luo yhteisö";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -27px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.8;
}

i.fa.fa-id-card-o:after {
    content: "Profiili";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -11px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.7;
}

i.fa.fa-sign-out:after {
    content: "Logout";
    display: block;
    position: absolute;
    bottom: 13px;
    margin-left: -18px;
    font-size: 17px;
    font-family: system-ui;
    opacity: 0.7;
}
    
    .profile-left-column, .profile-right-column {
    min-width: 100%;
}
    
    section.profile-card {
    max-width: unset;
}
    
    .profile-center-column, .profile-left-column, .profile-right-column {
    flex: 1 1 100%;
    min-width: 100% !important;
}
    
    .filter-checkboxes label p {
    display: none !important;
}

section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"] {
    font-size: 12px;
}    

.delete-media-btn {
        opacity: 1;
    }

/* 
.message { margin-bottom: -1.5rem !important; max-width: calc(100vh - 3rem) !important;}   
*/
    
    
.post-card-body iframe {
    border: none;
    height: 75vh; /* Asettaa iframen korkeudeksi koko katseluikkunan korkeuden */
}    
    
    
.auth-container, .auth-container form button {
    font-size: 84%;
}    
    
div#details-view-section small {
    display: block;
}    
    
.community-buttons {
    display: grid;
}      
    
.community-buttons button.action-btn {
    margin-bottom: 8px;
}
        
        
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
}    
    @media (max-width: 550px) {
    
/*    .profile-clickname-box {
        bottom: 43px;
    } */
    
    
.reaction-set {
    width: 100%;
    max-width: 100%;
}       
    
    
input[type="number"]::placeholder {
    font-size: 11px;
}    
    
.post-card-header img {
    width: 65px;
    height: 65px;
}    
    
   
.profile-card {
    padding: 1.0rem 0.8rem; 
}     
    
section#search-filter-panel h1 {
    font-size: 170%;
    padding-top: 9px;
}

section.profile-card {
    max-width: unset;
}

section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"] {
    padding: 9px;
} 

section#search-filter-panel input[type="number"] {
    padding-bottom: 13px;
} 

.post-creation-misc button {
    width: -webkit-fill-available;
}

.hashtags {
    width: calc(100% - 7px) !important;
    margin: 10px 00px;
}

.post-creation-misc {
    display: block; 
}

.post-creation-misc button {
    width: calc(50% - 7px) !important;
}

.post-creation-misc button#publish {
    width: calc(100% - 4px) !important;
}



    .profile-body { flex-direction: column; }
    .profile-left-column, .profile-center-column, .profile-right-column { width: 100%; }
    
    /* Tähän mobiilikohtaiset säännöt deco/audio-elementeille kuten ohjeistettu */
}

/* Postaus/syöte */
.post { background: #fff; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 1rem; }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; margin-right: 0.75rem; }
.post-content iframe { width: 100%; min-height: 250px; border: none; resize: vertical; }


.profile-clickname-box h1 {
    max-width: 100vh !important;
    width: -webkit-fill-available;
    white-space: break-spaces;
}


.post-creation-misc button {
    width: calc(100% - 4px);
}
    
.post-card-body {
    padding: 0.7rem 1.2rem 0.7rem 1rem;
}    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    @media (max-width: 500px) {
    


.profile-clickname-box h1 {
    font-size: 1.7rem
}

.deco-grid {
    grid-template-columns: repeat(2, 1fr);
}    

.deco-grid img {
    container-type: size;
}    














    
}
@media (max-width: 440px) {

    .main-nav {
        gap: 2vh; 
    }
    
    .main-header nav a {
        max-width: 20px;
    }



    i.fa.fa-users:after {
    content: "Yhteisöt";
    display: block;
    position: absolute;
    bottom: 20px;
    margin-left: -13px;
    font-size: 12px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-object-group:after {
    content: "Luo yhteisö";
    display: block;
    position: absolute;
    bottom: 20px;
    margin-left: -22px;
    font-size: 12px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-id-card-o:after {
    content: "Profiili";
    display: block;
    position: absolute;
    bottom: 20px;
    margin-left: -6px;
    font-size: 12px;
    font-family: system-ui;
    opacity: 0.5;
}

i.fa.fa-sign-out:after {
    content: "Logout";
    display: block;
    position: absolute;
    bottom: 20px;
    margin-left: -13px;
    font-size: 12px;
    font-family: system-ui;
    opacity: 0.5;
}    
    
.site-logo {
    width: 80px !important;
}    
    
    
.reaction-set {
    width: 100%;
    max-width: 100%;
}    
    
.post-card-body {
    padding: 0.5rem 1rem 0.5rem 1rem;
}     
    
.profile-card {
    padding: 0.9rem 0.7rem; 
}    
    
section#search-filter-panel h1 {
    font-size: 150%;
    padding-top: 14px;
}    
 
section#search-filter-panel input[type="text"], section#search-filter-panel input[type="number"] {
    font-size: 15px;
    padding: 7px;
} 

section#search-filter-panel input[type="number"] {
    padding-bottom: 10px;
} 
    
input[type="number"]::placeholder {
    font-size: 9px;
} 
 
.user-list li a span {
    margin-left: 5px;
}
 
.filter-grid div {
    gap: 20px !important;
}
 
.profile-clickname-box h1 {
    max-width: 100vh !important;
    width: -webkit-fill-available;
    white-space: break-spaces;
    font-size: 1.4rem;
}
 
.post-card-body {
    padding: 0.1rem;
} 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
    
    
    
    
    
    /* Media slotin perusmääritelmä (joka luo kuution) */
.media-slot {
    position: relative; /* Tärkeä, jotta sisäinen kuva tai sisältö voi sijoittua absoluuttisesti */
    width: 100%; /* Vie koko käytettävissä olevan leveyden */
    padding-bottom: 50%;
    padding-top: 50%;
    height: 0;           /* Nollaa korkeus, koska padding-bottom määrittelee sen */
    overflow: hidden;    /* Piilottaa ylimenevän sisällön */
    background: var(--grey-background); /* Taustaväri tyhjille sloteille */
    border-radius: var(--border-radius);
    display: flex;       /* Käytetään edelleen sisällön (esim. '+') keskittämiseen */
    align-items: center; /* Keskittää pystysuunnassa */
    justify-content: center; /* Keskittää vaakasuunnassa */
    border: 1px dashed var(--color-border); /* Dashed border for empty slots */
    /* aspect-ratio: 1 / 1; */ /* Voit pitää tämän modernimmille selaimille, mutta padding-bottom on fallback */
}

/* Kuvat media-slotin sisällä - emuloidaan object-fit: cover; */
.media-slot img {
    position: absolute; /* Sijoita kuva absoluuttisesti media-slotin sisään */
    top: 50%;           /* Siirrä yläreuna keskelle */
    left: 50%;          /* Siirrä vasen reuna keskelle */
    transform: translate(-50%, -50%); /* Keskittää kuvan tarkasti */

    /* NÄMÄ ARVOT EMULOIVAT OBJECT-FIT: COVER; */
    min-width: 100%;    /* Varmista, että kuva täyttää vähintään 100% leveydestä */
    min-height: 100%;   /* Varmista, että kuva täyttää vähintään 100% korkeudesta */
    max-width: none;    /* Estä max-width rajoittamasta kuvan kokoa */
    max-height: none;   /* Estä max-height rajoittamasta kuvan kokoa */
    width: auto;        /* Anna leveyden säätää automaattisesti */
    height: auto;       /* Anna korkeuden säätää automaattisesti */

    /* object-fit: cover; */ /* Voit pitää tämän modernimmille selaimille, mutta yllä oleva toimii fallbackina */
}

/* Deco-kuvien ja muiden kuvien lisää-painike */
.media-slot-add {
    z-index: 2; /* Varmista, että plus-merkki on kuvan päällä, jos kuva latautuu */
}
    
    
    
    
    
    
    
    
    
}    
@media (max-width: 350px) {    
    
i.fa.fa-users:after, i.fa.fa-object-group:after, i.fa.fa-id-card-o:after, i.fa.fa-sign-out:after {
    display: none;
}

nav.main-nav, .filter-checkboxes {
    display: flex;
    justify-content: space-between;
}
    
.filter-grid div {
    gap: 2px !important;
    justify-content: space-evenly;
}
    
.filter-checkboxes label {
    text-align: -webkit-center;
}    

/*
    
.profile-clickname-box {
        bottom: 37px;
    }   
    
*/
    
.profile-clickname-box h1 {
    font-size: 1.2rem;
}    

.profile-clickname-box {
    padding: 17px 25px 17px 25px;
}

nav.main-nav {
    column-count: 2;
    display: table-caption;
}

.main-header nav a {
    padding: 20px;
}

i.fa.fa-object-group, i.fa.fa-sign-out {
    margin-top: 12px;
}  

.auth-container {
    margin: 1rem 1rem;
    padding: 0.5rem 1.12rem;
    max-width: unset;
}

h2 {
    margin-top: 1rem;
    padding-bottom: 1rem;
}

.auth-container form {
    padding-top: 18px;
}

.auth-container form input {
    font-size: 90%;
}

.auth-container {
    font-size: 100%;
}

.post-actions {
    top: 0px;
    right: 0px;
    display: block !important;
}

.profile-body {
    padding: 0.25rem;
}

.post-card-body {
        padding: 0.2rem;
}

.auth-container {
    margin: 1rem 0.5rem;
}






















}
@media (max-width: 270px) {   


div#recording-controls button {
    padding: 5px 0px;
    width: 100%;
    margin-bottom: 5px;
}

span#audio-timer {
    margin-left: unset !important;
}















}
@media (max-width: 250px) {   

.post-card-header strong {
    font-size: 10px;
}

.post-card-header small {
    font-size: 9px;
}

.auth-container form {
    text-align: -webkit-center;
}

.auth-container form button {
    padding: 11px 0px;
    background-color: #4bc5f7cf;
    border: 1px solid #00083a26;
    text-shadow: 0px 0px 1px #18236c5c, 0px 0px 1px #02020224;
    border-radius: 4px;
}

.header-content-wrapper {
    gap: 0px;
}

.auth-container form input {
    font-size: 90%;
    margin: 20px 0px;
}

.auth-container form button {
    margin-top: 12px;
}


button#start-record-btn, button#share-location-btn, button#upload-image-btn, button#upload-audio-btn {
    font-size: 0px;
    padding: 7px;
    padding-top: 4px;
}

button#start-record-btn:after {
    content:"🎙️";
    font-size: 24px;
}

button#share-location-btn:after {
    content:"🗺️";
    font-size: 24px;
}

button#upload-image-btn {
    padding-bottom: 9px;
    padding-top: 0px;
    margin-bottom: 6px;
    margin-top: -11px !important;
    vertical-align: -webkit-baseline-middle;
}

button#upload-image-btn:after {
    content:"📷";
    font-size: 24px;
    padding-bottom: 7px;
    padding-top: 0px;
}

button#upload-audio-btn:after {
    content:"🔉️";
    font-size: 24px;
}

.profile-clickname-box h1 {
    font-size: 1.0rem;
} 

.post-card-body {
    padding: 0px;
}

.post-action-btn {
    width: 25px;
    height: 20px;
}

.post-actions button {
    padding: 0px;
}

.profile-body {
    padding: 0.1rem;
}

article.post-card {
    padding: 0.1rem;
}

.auth-container {
    margin: 1rem 0.2rem;
}

.audio-module {
    padding: 0;
}






















    
    
}    
@media (max-width: 200px) {    
    
.site-logo {
    width: 70px !important;
}
    
.main-header nav a {
        padding: 5px;
}    

.post-card-header strong {
    font-size: 9px;
}
    
.post-card-header small {
    font-size: 7px;
}

.header-content-wrapper {
    gap: 15px;
}

.auth-container form input {
    margin-top: 10px;
}    
    
.auth-container form button {
    margin-top: 11px;
}


.profile-clickname-box h1 {
    font-size: 0.9rem;
} 

.post-card-header strong {
    font-size: 7.4px;
}

button#change-canva-btn {
    font-size: 0.7rem;
    justify-self: anchor-center;
}
    
.profile-hashtag-filter {
    padding: 3px 7px;
    text-align: -webkit-center;
}

button.reaction-chip.direct-reaction {
    width: 28%;
}

.profile-body {
    padding: 0rem;
}

.profile-clickname-box {
    max-width: calc(100% - 54px);
}

body {
    max-width: fit-content;
    width: fit-content;
}






    
    
  
    
}    
@media (max-width: 170px) {     
    
.site-logo {
    width: 46px !important;
}    

nav.main-nav {
    margin-top: 0;
}

i.fa.fa-object-group, i.fa.fa-sign-out {
    margin-top: 0px;
}

.main-header nav a {
    padding: 5px;
    font-size: 16px;
}

.post-card-header img {
    height: auto;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}    
    
.post-card-header {
    display: block;
}  

.reaction-chip.direct-reaction .emoji {
    font-size: 2.5rem;
}

audio {
    max-width: unset;
    width: 110% !important;
    margin-left: -5%;
}

.post-card-header strong {
    font-size: 12.4px;
}

.post-card-header small {
    font-size: 11px;
}

.post-actions {
    position: relative;
    top: 10px;
    right: 0px;
    place-self: center;
    width: 100%;
    text-align-last: justify;
}

body {
    max-width: 100vw;
    width: 170vw;
}

.user-list li a {
    display: contents;
}

.post-actions {
    text-align-last: justify;
}

.top-community-item {
    display: flex;
    flex-wrap: wrap;
    padding: 0px;
}

.user-list li a span {
        margin-left: 0px;
        word-break: break-word;
        margin-bottom: 25px;
    }

.edit-buttons button#cancel-edit-btn, .edit-buttons button#save-edit-btn, .edit-buttons button#change-avatar-btn {
    padding: 1px;
}

.edit-buttons {
    gap: 4px;
}

.edit-trigger {
    padding: 4px 7px;
}














}    
@media (max-width: 130px) {     

.user-list-container {
    overflow: clip;
}



    
}    
@media (max-width: 120px) {     
    
.site-logo {
    width: 45px !important;
    margin-right: -4px;
    margin-left: 2px;
}
    
.reaction-chip.direct-reaction .emoji {
    font-size: 2.8rem;
}    
    
audio {
    width: 100% !important;
    margin-left: -5%;
} 

.filter-checkboxes {
    display: block;
}

.header-content-wrapper {
    gap: 5px;
}

.main-nav {
    gap: 0vh;
}

button#start-record-btn:after, button#share-location-btn:after, button#upload-image-btn:after, button#upload-audio-btn:after {
    font-size: 14px;
}

button#upload-image-btn {
    margin-top: -3px !important;
}

.hashtags {
    width: calc(100% - 12px) !important;
}

.profile-card textarea {
    width: calc(100% - 14px);
}

.post-card-header {
    padding: 0.2rem;
}

.post-actions {
    text-align: center;
    text-align-last: center;
}

div#recording-controls {
    padding: 0px !important;
}

audio, .audio-module audio {
    width: 150% !important;
}

.profile-card {
        padding: 0.25rem 0.2rem;
    }







































































}    
@media (max-width: 100px) { 

a.nav-button {
    padding-left: 2px !important;
    padding-right: 1px !important;
}

input.list-search-input {
    padding-left: 2px;
    padding-right: 0px;
}

.reaction-chip.direct-reaction .emoji {
    font-size: 1.8rem;
}

.reaction-set {
    justify-content: center;
}

button#upload-image-btn {
    margin-top: -5px !important;
}

.edit-trigger {
    padding: 8px 2px;
    width: 100%;
}

.header-content-wrapper {
    display: block;
    text-align: -webkit-center;
}

























}    
@media (max-width: 80px) {     
    
   
audio {
    width: 105% !important;
    margin-left: 0%;
} 

.profile-card {
    padding: 0.1rem 0.22rem;
}

button#start-record-btn, button#share-location-btn, button#upload-image-btn, button#upload-audio-btn {
    padding: 0px;
    padding-top: 0px;
}

    button#start-record-btn, button#share-location-btn, button#upload-image-btn, button#upload-audio-btn {
        font-size: 0px;
        padding: 7px;
        padding-top: 4px;
        padding-left: 0px;
        padding-right: 0px;
    }

button#upload-image-btn {
        padding-top: 1px;
        padding-bottom: 9px;
    }










    
    
    
    
    
    
    
    
    
}