/*
 * =====================================================
 * KUUKUNEN SOCIAL – BuddyPress
 * Activity stream / perusulkoasu
 * =====================================================
 */

/* Sivun tausta */

body.buddypress {
    background: #f4f6f8;
}

/* BuddyPressin pääalue */

/* Aktiviteettien suodatinalue */

body.buddypress #buddypress .item-list-tabs,
body.buddypress #buddypress .activity-type-tabs {
    background: #ffffff;
    border: 0;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 8px;
}

/* Yksittäinen julkaisu */

body.buddypress #buddypress ul.activity-list li.activity-item {
    background: #ffffff;
    border: 0;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.10);
}

/* Avatar */

/* Julkaisun sisältö */

/* Käyttäjän nimi */

body.buddypress #buddypress .activity-header a {
    text-decoration: none;
}

/* Julkaisun aikaleima ym. */

/* Varsinainen julkaisuteksti */

/* Toimintopainikkeet */

/* Painikkeiden linkit */

/* Hover */

/* Aktiviteettivirran hakukenttä */

body.buddypress #buddypress .bp-dir-search input[type="search"],
body.buddypress #buddypress .bp-dir-search input[type="text"] {
    border-radius: 20px;
}

/* Pudotusvalikko */

body.buddypress #buddypress select {
    border-radius: 8px;
}

/* Mobiili */

@media (max-width: 768px) {
    body.buddypress #buddypress {
        margin: 15px 10px 50px;
    }

    body.buddypress #buddypress ul.activity-list li.activity-item {
        padding: 15px;
        border-radius: 10px;
    }

    body.buddypress #buddypress .activity-content {
        margin-left: 62px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – kolmen palstan layout
 * =====================================================
 */

body.buddypress #primary {
    max-width: none;
}

body.buddypress #main {
    width: 100%;
}

.kuukunen-social-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 720px) 260px;
    gap: 28px;
    max-width: 1280px;
    margin: 36px auto 80px;
    padding: 0 24px;
    align-items: start;
}

.kuukunen-social-feed {
    min-width: 0;
}

/* Vanha keskityssääntö pois */

body.buddypress #buddypress {
    max-width: none;
    margin: 0;
}

/* Vasen navigaatio */

.kuukunen-social-left {
    position: sticky;
    top: 24px;
}

.kuukunen-social-nav a {
    display: block;
    padding: 11px 14px;
    border-radius: 10px;
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
}

.kuukunen-social-nav a:hover {
    background: #ffffff;
}

/* Oikea palsta */

.kuukunen-social-right {
    position: sticky;
    top: 24px;
}

.kuukunen-social-widget {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.kuukunen-social-widget h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

/* Feedin sisäiset elementit */

.kuukunen-social-feed .activity-type-tabs,
.kuukunen-social-feed .item-list-tabs {
    margin-top: 0;
}

/* Tablet */

@media (max-width: 1100px) {
    .kuukunen-social-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .kuukunen-social-right {
        display: none;
    }
}

/* Mobiili */

@media (max-width: 760px) {
    .kuukunen-social-layout {
        display: block;
        padding: 0 12px;
        margin-top: 16px;
    }

    .kuukunen-social-left {
        position: static;
        margin-bottom: 14px;
    }

    .kuukunen-social-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .kuukunen-social-nav a {
        white-space: nowrap;
        background: #ffffff;
    }

    .kuukunen-social-right {
        display: none;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – sovellusmainen header
 * =====================================================
 */

/* Poistetaan Kadencen ylimääräinen otsikko/hero-tila */

body.buddypress .entry-hero-container-inner,
body.buddypress .entry-hero,
body.buddypress .page-title {
    display: none;
}

/* Header */

body.buddypress #masthead {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Headerin korkeus */

body.buddypress .site-main-header-inner-wrap {
    min-height: 64px;
}

/* Sivuston nimi */

body.buddypress .site-title,
body.buddypress .site-title a {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.4px;
    text-decoration: none;
}

/* Poistetaan ylimääräistä tyhjää tilaa ennen sisältöä */

body.buddypress .content-area {
    margin-top: 0;
}

body.buddypress .content-container {
    padding-top: 0;
}

/* Layout hieman lähemmäs headeria */

body.buddypress .kuukunen-social-layout {
    margin-top: 28px;
}

/* Sticky-sivupalstat huomioivat headerin */

body.buddypress .kuukunen-social-left,
body.buddypress .kuukunen-social-right {
    top: 92px;
}

/* Kadencen normaali header pois BuddyPress-näkymästä */

body.buddypress #masthead {
    display: none;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – APP HEADER
 * =====================================================
 */

.kuukunen-app-header {
    position: sticky;
    top: 0;
    z-index: 999;
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.admin-bar .kuukunen-app-header {
    top: 32px;
}

.kuukunen-app-header-inner {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 220px minmax(300px, 520px) 1fr;
    align-items: center;
    gap: 28px;
}

/* Logo */

.kuukunen-app-brand a {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.7px;
    color: #1f2937;
    text-decoration: none;
}

/* Haku */

.kuukunen-app-search input {
    width: 100%;
    height: 42px;
    padding: 0 18px;
    border: 1px solid #e1e5e9;
    border-radius: 22px;
    background: #f4f6f8;
    font-size: 15px;
    outline: none;
}

.kuukunen-app-search input:focus {
    background: #ffffff;
    border-color: #9ca3af;
}

/* Oikea käyttäjäalue */

.kuukunen-app-user {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.kuukunen-header-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f2f5;
    color: #374151;
    text-decoration: none;
}

.kuukunen-header-icon:hover {
    background: #e4e7eb;
}

/* Avatar + nimi */

.kuukunen-header-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: 22px;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}

.kuukunen-header-profile:hover {
    background: #f0f2f5;
}

.kuukunen-header-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Tablet */

@media (max-width: 900px) {
    .kuukunen-app-header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .kuukunen-header-profile span {
        display: none;
    }
}

/* Puhelin */

@media (max-width: 600px) {
    .kuukunen-app-header-inner {
        padding: 0 12px;
        gap: 10px;
    }

    .kuukunen-app-brand a {
        font-size: 20px;
    }

    .kuukunen-app-search {
        display: none;
    }

    .kuukunen-app-header-inner {
        grid-template-columns: 1fr auto;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – JULKAISUKENTTÄ
 * =====================================================
 */

/*
 * =====================================================
 * KUUKUNEN SOCIAL – ACTIVITY CARD
 * =====================================================
 */

body.buddypress #buddypress ul.activity-list {
    padding: 0;
}

body.buddypress #buddypress ul.activity-list li.activity-item {
    padding: 18px;
    border-radius: 14px;
    overflow: hidden;
}

body.buddypress #buddypress .activity-header p {
    margin: 0;
}

body.buddypress #buddypress .activity-inner p {
    margin-bottom: 0;
}

body.buddypress #buddypress .activity-meta {
    background: transparent;
}

/* Profiilikuvan vaihtaminen tiiviimmäksi */

body.buddypress #buddypress li.activity_update_profile .activity-inner,
body.buddypress #buddypress li.new_avatar .activity-inner {
    padding: 0;
    margin-top: 12px;
}

body.buddypress #buddypress li.new_avatar .activity-inner img {
    max-width: 72px;
    max-height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

/* Jos BuddyPress näyttää sisäisen profiilikortin */

body.buddypress #buddypress .activity-inner .bp-member-preview-cover,
body.buddypress #buddypress .activity-inner .mini .item-avatar img {
    border-radius: 50%;
}

/*
 * =====================================================
 * SUODATUSRIVI
 * =====================================================
 */

body.buddypress #buddypress .activity-type-tabs {
    border: 0;
    box-shadow: none;
}

body.buddypress #buddypress .activity-type-tabs ul {
    display: flex;
    gap: 4px;
}

body.buddypress #buddypress .activity-type-tabs li a {
    border-radius: 9px;
    padding: 8px 12px;
    text-decoration: none;
}

body.buddypress #buddypress .activity-type-tabs li.selected a,
body.buddypress #buddypress .activity-type-tabs li.current a {
    background: #eef1f4;
}

body.buddypress #buddypress .activity-search,
body.buddypress #buddypress .dir-search {
    margin-bottom: 14px;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – OIKEA SIVUPALSTA
 * =====================================================
 */

.kuukunen-social-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kuukunen-social-widget {
    padding: 18px;
}

.kuukunen-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.kuukunen-widget-header h3 {
    margin: 0;
    font-size: 17px;
}

.kuukunen-widget-header a {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.kuukunen-member-list {
    display: flex;
    flex-direction: column;
}

.kuukunen-member {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 5px;
    border-radius: 10px;
    text-decoration: none;
}

.kuukunen-member:hover {
    background: #f4f6f8;
}

.kuukunen-member-avatar {
    flex: 0 0 44px;
}

.kuukunen-member-avatar img {
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.kuukunen-member-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kuukunen-member-info strong {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.3;
}

.kuukunen-member-info small {
    margin-top: 2px;
    color: #7b8491;
    font-size: 12px;
}

.kuukunen-widget-muted {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – VASEN NAVIGAATIO
 * =====================================================
 */

.kuukunen-social-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kuukunen-social-nav .kuukunen-nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 11px;
    color: #303641;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease,
        color .15s ease;
}

.kuukunen-social-nav .kuukunen-nav-item:hover {
    background: #ffffff;
    color: #111827;
}

/* Ikonit */

.kuukunen-nav-item svg {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Valittu kohta */

.kuukunen-nav-item.is-active {
    background: #ffffff;
    color: #2563eb;
}

/* Hieman korostettu aktiivisen kohdan ikoni */

.kuukunen-nav-item.is-active svg {
    stroke-width: 2;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – FEEDIN VIIMEISTELY
 * =====================================================
 */

/* Yksittäinen activity-kortti */

body.buddypress #buddypress .activity-list .activity-item {
    position: relative;
    background: #fff;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Pääavatar */

body.buddypress #buddypress .activity-avatar {
    float: left;
}

body.buddypress #buddypress .activity-avatar img.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

/* Sisältö avatarin oikealle puolelle */

body.buddypress #buddypress .activity-content {
    margin-left: 62px;
}

/* Header */

body.buddypress #buddypress .activity-header {
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

body.buddypress #buddypress .activity-header a {
    color: #1f2937;
    font-weight: 700;
}

/* Aikaleimat vähän hillitymmiksi */

body.buddypress #buddypress .activity-header .time-since {
    color: #8a919b;
    font-weight: 400;
}

/* Julkaisun varsinainen teksti */

body.buddypress #buddypress .activity-inner {
    margin: 8px 0 14px;
    padding: 0;
    background: transparent;
    font-size: 15px;
    line-height: 1.55;
    color: #20252d;
}

body.buddypress #buddypress .activity-inner p {
    margin: 0;
}

/*
 * =====================================================
 * TOIMINTOPAINIKKEET
 * =====================================================
 */

body.buddypress #buddypress .activity-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #edf0f2;
}

body.buddypress #buddypress .activity-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    color: #626b78;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.buddypress #buddypress .activity-meta a:hover {
    background: #f3f5f7;
    color: #1f2937;
}

/*
 * =====================================================
 * KOMMENTIT
 * =====================================================
 */

body.buddypress #buddypress .activity-comments {
    margin: 12px 0 0;
}

body.buddypress #buddypress .activity-comments ul {
    margin: 0;
    padding: 0;
}

body.buddypress #buddypress .activity-comments li {
    border: 0;
    padding: 10px 0;
}

body.buddypress #buddypress .activity-comments img.avatar {
    border-radius: 50%;
}

body.buddypress #buddypress .ac-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #edf0f2;
}

body.buddypress #buddypress .ac-form textarea {
    border: 1px solid #e2e6ea;
    border-radius: 16px;
    background: #f5f6f7;
    padding: 10px 13px;
    box-shadow: none;
}

/* Profiilikuvan vaihtotapahtumat pois uutisvirrasta */

body.buddypress #buddypress .activity-list li.new_avatar {
    display: none !important;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 600px) {
    body.buddypress #buddypress .activity-list .activity-item {
        padding: 14px;
        border-radius: 12px;
    }

    body.buddypress #buddypress .activity-avatar img.avatar {
        width: 42px;
        height: 42px;
    }

    body.buddypress #buddypress .activity-content {
        margin-left: 56px;
    }

    body.buddypress #buddypress .activity-meta {
        flex-wrap: wrap;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – HEADER-IKONIT JA BADGET
 * =====================================================
 */

.kuukunen-header-icon {
    position: relative;
}

.kuukunen-header-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kuukunen-header-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 10px;
    background: #dc2626;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – JULKAISUKENTTÄ / COMPOSER
 * =====================================================
 */

body.buddypress #buddypress #whats-new-form {
    position: relative;
    background: #ffffff;
    border: 1px solid #edf0f2;
    border-radius: 15px;
    padding: 16px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Avatar */

body.buddypress #buddypress #whats-new-avatar {
    float: left;
    margin: 0;
}

body.buddypress #buddypress #whats-new-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

/* Kentän sisältö */

body.buddypress #buddypress #whats-new-content {
    margin-left: 60px;
    padding: 0;
}

/* "Mitä uutta, Janne?" -otsikko */

body.buddypress #buddypress #whats-new-content > h5,
body.buddypress #buddypress #whats-new-content > p:first-child {
    margin-top: 0;
}

/* Varsinainen tekstikenttä */

body.buddypress #buddypress textarea#whats-new {
    width: 100%;
    min-height: 52px;
    padding: 14px 17px;
    border: 0;
    border-radius: 24px;
    background: #f2f4f6;
    color: #20252d;
    font-size: 16px;
    line-height: 1.45;
    box-shadow: none;
    resize: none;
}

body.buddypress #buddypress textarea#whats-new:hover {
    background: #eceff2;
}

body.buddypress #buddypress textarea#whats-new:focus {
    min-height: 100px;
    background: #ffffff;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    outline: none;
}

/*
 * =====================================================
 * JULKAISUKENTÄN ALAOSA
 * =====================================================
 */

body.buddypress #buddypress #whats-new-options {
    clear: both;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
}

/* BuddyPressin "Julkaise kohteeseen" */

body.buddypress #buddypress #whats-new-post-in-box {
    font-size: 13px;
    color: #69717d;
}

/* Select */

body.buddypress #buddypress #whats-new-post-in {
    min-height: 36px;
    padding: 4px 30px 4px 10px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
}

/* Julkaise-painike */

body.buddypress #buddypress #aw-whats-new-submit {
    min-height: 38px;
    padding: 8px 18px;
    border: 0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress #aw-whats-new-submit:hover {
    opacity: .9;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 600px) {
    body.buddypress #buddypress #whats-new-form {
        padding: 13px;
    }

    body.buddypress #buddypress #whats-new-avatar img {
        width: 42px;
        height: 42px;
    }

    body.buddypress #buddypress #whats-new-content {
        margin-left: 54px;
    }

    body.buddypress #buddypress textarea#whats-new {
        font-size: 15px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – RTMEDIA JULKAISUKENTÄSSÄ
 * =====================================================
 */

/* rtMedian nappialue osaksi composer-riviä */

body.buddypress #buddypress #whats-new-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* rtMedian latauspainike */

body.buddypress #buddypress .rtmedia-add-media-button,
body.buddypress #buddypress .rtmedia-upload-input {
    border: 0;
    box-shadow: none;
}

/* Näkyvä Lisää media -painike */

body.buddypress #buddypress .rtmedia-add-media-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 9px;
    background: transparent;
    color: #596270;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

body.buddypress #buddypress .rtmedia-add-media-button:hover {
    background: #f2f4f6;
    color: #1f2937;
}

/* rtMedian mahdolliset oletusikonit hieman siistimmiksi */

body.buddypress #buddypress .rtmedia-add-media-button i,
body.buddypress #buddypress .rtmedia-add-media-button span {
    vertical-align: middle;
}

/* Valitun median esikatselu */

body.buddypress #buddypress .rtmedia-plupload-container {
    margin-top: 10px;
}

body.buddypress #buddypress .rtmedia-uploader-div {
    border-radius: 10px;
}

/* Julkaise-painike oikealle */

body.buddypress #buddypress #whats-new-submit {
    margin-left: auto;
}

/* Jos nappi on rtMedian takia omassa wrapperissa */

body.buddypress #buddypress #whats-new-submit input {
    min-height: 38px;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – RTMEDIA FEEDISSÄ
 * =====================================================
 */

/* Media-alue */

body.buddypress #buddypress .activity-item .rtmedia-activity-container {
    margin: 12px 0 4px;
    padding: 0;
    width: 100%;
}

/* rtMedian listarakenteesta ylimääräiset välit pois */

body.buddypress #buddypress .activity-item .rtmedia-list {
    margin: 0;
    padding: 0;
}

/* Yksittäinen media */

body.buddypress #buddypress .activity-item .rtmedia-list-item {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Julkaisun kuva */

body.buddypress #buddypress .activity-item .rtmedia-list-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 12px;
    object-fit: cover;
}

/* Kuvan ympärillä olevat linkit */

body.buddypress #buddypress .activity-item .rtmedia-list-item a {
    display: block;
    text-decoration: none;
}

/* Mahdollinen median otsikko */

body.buddypress #buddypress .activity-item .rtmedia-item-title {
    margin-top: 6px;
    color: #737b86;
    font-size: 12px;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – ACTIVITY TOIMINTORIVI
 * =====================================================
 */

body.buddypress #buddypress .activity-meta.action {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #edf0f2;
}

/* BuddyPressin wrapperit */

body.buddypress #buddypress .activity-meta.action .generic-button {
    margin: 0;
}

/* Kaikki toimintolinkit */

body.buddypress #buddypress .activity-meta.action a.button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    color: #626b78;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

body.buddypress #buddypress .activity-meta.action a.button:hover {
    background: #f3f5f7;
    color: #20252d;
}

/*
 * =====================================================
 * KOMMENTOI
 * =====================================================
 */

body.buddypress #buddypress .activity-meta a.acomment-reply::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626b78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v12H8l-4 3V5z'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

/*
 * BuddyPress näyttää vain kommenttimäärän.
 * Lisätään näkyvä teksti itse.
 */

body.buddypress #buddypress .activity-meta a.acomment-reply::after {
    content: "Kommentoi";
}

/* Kommenttimäärä */

body.buddypress #buddypress .activity-meta .comment-count {
    order: 3;
    font-weight: 500;
    color: #8a919b;
}

/*
 * =====================================================
 * TYKKÄÄ
 * =====================================================
 */

body.buddypress #buddypress .activity-meta a.fav::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23626b78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1.1-1.1a5.5 5.5 0 0 0-7.8 7.8L12 21l8.9-8.6a5.5 5.5 0 0 0-.1-7.8z'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

body.buddypress #buddypress .activity-meta a.fav::after {
    content: "Tykkää";
}

/* Jos BuddyPress vaihtaa luokan unfavorite-tilaan */

body.buddypress #buddypress .activity-meta a.unfav::before {
    content: "";
    width: 18px;
    height: 18px;
    display: inline-block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc2626' stroke='%23dc2626' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1.1-1.1a5.5 5.5 0 0 0-7.8 7.8L12 21l8.9-8.6a5.5 5.5 0 0 0-.1-7.8z'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

body.buddypress #buddypress .activity-meta a.unfav::after {
    content: "Tykätty";
}

/*
 * =====================================================
 * POISTA
 * =====================================================
 */

/* Poisto pois varsinaisesta toimintorivistä */

body.buddypress #buddypress .activity-meta a.delete-activity {
    display: none;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – KOMMENTTIKENTTÄ
 * =====================================================
 */

body.buddypress #buddypress .activity-comments .ac-form {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #edf0f2;
}

/* Kommentoijan avatar */

body.buddypress #buddypress .ac-reply-avatar {
    flex: 0 0 36px;
}

body.buddypress #buddypress .ac-reply-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

/* Sisältöalue */

body.buddypress #buddypress .ac-reply-content {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* Tekstikenttä */

body.buddypress #buddypress .ac-textarea {
    margin: 0 0 8px;
}

body.buddypress #buddypress .ac-textarea textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 46px 10px 14px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: #f2f4f6;
    color: #20252d;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    resize: vertical;
}

body.buddypress #buddypress .ac-textarea textarea:focus {
    background: #ffffff;
    border-color: #d7dce1;
    outline: none;
}

/*
 * =====================================================
 * RTMEDIA – LIITÄ KUVA KOMMENTTIIN
 * =====================================================
 */

body.buddypress #buddypress button.rtmedia-comment-media-upload {
    position: absolute !important;
    top: 6px;
    right: 7px;
    z-index: 2 !important;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #69717d;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress button.rtmedia-comment-media-upload:hover {
    background: #e7eaed;
    color: #20252d;
}

/* Piilotetaan rtMedian vanha dashicon */

body.buddypress #buddypress button.rtmedia-comment-media-upload .dashicons {
    display: none;
}

/* Oma kuvake */

body.buddypress #buddypress button.rtmedia-comment-media-upload::before {
    content: "";
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369717d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 20'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

/*
 * =====================================================
 * JULKAISE / PERUUTA
 * =====================================================
 */

body.buddypress #buddypress .ac-reply-content input[type="submit"] {
    min-height: 34px;
    padding: 7px 14px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress .ac-reply-cancel {
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #68717e;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress .ac-reply-cancel:hover {
    background: #f2f4f6;
}

/* rtMedian uploader kommentissa */

body.buddypress #buddypress .activity-comments .rtmedia-container {
    margin-top: 8px;
}

body.buddypress #buddypress .activity-comments .rtm-plupload-list {
    margin: 0;
    padding: 0;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – ACTIVITY ••• MENU
 * =====================================================
 */

body.buddypress #buddypress .activity-item {
    position: relative;
}

.kuukunen-activity-menu {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 20;
}

.kuukunen-activity-menu-toggle {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #68717e;
    box-shadow: none;
    cursor: pointer;
}

.kuukunen-activity-menu-toggle:hover {
    background: #f0f2f4;
    color: #20252d;
}

.kuukunen-activity-menu-toggle svg {
    width: 21px;
    height: 21px;
    fill: currentColor;
    stroke: none;
}

/* Pudotusvalikko */

.kuukunen-activity-dropdown {
    position: absolute;
    top: 39px;
    right: 0;
    display: none;
    min-width: 170px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10),
        0 2px 6px rgba(0,0,0,.05);
}

.kuukunen-activity-menu.is-open
.kuukunen-activity-dropdown {
    display: block;
}

.kuukunen-activity-dropdown a {
    display: block;
    padding: 9px 11px;
    border-radius: 7px;
    color: #b42318;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.kuukunen-activity-dropdown a:hover {
    background: #fff1f0;
    color: #9f1c12;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIN YLÄOSA v2
 * =====================================================
 */

/* Koko profiiliheader */

body.buddypress #buddypress #cover-image-container {
    position: relative;
    margin: 0 0 28px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

/*
 * =====================================================
 * KANSIKUVA
 * =====================================================
 */

body.buddypress #buddypress #header-cover-image {
    position: relative;
    width: 100%;
    height: 280px;
    margin: 0;
    background-color: #d8dde3;
    background-size: cover;
    background-position: center;
    border-radius: 16px 16px 0 0;
}

/*
 * =====================================================
 * PROFIILIRIVI KANSIKUVAN ALLA
 * =====================================================
 */

body.buddypress #buddypress #item-header-cover-image {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    min-height: 150px;
    margin: 0;
    padding: 22px 28px;
    background: #ffffff;
    border-radius: 0 0 16px 16px;
}

/*
 * =====================================================
 * PROFIILIKUVA
 * =====================================================
 */

body.buddypress #buddypress #item-header-avatar {
    position: static;
    float: none;
    flex: 0 0 118px;
    width: 118px;
    height: 118px;
    margin: 0;
    padding: 0;
}

body.buddypress #buddypress #item-header-avatar a {
    display: block;
    width: 118px;
    height: 118px;
}

body.buddypress #buddypress #item-header-avatar img.avatar {
    display: block;
    width: 118px !important;
    height: 118px !important;
    max-width: none;
    margin: 0;
    border: 4px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,.14);
}

/*
 * =====================================================
 * KÄYTTÄJÄTIEDOT
 * =====================================================
 */

body.buddypress #buddypress #item-header-content {
    position: static;
    float: none;
    flex: 1;
    width: auto;
    margin: 0;
    padding: 0;
    color: #1f2937;
}

/* @janne */

body.buddypress #buddypress #item-header-content h2.user-nicename {
    margin: 0 0 7px;
    color: #1f2937;
    font-size: 25px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: none;
}

/* Aktiivisuustieto */

body.buddypress #buddypress #item-header-content .item-meta {
    margin: 0;
}

body.buddypress #buddypress #item-header-content .activity {
    color: #7b8491;
    font-size: 13px;
    font-weight: 400;
    text-shadow: none;
}

/* BuddyPressin mahdollinen toimintopainikealue */

body.buddypress #buddypress .member-header-actions {
    margin: 10px 0 0;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 600px) {
    body.buddypress #buddypress #header-cover-image {
        height: 180px;
    }

    body.buddypress #buddypress #item-header-cover-image {
        align-items: center;
        gap: 15px;
        min-height: 120px;
        padding: 16px;
    }

    body.buddypress #buddypress #item-header-avatar,
    body.buddypress #buddypress #item-header-avatar a {
        flex-basis: 84px;
        width: 84px;
        height: 84px;
    }

    body.buddypress #buddypress #item-header-avatar img.avatar {
        width: 84px !important;
        height: 84px !important;
        border-width: 3px;
    }

    body.buddypress #buddypress #item-header-content h2.user-nicename {
        font-size: 21px;
    }
}

/*
 * =====================================================
 * PROFIILIHEADER – BuddyPress override
 * =====================================================
 */

/* Varsinainen valkoinen profiilirivi */

body.buddypress #buddypress
#cover-image-container
#item-header-cover-image {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 22px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 150px !important;
    margin: 0 !important;
    padding: 20px 28px !important;
    background: #ffffff !important;
}

/*
 * BuddyPressin clearfix muuttuu flex-elementiksi.
 * Sitä ei tässä rakenteessa tarvita.
 */

body.buddypress #buddypress
#item-header-cover-image::after {
    content: none !important;
    display: none !important;
}

/* Profiilikuva */

body.buddypress #buddypress
#item-header-cover-image
#item-header-avatar {
    position: static !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    flex: 0 0 118px !important;
    align-self: center !important;
    width: 118px !important;
    height: 118px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}

/* Avatar-linkki */

body.buddypress #buddypress
#item-header-cover-image
#item-header-avatar > a {
    display: block !important;
    width: 118px !important;
    height: 118px !important;
    margin: 0 !important;
}

/* Itse kuva */

body.buddypress #buddypress
#item-header-cover-image
#item-header-avatar img.avatar {
    display: block !important;
    width: 118px !important;
    height: 118px !important;
    max-width: 118px !important;
    max-height: 118px !important;
    margin: 0 !important;
    border: 4px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 10px rgba(0,0,0,.14);
}

/* Käyttäjätiedot avatarin viereen */

body.buddypress #buddypress
#item-header-cover-image
#item-header-content {
    position: static !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    flex: 1 1 auto !important;
    align-self: center !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    text-align: left !important;
}

/* Käyttäjänimi */

body.buddypress #buddypress
#item-header-cover-image
#item-header-content
h2.user-nicename {
    margin: 0 0 7px !important;
    color: #1f2937 !important;
    font-size: 25px;
    font-weight: 700;
    line-height: 1.2;
    text-align: left !important;
    text-shadow: none !important;
}

/* Aktiivisuus */

body.buddypress #buddypress
#item-header-cover-image
#item-header-content
.item-meta {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

body.buddypress #buddypress
#item-header-cover-image
#item-header-content
.activity {
    color: #7b8491 !important;
    font-size: 13px;
    text-shadow: none !important;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIN PÄÄNAVIGAATIO
 * =====================================================
 */

body.buddypress #buddypress #object-nav {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow-x: auto;
    overflow-y: hidden;
}

body.buddypress #buddypress #object-nav > ul {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress #object-nav li {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress #object-nav li a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #5f6875;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s ease,
        color .15s ease;
}

body.buddypress #buddypress #object-nav li a:hover {
    background: #f2f4f6;
    color: #1f2937;
}

/* Aktiivinen välilehti */

body.buddypress #buddypress #object-nav li.current > a,
body.buddypress #buddypress #object-nav li.selected > a {
    background: #eef4ff;
    color: #2563eb;
}

/* Alaviiva aktiiviseen kohtaan */

body.buddypress #buddypress #object-nav li.current > a::after,
body.buddypress #buddypress #object-nav li.selected > a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

/* Badge, esim. Ilmoitukset 1 */

body.buddypress #buddypress #object-nav .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border: 0;
    border-radius: 10px;
    background: #e9edf2;
    color: #596270;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

body.buddypress #buddypress #object-nav li.current .count,
body.buddypress #buddypress #object-nav li.selected .count {
    background: #dbe8ff;
    color: #2563eb;
}

/* Scrollbar mahdollisimman huomaamattomaksi */

body.buddypress #buddypress #object-nav {
    scrollbar-width: thin;
}

/* Mobiili */

@media (max-width: 700px) {
    body.buddypress #buddypress #object-nav li a {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIN ALAVALIKKO
 * =====================================================
 */

body.buddypress #buddypress #subnav {
    margin: 0 0 24px;
    padding: 0;
    border: 0;
    background: transparent;
    overflow-x: auto;
    overflow-y: hidden;
}

body.buddypress #buddypress #subnav > ul {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: max-content;
    margin: 0;
    padding: 4px;
    list-style: none;
    border-radius: 11px;
    background: #f5f6f8;
}

body.buddypress #buddypress #subnav li {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress #subnav li a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s ease,
        color .15s ease;
}

body.buddypress #buddypress #subnav li a:hover {
    background: #ffffff;
    color: #1f2937;
}

/* Aktiivinen alavalikon kohta */

body.buddypress #buddypress #subnav li.current > a,
body.buddypress #buddypress #subnav li.selected > a {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* Mobiili */

@media (max-width: 700px) {
    body.buddypress #buddypress #subnav {
        margin-bottom: 18px;
    }

    body.buddypress #buddypress #subnav li a {
        min-height: 32px;
        padding: 6px 9px;
        font-size: 12px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIN ACTIVITY-SISÄLTÖ
 * =====================================================
 */

/*
 * * Profiilin activity-osio keskitetään.
 * * Pää- ja alavalikko jäävät edelleen koko käytettävälle leveydelle.
 */

body.buddypress #buddypress #item-body > .bp-screen-title,
body.buddypress #buddypress #item-body > #bp-nouveau-activity-form,
body.buddypress #buddypress #item-body > #subnav-filters,
body.buddypress #buddypress #item-body > #activity-stream {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/*
 * =====================================================
 * JÄSENTEN TOIMINTA -OTSIKKO
 * =====================================================
 */

body.buddypress #buddypress #item-body > .bp-screen-title {
    margin-top: 26px;
    margin-bottom: 14px;
    color: #1f2937;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.25px;
}

/*
 * =====================================================
 * PROFIILIN JULKAISUKENTTÄ
 * =====================================================
 */

body.buddypress #buddypress #item-body #bp-nouveau-activity-form {
    margin-bottom: 16px;
}

/*
 * * Varsinaisen #whats-new-formin tyylit tulevat jo yleisestä
 * * Kuukunen composer -osiosta, joten niitä ei määritellä
 * * tässä uudelleen.
 */

/*
 * =====================================================
 * PROFIILIN SUODATINRIVI
 * =====================================================
 */

body.buddypress #buddypress #item-body #subnav-filters {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0;
    margin-bottom: 14px;
    padding: 0;
    border: 0;
    background: transparent;
}

/* RSS-kuvake pois näkyvästä käyttöliittymästä */

body.buddypress #buddypress #item-body #activity-rss-feed {
    display: none;
}

/* Suodatin oikealle */

body.buddypress #buddypress #item-body #comp-filters {
    margin-left: auto;
}

body.buddypress #buddypress #item-body #activity-filter-select {
    margin: 0;
}

body.buddypress #buddypress #item-body #activity-filter-select .select-wrap {
    border: 0;
    background: transparent;
}

body.buddypress #buddypress #item-body #activity-filter-by {
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background-color: #ffffff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}

/*
 * =====================================================
 * PROFIILIN ACTIVITY STREAM
 * =====================================================
 */

body.buddypress #buddypress #item-body #activity-stream {
    margin-top: 0;
}

body.buddypress #buddypress #item-body #activity-stream > ul.activity-list {
    margin: 0;
}

/*
 * * Profiilin kortit käyttävät jo yleisiä
 * * .activity-item-sääntöjä. Varmistetaan vain leveys.
 */

body.buddypress #buddypress #item-body #activity-stream .activity-item {
    width: 100%;
}

/*
 * =====================================================
 * AUTOMAATTISET TAPAHTUMAT PROFIILISSA
 * =====================================================
 */

/*
 * * Kaveruus- ja ryhmätapahtumat ovat BuddyPressissä
 * * .mini-luokan kortteja. Tehdään niistä tavallisia
 * * julkaisuja hieman hillitympiä.
 */

body.buddypress #buddypress #item-body #activity-stream .activity-item.mini {
    padding-top: 14px;
    padding-bottom: 14px;
    background: #fafbfc;
}

body.buddypress #buddypress #item-body #activity-stream .activity-item.mini .activity-avatar img.avatar {
    width: 40px;
    height: 40px;
}

body.buddypress #buddypress #item-body #activity-stream .activity-item.mini .activity-content {
    margin-left: 54px;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 760px) {
    body.buddypress #buddypress #item-body > .bp-screen-title,
    body.buddypress #buddypress #item-body > #bp-nouveau-activity-form,
    body.buddypress #buddypress #item-body > #subnav-filters,
    body.buddypress #buddypress #item-body > #activity-stream {
        max-width: none;
    }

    body.buddypress #buddypress #item-body > .bp-screen-title {
        margin-top: 20px;
        font-size: 18px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIN KAKSIPALSTAINEN SISÄLTÖ
 * =====================================================
 */

.kuukunen-profile-content-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 720px);
    align-items: start;
    justify-content: center;
    gap: 24px;
    width: 100%;
    margin-top: 24px;
}

/* Vasen palsta */

.kuukunen-profile-about {
    position: sticky;
    top: 92px;
}

/* Tietoja-kortti */

.kuukunen-profile-card {
    padding: 20px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.kuukunen-profile-card h3 {
    margin: 0 0 16px;
    color: #1f2937;
    font-size: 18px;
    font-weight: 700;
}

/* Yksittäinen tietorivi */

.kuukunen-profile-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f2;
    color: #374151;
    font-size: 14px;
}

.kuukunen-profile-detail:last-child {
    border-bottom: 0;
}

.kuukunen-profile-detail-label {
    color: #8a919b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.kuukunen-profile-detail strong {
    color: #1f2937;
    font-size: 14px;
    font-weight: 650;
}

/* Oikea julkaisuvirta */

.kuukunen-profile-feed {
    min-width: 0;
}

.kuukunen-profile-feed > .bp-screen-title,
.kuukunen-profile-feed > #bp-nouveau-activity-form,
.kuukunen-profile-feed > #subnav-filters,
.kuukunen-profile-feed > #activity-stream {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Tablet */

@media (max-width: 1000px) {
    .kuukunen-profile-content-layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }
}

/* Mobiili */

@media (max-width: 760px) {
    .kuukunen-profile-content-layout {
        display: block;
        margin-top: 18px;
    }

    .kuukunen-profile-about {
        position: static;
        margin-bottom: 16px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILITIEDOT
 * =====================================================
 */

body.buddypress #buddypress .profile.public {
    max-width: 820px;
    margin: 0 auto;
}

/* Otsikko pois, koska kortilla on oma otsikko */

body.buddypress #buddypress .profile.public > .screen-heading {
    display: none;
}

/* BuddyPressin profiiliryhmä */

body.buddypress #buddypress .profile.public .bp-widget {
    padding: 22px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* "Base" → piilotetaan englanninkielinen ryhmänimi */

body.buddypress #buddypress .profile.public .profile-group-title {
    display: none;
}

/* Taulukko muutetaan normaaliksi blokiksi */

body.buddypress #buddypress .profile.public table.profile-fields,
body.buddypress #buddypress .profile.public table.profile-fields tbody {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
}

/* Jokainen profiilikenttä omaksi osiokseen */

body.buddypress #buddypress .profile.public table.profile-fields tr {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 22px;
    width: 100%;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid #edf0f2;
    background: transparent;
}

body.buddypress #buddypress .profile.public table.profile-fields tr:last-child {
    border-bottom: 0;
}

/* BuddyPressin alt-taustat pois */

body.buddypress #buddypress .profile.public table.profile-fields tr.alt {
    background: transparent;
}

/* Kentän nimi */

body.buddypress #buddypress .profile.public table.profile-fields td.label {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

/* Kentän arvo */

body.buddypress #buddypress .profile.public table.profile-fields td.data {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.6;
}

body.buddypress #buddypress .profile.public table.profile-fields td.data p {
    margin: 0;
}

/* Linkit */

body.buddypress #buddypress .profile.public table.profile-fields td.data a {
    color: #2563eb;
    text-decoration: none;
}

body.buddypress #buddypress .profile.public table.profile-fields td.data a:hover {
    text-decoration: underline;
}

/*
 * =====================================================
 * ENSIMMÄINEN KENTTÄ: NAME
 * =====================================================
 */

/*
 * * BuddyPress pakottaa Name-kentän Base-ryhmään.
 * * Se voidaan pitää näkyvissä, mutta vähän vahvempana.
 */

body.buddypress #buddypress .profile.public tr.field_name td.data {
    font-size: 18px;
    font-weight: 700;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress .profile.public .bp-widget {
        padding: 18px;
    }

    body.buddypress #buddypress .profile.public table.profile-fields tr {
        display: block;
        padding: 14px 0;
    }

    body.buddypress #buddypress .profile.public table.profile-fields td.label {
        margin-bottom: 5px;
        font-size: 12px;
    }

    body.buddypress #buddypress .profile.public table.profile-fields td.data {
        font-size: 14px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIN MUOKKAUS
 * =====================================================
 */

/* Koko muokkausalue */

body.buddypress #buddypress .profile.edit {
    max-width: 820px;
    margin: 0 auto;
}

/* Pääotsikko */

body.buddypress #buddypress .profile.edit .screen-heading {
    margin: 0 0 20px;
    color: #1f2937;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

/* "Muokataan Base-profiilin ryhmää" -tyyppinen otsikko */

body.buddypress #buddypress .profile.edit .bp-widget > h3,
body.buddypress #buddypress .profile.edit .profile-group-title {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

/*
 * =====================================================
 * KENTTÄKORTIT
 * =====================================================
 */

body.buddypress #buddypress .profile.edit fieldset {
    margin: 0 0 16px;
    padding: 20px 22px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Kentän nimi */

body.buddypress #buddypress .profile.edit fieldset > legend {
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

/*
 * =====================================================
 * TEKSTIKENTÄT
 * =====================================================
 */

body.buddypress #buddypress .profile.edit input[type="text"],
body.buddypress #buddypress .profile.edit input[type="url"],
body.buddypress #buddypress .profile.edit input[type="email"],
body.buddypress #buddypress .profile.edit textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #20252d;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: none;
}

body.buddypress #buddypress .profile.edit input:focus,
body.buddypress #buddypress .profile.edit textarea:focus {
    border-color: #9eb8e8;
    outline: 2px solid rgba(37, 99, 235, .10);
    outline-offset: 0;
}

/*
 * =====================================================
 * WORDPRESS-EDITORI
 * =====================================================
 */

body.buddypress #buddypress .profile.edit .wp-editor-wrap {
    margin-top: 4px;
    border-radius: 10px;
    overflow: hidden;
}

body.buddypress #buddypress .profile.edit .wp-editor-container {
    border: 1px solid #dfe3e7;
    background: #ffffff;
    box-shadow: none;
}

body.buddypress #buddypress .profile.edit .wp-editor-tabs {
    margin-bottom: 0;
}

/* Graafinen / Koodi */

body.buddypress #buddypress .profile.edit .wp-switch-editor {
    border: 0;
    background: transparent;
    color: #66707d;
    font-size: 12px;
    font-weight: 600;
}

body.buddypress #buddypress .profile.edit .wp-switch-editor:hover {
    color: #1f2937;
}

body.buddypress #buddypress .profile.edit .tmce-active .switch-tmce,
body.buddypress #buddypress .profile.edit .html-active .switch-html {
    background: #f2f4f6;
    color: #1f2937;
}

/* TinyMCE-toolbar */

body.buddypress #buddypress .profile.edit .mce-toolbar-grp,
body.buddypress #buddypress .profile.edit .quicktags-toolbar {
    border-color: #edf0f2;
    background: #f7f8fa;
}

/*
 * =====================================================
 * NÄKYVYYSASETUKSET
 * =====================================================
 */

body.buddypress #buddypress .field-visibility-settings-toggle {
    margin: 10px 0 0;
    color: #7b8491;
    font-size: 12px;
    line-height: 1.4;
}

body.buddypress #buddypress .field-visibility-settings-toggle
.current-visibility-level {
    color: #4b5563;
    font-weight: 700;
}

/* "Muuta" */

body.buddypress #buddypress .visibility-toggle-link {
    margin-left: 5px;
    padding: 2px 5px;
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

body.buddypress #buddypress .visibility-toggle-link:hover {
    text-decoration: underline;
}

/* Avattu näkyvyysvalikko */

body.buddypress #buddypress .field-visibility-settings {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8f9fb;
}

/*
 * * Sisällä on myös fieldset, mutta emme halua
 * * siitä uutta isoa valkoista korttia.
 */

body.buddypress #buddypress .field-visibility-settings fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.buddypress #buddypress .field-visibility-settings legend {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

body.buddypress #buddypress .field-visibility-settings .radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body.buddypress #buddypress .field-visibility-settings label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #374151;
    font-size: 13px;
}

body.buddypress #buddypress .field-visibility-settings input[type="radio"] {
    margin: 0;
}

/* Sulje */

body.buddypress #buddypress .field-visibility-settings-close {
    margin-top: 12px;
    border: 0;
    border-radius: 8px;
    background: #e9edf2;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
}

/*
 * =====================================================
 * TALLENNA
 * =====================================================
 */

body.buddypress #buddypress .profile.edit input[type="submit"],
body.buddypress #buddypress .profile.edit button[type="submit"] {
    min-height: 42px;
    padding: 9px 18px;
    border: 0;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress .profile.edit fieldset {
        padding: 16px;
    }

    body.buddypress #buddypress .profile.edit .screen-heading {
        font-size: 20px;
    }
}

/*
 * =====================================================
 * PROFIILIN MUOKKAUS – KENTTIEN OTSIKOT KUNTOON
 * =====================================================
 */

/* Varsinainen kenttäkortti */

body.buddypress #buddypress .profile.edit .editfield > fieldset {
    position: relative;
}

/*
 * =====================================================
 * PROFIILIN MUOKKAUS – KORJATTU KENTTÄRAKENNE
 * =====================================================
 */

/* Kortti tehdään editfield-wrapperista */

body.buddypress #buddypress .profile.edit .editfield {
    display: block;
    margin: 0 0 16px;
    padding: 20px 22px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/*
 * * Fieldset ei enää piirrä kortin reunaa.
 * * Näin legend ei pääse "leikkaamaan" reunaviivaa.
 */

body.buddypress #buddypress .profile.edit .editfield > fieldset {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Kentän otsikko */

body.buddypress #buddypress .profile.edit .editfield > fieldset > legend {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    float: none;
}

/* Pakollisuusmerkintä */

body.buddypress #buddypress .profile.edit .bp-required-field-label {
    color: #8a919b;
    font-size: 12px;
    font-weight: 500;
}

/* Tavalliset inputit */

body.buddypress #buddypress .profile.edit .editfield input[type="text"],
body.buddypress #buddypress .profile.edit .editfield input[type="url"],
body.buddypress #buddypress .profile.edit .editfield input[type="email"] {
    display: block;
    width: 100%;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #20252d;
    box-shadow: none;
}

/* Näkyvyystieto */

body.buddypress #buddypress .profile.edit
.editfield .field-visibility-settings-header {
    margin: 9px 0 0;
    color: #7b8491;
    font-size: 12px;
    line-height: 1.4;
}

/* Avattu näkyvyysasetus ei saa uutta korttia */

body.buddypress #buddypress .profile.edit
.editfield .field-visibility-settings fieldset {
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – PROFIILIKUVAN HALLINTA
 * =====================================================
 */

/* Koko avatar-alue */

body.buddypress #buddypress .bp-avatar {
    margin-top: 14px;
}

/*
 * =====================================================
 * AVATAR-VÄLILEHDET
 * =====================================================
 */

body.buddypress #buddypress .bp-avatar-nav {
    margin: 0 0 14px;
}

body.buddypress #buddypress .bp-avatar-nav ul.avatar-nav-items {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px;
    list-style: none;
    border-radius: 11px;
    background: #f5f6f8;
}

body.buddypress #buddypress .bp-avatar-nav li.avatar-nav-item {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress .bp-avatar-nav a.bp-avatar-nav-item {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.buddypress #buddypress .bp-avatar-nav a.bp-avatar-nav-item:hover {
    background: #ffffff;
    color: #1f2937;
}

body.buddypress #buddypress .bp-avatar-nav li.current > a,
body.buddypress #buddypress .bp-avatar-nav li.selected > a {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/*
 * =====================================================
 * LATAUSKORTTI
 * =====================================================
 */

body.buddypress #buddypress .bp-uploader-window {
    margin: 0;
}

body.buddypress #buddypress #bp-upload-ui {
    position: relative;
    margin: 0;
}

body.buddypress #buddypress #drag-drop-area {
    position: relative;
    min-height: 220px;
    border: 2px dashed #d7dce2;
    border-radius: 14px;
    background: #fafbfc;
    transition: border-color .15s ease,
        background-color .15s ease;
}

body.buddypress #buddypress #drag-drop-area:hover {
    border-color: #b9c1ca;
    background: #f7f8fa;
}

/* Sisältö keskelle */

body.buddypress #buddypress .drag-drop-inside {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 216px;
    padding: 30px 24px;
    text-align: center;
}

/* Kuvake */

body.buddypress #buddypress .drag-drop-inside::before {
    content: "";
    display: block;
    width: 38px;
    height: 38px;
    margin-bottom: 3px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369717d' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8.5' cy='9' r='1.5'/%3E%3Cpath d='m21 15-5-5L5 20'/%3E%3C/svg%3E")
        center / contain no-repeat;
}

/* "Pudota tiedosto tähän" */

body.buddypress #buddypress .drag-drop-info {
    margin: 0;
    color: #374151;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
}

/* Painikerivi */

body.buddypress #buddypress .drag-drop-buttons {
    margin: 0;
}

/* Valitse tiedostosi */

body.buddypress #buddypress #bp-browse-button {
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #d6dbe1;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    font-size: 14px;
    font-weight: 650;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    cursor: pointer;
}

body.buddypress #buddypress #bp-browse-button:hover {
    background: #f6f7f9;
    border-color: #c7cdd4;
}

/*
 * =====================================================
 * VAROITUKSET / INFOT
 * =====================================================
 */

body.buddypress #buddypress .bp-avatar-status {
    margin-top: 14px;
}

body.buddypress #buddypress .bp-avatar-status .warning,
body.buddypress #buddypress #bp-webcam-message .warning,
body.buddypress #buddypress .avatar-history-actions .warning {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e8dfaa;
    border-radius: 9px;
    background: #fffbea;
    color: #665c27;
    font-size: 13px;
    line-height: 1.5;
}

/*
 * =====================================================
 * RAJAUS
 * =====================================================
 */

body.buddypress #buddypress #avatar-to-crop {
    margin-bottom: 18px;
}

body.buddypress #buddypress #avatar-to-crop img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

body.buddypress #buddypress .avatar-crop-management {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 18px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background: #ffffff;
}

body.buddypress #buddypress #avatar-crop-pane {
    overflow: hidden;
    border-radius: 50%;
}

body.buddypress #buddypress #avatar-crop-actions {
    display: flex;
    align-items: center;
}

body.buddypress #buddypress .avatar-crop-submit,
body.buddypress #buddypress .avatar-webcam-capture,
body.buddypress #buddypress .avatar-webcam-save {
    min-height: 40px;
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/*
 * =====================================================
 * POISTO
 * =====================================================
 */

body.buddypress #buddypress #bp-delete-avatar {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid #efc7c3;
    border-radius: 9px;
    background: #fff5f4;
    color: #a3261e;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress #bp-delete-avatar:hover {
    background: #ffeceb;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress .bp-avatar-nav ul.avatar-nav-items {
        overflow-x: auto;
    }

    body.buddypress #buddypress .bp-avatar-nav a.bp-avatar-nav-item {
        white-space: nowrap;
    }

    body.buddypress #buddypress #drag-drop-area {
        min-height: 190px;
    }

    body.buddypress #buddypress .drag-drop-inside {
        min-height: 186px;
        padding: 24px 18px;
    }

    body.buddypress #buddypress .avatar-crop-management {
        display: block;
    }

    body.buddypress #buddypress #avatar-crop-actions {
        margin-top: 14px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – KANSIKUVAN HALLINTA
 * =====================================================
 */

body.buddypress #buddypress .profile.change-cover-image {
    max-width: 820px;
    margin: 0 auto;
}

/* Otsikko */

body.buddypress #buddypress .profile.change-cover-image
.screen-heading {
    margin: 0 0 18px;
    color: #1f2937;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

/*
 * =====================================================
 * INFO-VIESTI
 * =====================================================
 */

body.buddypress #buddypress .profile.change-cover-image
.bp-feedback.info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
    background: #f5f9ff;
    color: #4b6078;
    font-size: 13px;
    line-height: 1.5;
}

body.buddypress #buddypress .profile.change-cover-image
.bp-feedback.info .bp-icon {
    flex: 0 0 22px;
}

/*
 * =====================================================
 * UPLOADER
 * =====================================================
 */

/*
 * * Profiilikuvan uploaderille tekemämme
 * * #drag-drop-area- ja .drag-drop-inside-säännöt
 * * toimivat myös tässä.
 */

body.buddypress #buddypress .bp-cover-image {
    margin-top: 0;
}

body.buddypress #buddypress .bp-cover-image .bp-uploader-window {
    margin: 0;
}

/*
 * =====================================================
 * SUOSITELTU KUVAKOKO
 * =====================================================
 */

body.buddypress #buddypress .bp-cover-image-status {
    margin-top: 14px;
}

body.buddypress #buddypress .bp-cover-image-status .warning {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e6dfaa;
    border-radius: 9px;
    background: #fffbea;
    color: #665c27;
    font-size: 13px;
    line-height: 1.5;
}

/*
 * =====================================================
 * KANSIKUVAN POISTO
 * =====================================================
 */

body.buddypress #buddypress .bp-cover-image-manage {
    margin-top: 18px;
}

body.buddypress #buddypress #bp-delete-cover-image-container {
    padding: 16px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background: #ffffff;
}

body.buddypress #buddypress #bp-delete-cover-image-container p {
    margin: 0 0 12px;
    color: #66707d;
    font-size: 13px;
    line-height: 1.5;
}

body.buddypress #buddypress #bp-delete-cover-image {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid #efc7c3;
    border-radius: 9px;
    background: #fff5f4;
    color: #a3261e;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress #bp-delete-cover-image:hover {
    background: #ffeceb;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress .profile.change-cover-image
    .screen-heading {
        font-size: 20px;
    }

    body.buddypress #buddypress #bp-delete-cover-image-container {
        padding: 14px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – YSTÄVÄT
 * =====================================================
 */

/* Ystäväsivun sisältö */

body.buddypress #buddypress .members.friends {
    max-width: 920px;
    margin: 0 auto;
}

/*
 * =====================================================
 * SUODATIN
 * =====================================================
 */

body.buddypress #buddypress .friends + * {
    box-sizing: border-box;
}

body.buddypress #buddypress #members-friends-select {
    margin: 0;
}

body.buddypress #buddypress #members-friends {
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}

/*
 * =====================================================
 * PAGINAATION TEKSTI
 * =====================================================
 */

body.buddypress #buddypress .members.friends .bp-pagination {
    margin: 14px 0;
}

body.buddypress #buddypress .members.friends .pag-data {
    margin: 0;
    color: #8a919b;
    font-size: 12px;
}

/* Alareunan saman tekstin voi piilottaa */

body.buddypress #buddypress .members.friends
.bp-pagination.bottom .pag-count {
    display: none;
}

/*
 * =====================================================
 * YSTÄVÄLISTA
 * =====================================================
 */

body.buddypress #buddypress #members-list.members-friends-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Yksittäinen ystäväkortti */

body.buddypress #buddypress
#members-list.members-friends-list
li.bp-single-member {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress
#members-list.members-friends-list
li.bp-single-member > .list-wrap {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 18px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/*
 * =====================================================
 * AVATAR
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-friends-list
.item-avatar {
    width: 82px;
}

body.buddypress #buddypress
#members-list.members-friends-list
.item-avatar a {
    display: block;
}

body.buddypress #buddypress
#members-list.members-friends-list
.item-avatar img.avatar {
    display: block;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
}

/*
 * =====================================================
 * KÄYTTÄJÄTIEDOT
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-friends-list
.item {
    min-width: 0;
}

body.buddypress #buddypress
#members-list.members-friends-list
.item-block {
    position: relative;
    padding-right: 140px;
}

body.buddypress #buddypress
#members-list.members-friends-list
.member-name {
    margin: 2px 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

body.buddypress #buddypress
#members-list.members-friends-list
.member-name a {
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
}

body.buddypress #buddypress
#members-list.members-friends-list
.member-name a:hover {
    color: #2563eb;
}

body.buddypress #buddypress
#members-list.members-friends-list
.last-activity {
    margin: 0;
    color: #8a919b;
    font-size: 12px;
}

/*
 * =====================================================
 * POISTA YSTÄVÄ
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-friends-list
.friends-meta {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress
#members-list.members-friends-list
.friendship-button button {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background: #ffffff;
    color: #5f6875;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#members-list.members-friends-list
.friendship-button button:hover {
    border-color: #efc7c3;
    background: #fff5f4;
    color: #a3261e;
}

/*
 * =====================================================
 * VIIMEISIN PÄIVITYS
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-friends-list
.user-update {
    margin-top: 14px;
}

body.buddypress #buddypress
#members-list.members-friends-list
.user-update .update {
    margin: 0;
    padding: 11px 13px;
    border-radius: 10px;
    background: #f6f7f9;
    color: #4b5563;
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    #members-list.members-friends-list
    li.bp-single-member > .list-wrap {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    body.buddypress #buddypress
    #members-list.members-friends-list
    .item-avatar {
        width: 58px;
    }

    body.buddypress #buddypress
    #members-list.members-friends-list
    .item-avatar img.avatar {
        width: 58px;
        height: 58px;
    }

    body.buddypress #buddypress
    #members-list.members-friends-list
    .item-block {
        padding-right: 0;
    }

    body.buddypress #buddypress
    #members-list.members-friends-list
    .friends-meta {
        position: static;
        margin-top: 10px;
    }

    body.buddypress #buddypress
    #members-list.members-friends-list
    .member-name {
        font-size: 16px;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – YSTÄVYYSPYYNNÖT
 * =====================================================
 */

/* Suodatinalue */

body.buddypress #buddypress
#item-body #subnav-filters {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 18px 0 22px;
    padding: 0;
}

/* Select */

body.buddypress #buddypress
#item-body #subnav-filters .select-wrap {
    position: relative;
    min-width: 180px;
}

body.buddypress #buddypress
#item-body #subnav-filters select {
    width: 100%;
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}

/*
 * =====================================================
 * OTSIKKO
 * =====================================================
 */

body.buddypress #buddypress
.friendship-requests-screen {
    margin: 0 0 14px;
    color: #1f2937;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

/*
 * =====================================================
 * EI YSTÄVYYS­PYYNTÖJÄ
 * =====================================================
 */

body.buddypress #buddypress
[data-bp-list="friendship_requests"]
.bp-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #e6e9ed;
    border-radius: 12px;
    background: #f7f8fa;
    box-shadow: none;
}

/* BuddyPressin sininen oletuspalkki pois */

body.buddypress #buddypress
[data-bp-list="friendship_requests"]
.bp-feedback .bp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8eef7;
}

/* Ilmoitusteksti */

body.buddypress #buddypress
[data-bp-list="friendship_requests"]
.bp-feedback p {
    margin: 0;
    color: #626b78;
    font-size: 13px;
    line-height: 1.45;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    #item-body #subnav-filters {
        justify-content: stretch;
        margin: 14px 0 18px;
    }

    body.buddypress #buddypress
    #item-body #subnav-filters .select-wrap {
        width: 100%;
    }

    body.buddypress #buddypress
    .friendship-requests-screen {
        font-size: 18px;
    }
}

/*
 * =====================================================
 * YSTÄVYYSPYYNNÖT – TURHA SUODATIN POIS
 * =====================================================
 */

/* Piilotetaan lajittelu vain Pyynnöt-näkymässä */

body.buddypress #buddypress
#requests-personal-li.current.selected
~ * {
    /* ei käytetä tähän mitään yleistä */
}

/*
 * Varsinainen ratkaisu: kun Pyynnöt on aktiivinen,
 * piilotetaan friend_requests-suodatin
 */

body.buddypress #buddypress
select[data-bp-filter="friend_requests"] {
    display: none;
}

/* Piilotetaan myös sen wrapperi, ettei tyhjää tilaa jää */

body.buddypress #buddypress
#dir-filters:has(select[data-bp-filter="friend_requests"]) {
    display: none;
}

/* Kun wrapper on piilossa, suodatinriville ei tarvita tilaa */

body.buddypress #buddypress
#subnav-filters:has(select[data-bp-filter="friend_requests"]) {
    display: none;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – YSTÄVYYSPYYNTÖKORTIT
 * =====================================================
 */

body.buddypress #buddypress
#friend-list.friends-request-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Yksittäinen pyyntö */

body.buddypress #buddypress
#friend-list.friends-request-list
li.item-entry {
    gap: 16px;
    margin: 0;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Avatar */

body.buddypress #buddypress
#friend-list.friends-request-list
.item-avatar {
    width: 72px;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.item-avatar img.avatar {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

/* Käyttäjän tiedot */

body.buddypress #buddypress
#friend-list.friends-request-list
.item {
    min-width: 0;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.item-title {
    margin: 0 0 4px;
    font-size: 17px;
    line-height: 1.3;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.item-title a {
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.item-title a:hover {
    color: #2563eb;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.item-meta {
    margin: 0;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.item-meta .activity {
    color: #8a919b;
    font-size: 12px;
}

/*
 * =====================================================
 * HYVÄKSY / HYLKÄÄ
 * =====================================================
 */

body.buddypress #buddypress
#friend-list.friends-request-list
.friends-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

body.buddypress #buddypress
#friend-list.friends-request-list
.generic-button {
    margin: 0;
}

/* Hyväksy */

body.buddypress #buddypress
#friend-list.friends-request-list
button.accept {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#friend-list.friends-request-list
button.accept:hover {
    background: #1d4ed8;
}

/* Hylkää */

body.buddypress #buddypress
#friend-list.friends-request-list
button.reject {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #5f6875;
    font-size: 13px;
    font-weight: 650;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#friend-list.friends-request-list
button.reject:hover {
    border-color: #efc7c3;
    background: #fff5f4;
    color: #a3261e;
}

/*
 * =====================================================
 * ONLINE-TILA
 * =====================================================
 */

/*
 * * BuddyPress lisää is-online-luokan.
 * * Näytetään pieni vihreä piste avatarin yhteydessä.
 */

body.buddypress #buddypress
#friend-list.friends-request-list
li.is-online .item-avatar {
    position: relative;
}

body.buddypress #buddypress
#friend-list.friends-request-list
li.is-online .item-avatar::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 13px;
    height: 13px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #22c55e;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    #friend-list.friends-request-list
    li.item-entry {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    body.buddypress #buddypress
    #friend-list.friends-request-list
    .item-avatar {
        width: 56px;
    }

    body.buddypress #buddypress
    #friend-list.friends-request-list
    .item-avatar img.avatar {
        width: 56px;
        height: 56px;
    }

    body.buddypress #buddypress
    #friend-list.friends-request-list
    .friends-meta {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: 4px;
    }
}

/*
 * =====================================================
 * FIX – YSTÄVYYSPYYNTÖJEN KORTTI
 * =====================================================
 */

body.buddypress #buddypress
#friend-list.friends-request-list
li.item-entry {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) auto !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    column-gap: 16px !important;
    padding: 16px 18px !important;
}

/* Avatar varmasti ensimmäiseen sarakkeeseen */

body.buddypress #buddypress
#friend-list.friends-request-list
li.item-entry > .item-avatar {
    grid-column: 1 !important;
    grid-row: 1 !important;
    float: none !important;
    width: 72px !important;
    margin: 0 !important;
}

/* Nimi + aktiivisuus keskelle */

body.buddypress #buddypress
#friend-list.friends-request-list
li.item-entry > .item {
    grid-column: 2 !important;
    grid-row: 1 !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

/* Napit oikeaan reunaan */

body.buddypress #buddypress
#friend-list.friends-request-list
li.item-entry > .friends-meta {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    float: none !important;
    position: static !important;
    width: auto !important;
    min-width: max-content !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 8px !important;
}

/* BuddyPressin nappikääreet */

body.buddypress #buddypress
#friend-list.friends-request-list
.friends-meta .generic-button {
    display: block !important;
    float: none !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}

/* Molemmat napit – estetään tekstin rivittyminen */

body.buddypress #buddypress
#friend-list.friends-request-list
.friends-meta button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: max-content !important;
    height: 38px !important;
    padding: 0 14px !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    line-height: 1 !important;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – VIESTIT
 * =====================================================
 */

body.buddypress #buddypress .bp-messages-content {
    margin-top: 14px;
}

/*
 * =====================================================
 * VIESTIEN HAKU / MASSATOIMINNOT
 * =====================================================
 */

body.buddypress #buddypress #subsubnav {
    margin: 16px 0 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress #subsubnav > ul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress .user-messages-search {
    order: 2;
    flex: 0 1 320px;
    margin-left: auto;
}

body.buddypress #buddypress .user-messages-bulk-actions {
    order: 1;
}

/* Haku */

body.buddypress #buddypress .bp-messages-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

body.buddypress #buddypress #user_messages_search {
    width: 100%;
    height: 40px;
    padding: 0 42px 0 14px;
    border: 1px solid #dfe3e7;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    box-shadow: none;
}

body.buddypress #buddypress #user_messages_search:focus {
    border-color: #9eb8e8;
    outline: 2px solid rgba(37,99,235,.10);
}

body.buddypress #buddypress #user_messages_search_submit {
    position: absolute;
    right: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #69717d;
    cursor: pointer;
}

body.buddypress #buddypress #user_messages_search_submit:hover {
    background: #f2f4f6;
}

/* Kaikki viestit */

body.buddypress #buddypress .user-messages-bulk-actions > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.buddypress #buddypress .user-messages-bulk-actions label {
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
}

/*
 * =====================================================
 * INFO-VIESTI
 * =====================================================
 */

body.buddypress #buddypress .bp-messages-feedback {
    margin-bottom: 14px;
}

body.buddypress #buddypress .bp-messages-feedback .bp-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #e5e9ee;
    border-radius: 10px;
    background: #f7f8fa;
    box-shadow: none;
}

body.buddypress #buddypress .bp-messages-feedback .bp-feedback p {
    margin: 0;
    color: #626b78;
    font-size: 13px;
    line-height: 1.45;
}

/*
 * =====================================================
 * VIESTIKETJULISTA
 * =====================================================
 */

body.buddypress #buddypress #message-threads {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress #message-threads .thread-item {
    display: grid;
    grid-template-columns: 24px 170px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color .15s ease,
        background-color .15s ease,
        box-shadow .15s ease;
}

body.buddypress #buddypress #message-threads .thread-item:hover {
    border-color: #d9dee4;
    background: #fafbfc;
}

body.buddypress #buddypress #message-threads .thread-item.selected {
    border-color: #cfdcf4;
    background: #f7faff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Lähettäjä */

body.buddypress #buddypress #message-threads .thread-from {
    min-width: 0;
}

body.buddypress #buddypress #message-threads .user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none;
}

body.buddypress #buddypress #message-threads .user-link img.avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

body.buddypress #buddypress #message-threads .user-name {
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Viestin otsikko ja ote */

body.buddypress #buddypress #message-threads .thread-content {
    min-width: 0;
}

body.buddypress #buddypress #message-threads .thread-subject {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}

body.buddypress #buddypress #message-threads .thread-subject .subject {
    overflow: hidden;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.buddypress #buddypress #message-threads .thread-count {
    color: #8a919b;
    font-size: 12px;
}

body.buddypress #buddypress #message-threads .excerpt {
    margin: 0;
    overflow: hidden;
    color: #737b86;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Aika */

body.buddypress #buddypress #message-threads .thread-date {
    color: #8a919b;
    font-size: 12px;
}

/*
 * =====================================================
 * KESKUSTELUN ESIKATSELU
 * =====================================================
 */

body.buddypress #buddypress #thread-preview {
    overflow: hidden;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

body.buddypress #buddypress #thread-preview .preview-thread-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f2;
    background: #f7f8fa;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
}

body.buddypress #buddypress #thread-preview .messages-title {
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
}

/* Header esikatselussa */

body.buddypress #buddypress #thread-preview .preview-pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f2;
}

body.buddypress #buddypress #thread-preview .thread-participants {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

body.buddypress #buddypress #thread-preview .thread-participants dt {
    color: #4b5563;
    font-size: 13px;
    font-weight: 700;
}

body.buddypress #buddypress #thread-preview .thread-participants dd {
    margin: 0;
}

body.buddypress #buddypress #thread-preview .participants-list {
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress #thread-preview .participants-list img.avatar {
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Toimintokuvakkeet */

body.buddypress #buddypress #thread-preview .actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.buddypress #buddypress #thread-preview .actions > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #68717e;
    text-decoration: none;
    cursor: pointer;
}

body.buddypress #buddypress #thread-preview .actions > *:hover {
    background: #f2f4f6;
}

/* Viestin teksti */

body.buddypress #buddypress #thread-preview .preview-message {
    padding: 18px 16px;
}

body.buddypress #buddypress #thread-preview .preview-message p {
    margin: 0;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.6;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 760px) {
    body.buddypress #buddypress #subsubnav > ul {
        display: block;
    }

    body.buddypress #buddypress .user-messages-search {
        margin-top: 12px;
    }

    body.buddypress #buddypress #message-threads .thread-item {
        grid-template-columns: 22px 48px minmax(0,1fr);
    }

    body.buddypress #buddypress #message-threads .thread-from {
        grid-column: 2;
    }

    body.buddypress #buddypress #message-threads .user-name {
        display: none;
    }

    body.buddypress #buddypress #message-threads .thread-content {
        grid-column: 3;
    }

    body.buddypress #buddypress #message-threads .thread-date {
        grid-column: 3;
        margin-top: -5px;
    }

    body.buddypress #buddypress #thread-preview .preview-pane-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

/*
 * =========================================================
 * KUUKUNEN – YKSITTÄINEN VIESTIKESKUSTELU
 * =========================================================
 */

/* Keskustelun otsikko */

#bp-message-thread-header {
    margin: 24px 0 28px;
}

#bp-message-thread-header .single-thread-title {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 700;
    color: #172033;
}

/* Osallistujat */

#bp-message-thread-header .single-message-thread-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#bp-message-thread-header .thread-participants {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

#bp-message-thread-header .thread-participants dt {
    font-weight: 600;
    color: #64748b;
}

#bp-message-thread-header .thread-participants dd {
    margin: 0;
}

#bp-message-thread-header .participants-list {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

#bp-message-thread-header .participants-list li {
    margin-left: -6px;
}

#bp-message-thread-header .participants-list li:first-child {
    margin-left: 0;
}

#bp-message-thread-header .participants-list img.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

/*
 * =========================================================
 * VIESTIT
 * =========================================================
 */

#bp-message-thread-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

#bp-message-thread-list > li {
    position: relative;
    margin: 0 0 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* Viestin ylärivi */

#bp-message-thread-list .message-metadata {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
}

#bp-message-thread-list .message-metadata .user-link {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

#bp-message-thread-list .message-metadata img.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

#bp-message-thread-list .message-metadata strong {
    font-size: 15px;
    font-weight: 700;
    color: #172033;
}

/* Aikaleima */

#bp-message-thread-list .message-metadata .activity {
    font-size: 12px;
    color: #94a3b8;
}

/* Tähtipainike oikealle */

#bp-message-thread-list .message-metadata .actions {
    margin-left: auto;
}

/* Varsinainen viestikupla */

#bp-message-thread-list > li > .message-content {
    width: fit-content;
    margin: 0 0 0 51px;
    color: #334155;
    line-height: 1.55;
}

#bp-message-thread-list > li > .message-content p {
    margin: 0;
}

/*
 * =========================================================
 * VASTAUSALUE
 * =========================================================
 */

#send-reply .message-box {
    padding: 20px;
}

/* Vastaa + oma avatar */

#send-reply .message-metadata {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
}

#send-reply .avatar-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

#send-reply .avatar-box img.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

#send-reply .avatar-box strong {
    font-size: 16px;
    color: #172033;
}

/* Editorin ympäristö */

#send-reply .message-content {
    margin: 0;
}

#send-reply .wp-editor-container {
    overflow: hidden;
    border: 1px solid #dbe1e8 !important;
    border-radius: 10px;
    background: #fff;
}

/* TinyMCE:n työkalupalkki */

#send-reply .mce-toolbar-grp {
    border: 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: #f8fafc !important;
}

/* Editorista hieman matalampi */

#send-reply .mce-edit-area iframe {
    min-height: 150px !important;
    height: 150px !important;
}

/* Lähetyspainike */

#send-reply .submit {
    margin-top: 14px;
}

#send_reply_button {
    appearance: none;
    border: 0 !important;
    min-height: 40px;
    background: #2563eb !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer;
    box-shadow: none !important;
    transition: background .15s ease, transform .15s ease;
}

#send_reply_button:hover {
    background: #1d4ed8 !important;
}

#send_reply_button:active {
    transform: translateY(1px);
}

/*
 * =========================================================
 * MOBIILI
 * =========================================================
 */

@media (max-width: 700px) {
    #bp-message-thread-header {
        padding: 16px;
    }

    #bp-message-thread-header .single-message-thread-header {
        align-items: flex-start;
    }

    #bp-message-thread-list > li {
        padding: 15px;
    }

    #bp-message-thread-list > li > .message-content {
        max-width: calc(100% - 30px);
        margin-left: 0;
    }

    #bp-message-thread-list .message-metadata {
        flex-wrap: wrap;
    }

    #bp-message-thread-list .message-metadata .actions {
        margin-left: auto;
    }

    #send-reply .message-box {
        padding: 15px;
    }
}

/*
 * =========================================================
 * KUUKUNEN – VIESTIKESKUSTELUN VIIMEISTELY
 * =========================================================
 */

/* Keskustelun yläkortti */

#bp-message-thread-header {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    padding: 18px 20px !important;
}

/* BuddyPressin harmaa otsikkopalkki pois */

#bp-message-thread-header .message-title,
#bp-message-thread-header .single-thread-title {
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
    font-size: 21px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
    color: #172033 !important;
}

/* Osallistujat siistimmäksi */

#bp-message-thread-header .single-message-thread-header {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

#bp-message-thread-header .thread-participants {
    padding: 0 !important;
}

#bp-message-thread-header .thread-participants dt {
    font-size: 13px !important;
}

/* Viestikortti */

#bp-message-thread-list > li {
    padding: 16px 18px 18px !important;
}

/* Viestin metadata */

#bp-message-thread-list .message-metadata {
    border-bottom: 1px solid #eef1f5 !important;
    padding-bottom: 11px !important;
    margin-bottom: 14px !important;
}

/* Itse viestikupla lähemmäksi lähettäjää */

#bp-message-thread-list > li > .message-content {
    margin-left: 52px !important;
    max-width: 72% !important;
    padding: 12px 16px !important;
    background: #f1f5f9 !important;
    border-radius: 5px 14px 14px 14px !important;
}

/* Vastausalue hieman irti viestistä */

#send-reply {
    margin-top: 32px !important;
}

/* Vastauskortti */

#send-reply .message-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

/* Lähetä vastaus -painike */

#send_reply_button {
    padding: 11px 18px !important;
    border-radius: 8px !important;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – ILMOITUKSET
 * =====================================================
 */

/* Koko taulukko pois taulukkomaisesta ulkoasusta */

body.buddypress #buddypress table.notifications {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Otsikkorivi piiloon */

body.buddypress #buddypress table.notifications thead {
    display: none;
}

/* Tbody korttilistaksi */

body.buddypress #buddypress table.notifications tbody {
    display: grid;
    gap: 12px;
    width: 100%;
}

/* Yksittäinen ilmoitus */

body.buddypress #buddypress table.notifications tbody tr {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Ensimmäinen tyhjä solu pois */

body.buddypress #buddypress table.notifications tbody tr > td:first-child {
    display: none;
}

/* Kaikki solut tavallisiksi blokeiksi */

body.buddypress #buddypress table.notifications tbody td {
    display: block;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

/*
 * =====================================================
 * VALINTARUUTU
 * =====================================================
 */

body.buddypress #buddypress table.notifications .bulk-select-check {
    grid-column: 1;
}

body.buddypress #buddypress table.notifications .notification-check {
    margin: 0;
}

/*
 * =====================================================
 * ILMOITUSTEKSTI
 * =====================================================
 */

body.buddypress #buddypress table.notifications .notification-description {
    grid-column: 2;
    min-width: 0;
}

body.buddypress #buddypress table.notifications .notification-description a {
    color: #1f2937;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
    text-decoration: none;
}

body.buddypress #buddypress table.notifications .notification-description a:hover {
    color: #2563eb;
}

/*
 * =====================================================
 * AIKA
 * =====================================================
 */

body.buddypress #buddypress table.notifications .notification-since {
    grid-column: 3;
    color: #8a919b;
    font-size: 12px;
    white-space: nowrap;
}

/*
 * =====================================================
 * TOIMINNOT
 * =====================================================
 */

body.buddypress #buddypress table.notifications .notification-actions {
    grid-column: 4;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

/* BuddyPressin välissä oleva | pois */

body.buddypress #buddypress table.notifications .notification-actions {
    font-size: 0;
}

body.buddypress #buddypress table.notifications .notification-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    border-radius: 8px;
    color: #68717e;
    font-size: 16px;
    text-decoration: none;
}

body.buddypress #buddypress table.notifications .notification-actions a:hover {
    background: #f2f4f6;
}

body.buddypress #buddypress table.notifications .notification-actions a.delete:hover {
    background: #fff1f0;
    color: #b42318;
}

/*
 * =====================================================
 * LUKEMATTOMAT ILMOITUKSET
 * =====================================================
 */

/*
 * * BuddyPress lisää joissakin näkymissä unread-luokan.
 * * Jos se löytyy, kortti saa kevyen korostuksen.
 */

body.buddypress #buddypress table.notifications tr.unread {
    border-color: #cfe0ff;
    background: #f7faff;
}

/*
 * =====================================================
 * MASSATOIMINNOT
 * =====================================================
 */

body.buddypress #buddypress .notifications-options-nav {
    margin-top: 16px;
}

body.buddypress #buddypress .notifications-options-nav select {
    min-height: 38px;
    padding: 7px 34px 7px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    font-size: 13px;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress table.notifications tbody tr {
        grid-template-columns: 22px minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px;
    }

    body.buddypress #buddypress table.notifications .bulk-select-check {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    body.buddypress #buddypress table.notifications .notification-description {
        grid-column: 2;
        grid-row: 1;
    }

    body.buddypress #buddypress table.notifications .notification-since {
        grid-column: 2;
        grid-row: 2;
        white-space: normal;
    }

    body.buddypress #buddypress table.notifications .notification-actions {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – RYHMÄLISTA
 * =====================================================
 */

body.buddypress #buddypress
.groups-list,
body.buddypress #buddypress
.item-list.groups-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Yksittäinen ryhmäkortti */

body.buddypress #buddypress
li.bp-single-group {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress
li.bp-single-group > .list-wrap {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    padding: 18px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/*
 * =====================================================
 * RYHMÄN KUVA
 * =====================================================
 */

body.buddypress #buddypress
li.bp-single-group .item-avatar {
    width: 82px;
    margin: 0;
}

body.buddypress #buddypress
li.bp-single-group .item-avatar a {
    display: block;
}

body.buddypress #buddypress
li.bp-single-group .item-avatar img.avatar {
    display: block;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    object-fit: cover;
}

/*
 * =====================================================
 * RYHMÄN TIEDOT
 * =====================================================
 */

body.buddypress #buddypress
li.bp-single-group .item {
    min-width: 0;
}

body.buddypress #buddypress
li.bp-single-group .item-block {
    position: relative;
    padding-right: 130px;
}

body.buddypress #buddypress
li.bp-single-group .groups-title {
    margin: 1px 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

body.buddypress #buddypress
li.bp-single-group .groups-title a {
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
}

body.buddypress #buddypress
li.bp-single-group .groups-title a:hover {
    color: #2563eb;
}

/* Julkinen ryhmä / jäsenmäärä */

body.buddypress #buddypress
li.bp-single-group .group-details {
    margin: 0 0 3px;
    color: #66707d;
    font-size: 12px;
}

/* Viimeisin aktiivisuus */

body.buddypress #buddypress
li.bp-single-group .last-activity {
    margin: 0;
    color: #8a919b;
    font-size: 12px;
}

/*
 * =====================================================
 * KUVAUS
 * =====================================================
 */

body.buddypress #buddypress
li.bp-single-group .group-desc {
    margin-top: 13px;
}

body.buddypress #buddypress
li.bp-single-group .group-desc p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f6f7f9;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.5;
}

/* BuddyPressin mahdolliset tyhjät p:t pois */

body.buddypress #buddypress
li.bp-single-group .group-desc p:empty {
    display: none;
}

/*
 * =====================================================
 * EROA RYHMÄSTÄ
 * =====================================================
 */

body.buddypress #buddypress
li.bp-single-group .groups-meta {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
}

body.buddypress #buddypress
li.bp-single-group .groups-meta .generic-button {
    margin: 0;
}

body.buddypress #buddypress
li.bp-single-group .leave-group {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background: #ffffff;
    color: #5f6875;
    font-size: 12px;
    font-weight: 600;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
li.bp-single-group .leave-group:hover {
    border-color: #efc7c3;
    background: #fff5f4;
    color: #a3261e;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    li.bp-single-group > .list-wrap {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    body.buddypress #buddypress
    li.bp-single-group .item-avatar {
        width: 58px;
    }

    body.buddypress #buddypress
    li.bp-single-group .item-avatar img.avatar {
        width: 58px;
        height: 58px;
    }

    body.buddypress #buddypress
    li.bp-single-group .item-block {
        padding-right: 0;
    }

    body.buddypress #buddypress
    li.bp-single-group .groups-meta {
        position: static;
        margin-top: 10px;
    }

    body.buddypress #buddypress
    li.bp-single-group .groups-title {
        font-size: 16px;
    }
}

/* Ryhmäkortin sisäinen rakenne */

body.buddypress #buddypress
li.bp-single-group .list-wrap > .item {
    display: block !important;
    width: auto !important;
}

/* Ryhmän tiedot */

body.buddypress #buddypress
li.bp-single-group .item-block {
    width: 100%;
}

/* Kuvaus tietojen alle */

body.buddypress #buddypress
li.bp-single-group .group-desc {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 12px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* Varsinainen kuvausteksti */

body.buddypress #buddypress
li.bp-single-group .group-desc p:not(:empty) {
    display: block;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: #f6f7f9;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – RYHMÄKUTSUT
 * =====================================================
 */

body.buddypress #buddypress
#group-list.invites {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Yksittäinen kutsukortti */

body.buddypress #buddypress
#group-list.invites
li.invites-list {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress
#group-list.invites
li.invites-list > .wrap {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/*
 * =====================================================
 * RYHMÄN KUVA
 * =====================================================
 */

body.buddypress #buddypress
#group-list.invites
.item-avatar {
    width: 72px;
    margin: 0;
}

body.buddypress #buddypress
#group-list.invites
.item-avatar img.avatar {
    display: block;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

/*
 * =====================================================
 * RYHMÄN SISÄLTÖ
 * =====================================================
 */

body.buddypress #buddypress
#group-list.invites
.item {
    min-width: 0;
}

body.buddypress #buddypress
#group-list.invites
.groups-title {
    margin: 1px 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

body.buddypress #buddypress
#group-list.invites
.groups-title a {
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
}

body.buddypress #buddypress
#group-list.invites
.groups-title a:hover {
    color: #2563eb;
}

/* Jäsenmäärä */

body.buddypress #buddypress
#group-list.invites
.group-details {
    color: #8a919b;
    font-size: 12px;
}

/* Ryhmän kuvaus */

body.buddypress #buddypress
#group-list.invites
.desc {
    margin: 0 0 14px;
}

body.buddypress #buddypress
#group-list.invites
.desc p {
    margin: 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f6f7f9;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.5;
}

/*
 * =====================================================
 * HYVÄKSY / HYLKÄÄ
 * =====================================================
 */

body.buddypress #buddypress
#group-list.invites
.groups-meta {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress
#group-list.invites
.groups-meta .generic-button {
    margin: 0;
}

/* Hyväksy */

body.buddypress #buddypress
#group-list.invites
button.accept {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#group-list.invites
button.accept:hover {
    background: #1d4ed8;
}

/* Hylkää */

body.buddypress #buddypress
#group-list.invites
button.reject {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #5f6875;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#group-list.invites
button.reject:hover {
    border-color: #efc7c3;
    background: #fff5f4;
    color: #a3261e;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    #group-list.invites
    li.invites-list > .wrap {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    body.buddypress #buddypress
    #group-list.invites
    .item-avatar {
        width: 56px;
    }

    body.buddypress #buddypress
    #group-list.invites
    .item-avatar img.avatar {
        width: 56px;
        height: 56px;
    }

    body.buddypress #buddypress
    #group-list.invites
    .groups-title {
        font-size: 16px;
    }

    body.buddypress #buddypress
    #group-list.invites
    .groups-meta {
        flex-wrap: wrap !important;
    }
}

/* Ryhmäkutsun nimi ja jäsenmäärä eri riveille */

body.buddypress #buddypress
#group-list.invites
.groups-title {
    display: block;
    margin-bottom: 4px;
}

body.buddypress #buddypress
#group-list.invites
.group-details {
    display: block;
    margin: 0 0 8px;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – ASETUKSET
 * =====================================================
 */

body.buddypress #buddypress .settings {
    max-width: 820px;
    margin: 0 auto;
}

/* Otsikot */

body.buddypress #buddypress .settings .screen-heading,
body.buddypress #buddypress .settings h2 {
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

/* Johdantoteksti */

body.buddypress #buddypress .settings > p {
    color: #66707d;
    font-size: 14px;
    line-height: 1.55;
}

/*
 * =====================================================
 * LOMAKEKORTTI
 * =====================================================
 */

body.buddypress #buddypress .settings form {
    margin-top: 20px;
    padding: 22px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/* Labelit */

body.buddypress #buddypress .settings form label {
    display: block;
    margin: 0 0 7px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

/* Kentät */

body.buddypress #buddypress .settings form input[type="text"],
body.buddypress #buddypress .settings form input[type="email"],
body.buddypress #buddypress .settings form input[type="password"] {
    width: 100%;
    min-height: 42px;
    margin: 0 0 16px;
    padding: 10px 13px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #20252d;
    font-size: 14px;
    box-shadow: none;
}

body.buddypress #buddypress .settings form input:focus {
    border-color: #9eb8e8;
    outline: 2px solid rgba(37,99,235,.10);
    outline-offset: 0;
}

/* Unohtuiko salasana */

body.buddypress #buddypress .settings .wp-pwd {
    margin-bottom: 10px;
}

body.buddypress #buddypress .settings a {
    text-decoration: none;
}

/*
 * =====================================================
 * INFO-VIESTIT
 * =====================================================
 */

body.buddypress #buddypress .settings .bp-feedback {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #e5e9ee;
    border-radius: 10px;
    background: #f7f8fa;
    box-shadow: none;
}

body.buddypress #buddypress .settings .bp-feedback p {
    margin: 0;
    color: #626b78;
    font-size: 13px;
    line-height: 1.45;
}

/*
 * =====================================================
 * PAINIKKEET
 * =====================================================
 */

body.buddypress #buddypress .settings form button,
body.buddypress #buddypress .settings form input[type="submit"] {
    min-height: 40px;
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

/* Päätoiminto */

body.buddypress #buddypress .settings form input[type="submit"] {
    background: #2563eb;
    color: #ffffff;
}

body.buddypress #buddypress .settings form input[type="submit"]:hover {
    background: #1d4ed8;
}

/* "Luo salasana" sekundääriseksi */

body.buddypress #buddypress .settings form button {
    border: 1px solid #dfe3e7;
    background: #ffffff;
    color: #4b5563;
}

body.buddypress #buddypress .settings form button:hover {
    background: #f5f6f8;
}

/*
 * =====================================================
 * POISTA TILI – VAARAVYÖHYKE
 * =====================================================
 */

/* Otsikko */

body.buddypress #buddypress
.delete-account-screen {
    margin: 24px 0 12px;
    color: #b42318;
    font-size: 21px;
    font-weight: 700;
}

/* Varoitusviesti */

body.buddypress #buddypress
.delete-account-screen + .bp-feedback.warning {
    margin: 0 0 16px;
    padding: 13px 15px;
    border: 1px solid #f0c7c3;
    border-radius: 10px;
    background: #fff7f6;
    box-shadow: none;
}

body.buddypress #buddypress
.delete-account-screen + .bp-feedback.warning p {
    margin: 0;
    color: #7a302a;
    font-size: 14px;
    line-height: 1.5;
}

/* Itse poistokortti */

body.buddypress #buddypress
#account-delete-form {
    margin-top: 0;
    padding: 18px 20px;
    border: 1px solid #f0d0cd;
    border-radius: 12px;
    background: #fffafa;
    box-shadow: none;
}

/* "Ymmärrän seuraukset" */

body.buddypress #buddypress
#delete-account-understand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: #8f2d25;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* Checkbox */

body.buddypress #buddypress
#delete-account-understand input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #c0362c;
    cursor: pointer;
}

/* Submit-div */

body.buddypress #buddypress
#account-delete-form .submit {
    margin: 0;
    padding: 0;
}

/* Aktiivinen Poista tili */

body.buddypress #buddypress
#delete-account-button {
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid #b42318;
    border-radius: 9px;
    background: #b42318;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}

body.buddypress #buddypress
#delete-account-button:hover:not(:disabled) {
    background: #921f17;
    border-color: #921f17;
}

/* Poistopainike ennen hyväksyntää */

body.buddypress #buddypress
#delete-account-button:disabled {
    border-color: #e5c7c4;
    background: #f2dfdd;
    color: #a77d79;
    cursor: not-allowed;
    opacity: 1;
}

/* Mobiili */

@media (max-width: 700px) {
    body.buddypress #buddypress
    #account-delete-form {
        padding: 16px;
    }
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress .settings form {
        padding: 16px;
    }

    body.buddypress #buddypress .settings .screen-heading,
    body.buddypress #buddypress .settings h2 {
        font-size: 20px;
    }
}

/*
 * =====================================================
 * BUDDYPRESS – INFO- JA TYHJÄN TILAN VIESTIT
 * =====================================================
 */

body.buddypress #buddypress
.bp-feedback.bp-messages.info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid #e3e8ef;
    border-radius: 10px;
    background: #f8fafc;
    box-shadow: none;
}

/* BuddyPressin vanha värillinen ikonipalkki pois */

body.buddypress #buddypress
.bp-feedback.bp-messages.info .bp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: #e8f0fe;
}

/* Oma hillitty info-symboli */

body.buddypress #buddypress
.bp-feedback.bp-messages.info .bp-icon::before {
    content: "i";
    color: #2563eb;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
}

/* Teksti */

body.buddypress #buddypress
.bp-feedback.bp-messages.info p {
    flex: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #596579;
    font-size: 14px;
    line-height: 1.5;
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – RTMEDIA / MEDIA
 * =====================================================
 */

/* Media-osion leveys */

body.buddypress #buddypress .rtmedia-container {
    width: 100%;
}

/*
 * =====================================================
 * MEDIA-ALAVALIKKO
 * =====================================================
 */

body.buddypress #buddypress
#subnav[aria-label="rtMedia menu"] ul.subnav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px;
    border-radius: 11px;
    background: #f4f6f8;
    list-style: none;
}

body.buddypress #buddypress
#subnav[aria-label="rtMedia menu"] li {
    margin: 0;
}

body.buddypress #buddypress
#subnav[aria-label="rtMedia menu"] a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.buddypress #buddypress
#subnav[aria-label="rtMedia menu"] li.current > a,
body.buddypress #buddypress
#subnav[aria-label="rtMedia menu"] li.selected > a {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

body.buddypress #buddypress
#subnav[aria-label="rtMedia menu"] .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e9edf2;
    color: #66707d;
    font-size: 11px;
}

/*
 * =====================================================
 * GALLERIAN OTSIKKO + TOIMINNOT
 * =====================================================
 */

body.buddypress #buddypress
#rtm-gallery-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0 16px;
}

body.buddypress #buddypress
.rtm-gallery-title {
    margin: 0;
    color: #1f2937;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

/* Actions */

body.buddypress #buddypress
#rtm-media-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.buddypress #buddypress
#rtm-media-options button,
body.buddypress #buddypress
#rtm-media-options a {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#rtm-media-options button:hover,
body.buddypress #buddypress
#rtm-media-options a:hover {
    background: #f5f6f8;
}

/* Upload päätoiminnoksi */

body.buddypress #buddypress
#rtm_show_upload_ui {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

body.buddypress #buddypress
#rtm_show_upload_ui:hover {
    background: #1d4ed8 !important;
}

/*
 * =====================================================
 * OPTIONS-PUDOTUSVALIKKO
 * =====================================================
 */

body.buddypress #buddypress
.rtm-media-options-list {
    position: relative;
}

body.buddypress #buddypress
.rtm-options {
    position: absolute;
    top: 44px;
    right: 0;
    z-index: 50;
    min-width: 170px;
    margin: 0;
    padding: 6px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    list-style: none;
}

body.buddypress #buddypress
.rtm-options li {
    margin: 0;
}

body.buddypress #buddypress
.rtm-options a {
    display: block;
    border: 0 !important;
    background: transparent !important;
}

body.buddypress #buddypress
.rtm-options a:hover {
    background: #f4f6f8 !important;
}

/*
 * =====================================================
 * RTMEDIA UPLOADER
 * =====================================================
 */

body.buddypress #buddypress
#rtm-media-gallery-uploader {
    margin: 0 0 20px;
}

body.buddypress #buddypress
#rtmedia-upload-container {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border: 2px dashed #d7dce2;
    border-radius: 14px;
    background: #fafbfc;
}

/* Albumivalinta */

body.buddypress #buddypress
.rtm-album-privacy {
    padding: 12px 16px;
    border-bottom: 1px solid #e7ebef;
    background: #f6f8fa;
}

body.buddypress #buddypress
.rtm-album-privacy label {
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
}

body.buddypress #buddypress
.rtm-album-privacy select {
    min-height: 34px;
    margin-left: 6px;
    padding: 5px 30px 5px 9px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
}

/* Tiedostojen valinta keskelle */

body.buddypress #buddypress
.rtm-upload-tab-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

body.buddypress #buddypress
.rtm-select-files {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 24px;
    text-align: center;
}

/* Select your files */

body.buddypress #buddypress
#rtMedia-upload-button {
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid #d6dbe1;
    border-radius: 9px;
    background: #ffffff;
    color: #1f2937;
    font-size: 13px;
    font-weight: 650;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#rtMedia-upload-button:hover {
    background: #f5f6f8;
}

/* "or" */

body.buddypress #buddypress
.rtm-seperator {
    color: #9aa1aa;
    font-size: 12px;
}

/* Drop your files here */

body.buddypress #buddypress
.rtm-select-files .drag-drop-info {
    margin: 0;
    color: #596270;
    font-size: 14px;
    font-weight: 600;
}

/* Start upload */

body.buddypress #buddypress
.start-media-upload {
    display: block;
    min-height: 38px;
    margin: 0 16px 16px auto;
    padding: 8px 14px;
    border: 0;
    border-radius: 9px;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
.start-media-upload:hover {
    background: #1d4ed8;
}

/*
 * =====================================================
 * TYHJÄ GALLERIA
 * =====================================================
 */

body.buddypress #buddypress
.rtmedia-no-media-found {
    margin: 18px 0 0;
    padding: 18px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #f8fafc;
    color: #596579;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}

/*
 * =====================================================
 * MEDIA GRID – KUN KUVIA TULEE
 * =====================================================
 */

body.buddypress #buddypress
.rtmedia-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress
.rtmedia-list-item {
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid #edf0f2;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

body.buddypress #buddypress
.rtmedia-list-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    #subnav[aria-label="rtMedia menu"] ul.subnav {
        overflow-x: auto;
    }

    body.buddypress #buddypress
    #subnav[aria-label="rtMedia menu"] a {
        white-space: nowrap;
    }

    body.buddypress #buddypress
    #rtm-gallery-title-container {
        align-items: flex-start;
        flex-direction: column;
    }

    body.buddypress #buddypress
    #rtm-media-options {
        width: 100%;
    }

    body.buddypress #buddypress
    .rtmedia-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    body.buddypress #buddypress
    .rtmedia-list {
        grid-template-columns: 1fr;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – JÄSENHAKEMISTO
 * =====================================================
 */

/* Ylävälilehdet */

body.buddypress #buddypress
.members-type-navs {
    margin-bottom: 16px;
}

body.buddypress #buddypress
.members-type-navs ul.members-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 4px;
    border-radius: 11px;
    background: #f4f6f8;
    list-style: none;
}

body.buddypress #buddypress
.members-type-navs li {
    margin: 0;
}

body.buddypress #buddypress
.members-type-navs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.buddypress #buddypress
.members-type-navs li.selected > a {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

body.buddypress #buddypress
.members-type-navs .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #e9edf2;
    color: #66707d;
    font-size: 11px;
}

/*
 * =====================================================
 * HAKU + JÄRJESTYS
 * =====================================================
 */

body.buddypress #buddypress
.screen-content > #subnav-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
}

body.buddypress #buddypress
.members-search {
    flex: 1;
    max-width: 360px;
}

body.buddypress #buddypress
#dir-members-search-form {
    position: relative;
}

body.buddypress #buddypress
#dir-members-search {
    width: 100%;
    height: 40px;
    padding: 0 42px 0 14px;
    border: 1px solid #dfe3e7;
    border-radius: 10px;
    background: #ffffff;
    font-size: 13px;
    box-shadow: none;
}

body.buddypress #buddypress
#dir-members-search-submit {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

body.buddypress #buddypress
#dir-members-search-submit:hover {
    background: #f2f4f6;
}

body.buddypress #buddypress
#members-order-by {
    min-height: 40px;
    padding: 7px 34px 7px 12px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #ffffff;
    font-size: 13px;
}

/*
 * =====================================================
 * JÄSENLISTA
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress
#members-list.members-list
li.item-entry {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

body.buddypress #buddypress
#members-list.members-list
li.item-entry > .list-wrap {
    display: grid;
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid #edf0f2;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

/*
 * =====================================================
 * AVATAR
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-list
.item-avatar {
    width: 76px;
    margin: 0;
}

body.buddypress #buddypress
#members-list.members-list
.item-avatar img.avatar {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
}

/* Online-piste */

body.buddypress #buddypress
#members-list.members-list
li.is-online .item-avatar {
    position: relative;
}

body.buddypress #buddypress
#members-list.members-list
li.is-online .item-avatar::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 13px;
    height: 13px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #22c55e;
}

/*
 * =====================================================
 * JÄSENTIEDOT
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-list
.item {
    min-width: 0;
}

body.buddypress #buddypress
#members-list.members-list
.member-name {
    margin: 1px 0 4px;
    font-size: 18px;
    line-height: 1.3;
}

body.buddypress #buddypress
#members-list.members-list
.member-name a {
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
}

body.buddypress #buddypress
#members-list.members-list
.member-name a:hover {
    color: #2563eb;
}

body.buddypress #buddypress
#members-list.members-list
.last-activity {
    margin: 0;
    color: #8a919b;
    font-size: 12px;
}

/*
 * =====================================================
 * VIIMEISIN PÄIVITYS
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-list
.user-update {
    margin-top: 13px;
}

body.buddypress #buddypress
#members-list.members-list
.user-update .update {
    padding: 10px 12px;
    border-radius: 9px;
    background: #f6f7f9;
    color: #4b5563;
    font-size: 13px;
    font-style: normal;
    line-height: 1.5;
}

/*
 * =====================================================
 * YSTÄVÄTOIMINNOT
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-list
.members-meta {
    top: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress #buddypress
#members-list.members-list
.members-meta .generic-button {
    margin: 0;
}

body.buddypress #buddypress
#members-list.members-list
.members-meta button {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    background: #ffffff;
    color: #5f6875;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
}

body.buddypress #buddypress
#members-list.members-list
.members-meta button:hover {
    background: #f5f6f8;
}

/* Poista ystävä / peru pyyntö vähän varovaisemmaksi */

body.buddypress #buddypress
#members-list.members-list
button.remove:hover,
body.buddypress #buddypress
#members-list.members-list
button.requested:hover {
    border-color: #efc7c3;
    background: #fff5f4;
    color: #a3261e;
}

/*
 * =====================================================
 * PAGINAATIO
 * =====================================================
 */

body.buddypress #buddypress
#members-dir-list .bp-pagination {
    margin: 14px 0;
}

body.buddypress #buddypress
#members-dir-list .pag-data {
    margin: 0;
    color: #8a919b;
    font-size: 12px;
}

body.buddypress #buddypress
#members-dir-list .bp-pagination.bottom .pag-count {
    display: none;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress #buddypress
    .screen-content > #subnav-filters {
        align-items: stretch;
        flex-direction: column;
    }

    body.buddypress #buddypress
    .members-search {
        max-width: none;
    }

    body.buddypress #buddypress
    #members-list.members-list
    li.item-entry > .list-wrap {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 12px;
        padding: 14px;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .item-avatar {
        width: 58px;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .item-avatar img.avatar {
        width: 58px;
        height: 58px;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .item-block {
        padding-right: 0;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .members-meta {
        position: static;
        margin-top: 10px;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .member-name {
        font-size: 16px;
    }
}

/*
 * =====================================================
 * JÄSENKORTTI – TOIMINNOT JA PÄIVITYS OIKEAAN REUNAAN
 * =====================================================
 */

body.buddypress #buddypress
#members-list.members-list
li.item-entry > .list-wrap {
    grid-template-columns: 76px minmax(0, 1fr) minmax(240px, 360px);
}

/* Jäsenen perustiedot keskimmäiseen sarakkeeseen */

body.buddypress #buddypress
#members-list.members-list
.item {
    display: contents;
}

/* Nimi + aktiivisuus */

body.buddypress #buddypress
#members-list.members-list
.item-block {
    grid-column: 2;
    position: relative;
    padding-right: 0;
}

/* Toimintopainike keskimmäisen sarakkeen oikeaan reunaan */

body.buddypress #buddypress
#members-list.members-list
.members-meta {
    position: static;
    margin-top: 12px;
}

/* Viimeisin päivitys oikeaan sarakkeeseen */

body.buddypress #buddypress
#members-list.members-list
.user-update {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    margin: 0;
}

/* Päivityksen laatikko */

body.buddypress #buddypress
#members-list.members-list
.user-update .update {
    width: 100%;
    margin: 0;
}

/* Jos käyttäjällä ei ole päivitystä, ei jää näkyvää tyhjää laatikkoa */

body.buddypress #buddypress
#members-list.members-list
.item-entry:not(:has(.user-update)) .item-block {
    grid-column: 2 / 4;
}

/* Mobiili */

@media (max-width: 760px) {
    body.buddypress #buddypress
    #members-list.members-list
    li.item-entry > .list-wrap {
        grid-template-columns: 58px minmax(0, 1fr);
    }

    body.buddypress #buddypress
    #members-list.members-list
    .item-block {
        grid-column: 2;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .user-update {
        grid-column: 1 / -1;
        grid-row: auto;
        margin-top: 10px;
    }

    body.buddypress #buddypress
    #members-list.members-list
    .item-entry:not(:has(.user-update)) .item-block {
        grid-column: 2;
    }
}

/*
 * =====================================================
 * KUUKUNEN SOCIAL – YKSITTÄINEN RYHMÄ
 * =====================================================
 */

/* Ryhmäsivu saa käyttää kunnolla leveyttä */

body.buddypress.groups.single-item #buddypress {
    width: 100%;
}

body.buddypress.groups.single-item #item-body {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

/*
 * =====================================================
 * RYHMÄHEADER
 * =====================================================
 */

body.buddypress.groups.single-item
#item-header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Ryhmän nimi */

body.buddypress.groups.single-item
.kuukunen-group-title {
    color: #1f2937;
    font-weight: 750;
    letter-spacing: -.4px;
}

/* Julkinen ryhmä */

body.buddypress.groups.single-item
#item-header-content .group-status {
    color: #4b5563;
}

/* Aktiivisuus */

body.buddypress.groups.single-item
#item-header-content > .activity {
    color: #8a919b;
}

/* Pääkäyttäjät oikealla siistimmäksi */

body.buddypress.groups.single-item
#item-actions {
    align-self: center;
}

body.buddypress.groups.single-item
#item-actions .moderators-title {
    margin-bottom: 6px;
    color: #66707d;
    font-weight: 600;
}

body.buddypress.groups.single-item
#item-actions img.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

/* Ryhmän kuvaus */

body.buddypress.groups.single-item
.desc-wrap {
    margin: 14px 0 20px;
    padding: 14px 16px;
    border: 1px solid #edf0f2;
    border-radius: 11px;
    background: #f8fafc;
}

body.buddypress.groups.single-item
.group-description p {
    margin: 0;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

/*
 * =====================================================
 * RYHMÄN ACTIVITY-FEED – LEVEYS
 * =====================================================
 */

body.buddypress.groups.single-item
#activity-stream {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

body.buddypress.groups.single-item
#activity-stream ul.activity-list {
    width: 100%;
}

/*
 * =====================================================
 * KUUKUNEN – RYHMÄHEADERIN TIIVISTYS
 * =====================================================
 */

body.buddypress.groups.single-item
#item-header-cover-image {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 0 !important;
    padding: 18px 24px !important;
}

/* Ryhmän avatar */

body.buddypress.groups.single-item
#item-header-avatar {
    position: static !important;
    width: 96px !important;
    height: 96px !important;
    margin: 0 !important;
    float: none !important;
}

body.buddypress.groups.single-item
#item-header-avatar a {
    display: block;
    width: 96px !important;
    height: 96px !important;
}

body.buddypress.groups.single-item
#item-header-avatar img.avatar {
    width: 96px !important;
    height: 96px !important;
    margin: 0 !important;
    border: 4px solid #ffffff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* Ryhmän nimi ja tiedot */

body.buddypress.groups.single-item
#item-header-content {
    position: static !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.buddypress.groups.single-item
.kuukunen-group-title {
    margin: 0 0 5px;
    font-size: 25px;
    line-height: 1.2;
}

body.buddypress.groups.single-item
#item-header-content .group-status {
    display: inline;
    margin: 0;
    font-size: 13px;
}

body.buddypress.groups.single-item
#item-header-content > .activity {
    display: inline;
    margin: 0 0 0 8px;
    font-size: 12px;
}

/* Erotin */

body.buddypress.groups.single-item
#item-header-content > .activity::before {
    content: "·";
    margin-right: 8px;
    color: #b0b6be;
}

/*
 * =====================================================
 * PÄÄKÄYTTÄJÄT
 * =====================================================
 */

body.buddypress.groups.single-item
#item-actions {
    position: static !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    text-align: right;
}

body.buddypress.groups.single-item
#item-actions .moderators-lists {
    margin: 0;
}

body.buddypress.groups.single-item
#item-actions .moderators-title {
    margin: 0 0 6px;
    font-size: 11px;
}

body.buddypress.groups.single-item
#item-actions #group-admins {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

body.buddypress.groups.single-item
#item-actions #group-admins img.avatar {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50%;
    object-fit: cover;
}

/*
 * =====================================================
 * RYHMÄN KUVAUS
 * =====================================================
 */

body.buddypress.groups.single-item
#item-header .desc-wrap {
    margin: 12px 0 18px !important;
    padding: 13px 16px !important;
    border: 1px solid #edf0f2;
    border-radius: 10px;
    background: #f8fafc;
}

body.buddypress.groups.single-item
#item-header .group-description p {
    margin: 0;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress.groups.single-item
    #item-header-cover-image {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
        padding: 14px !important;
    }

    body.buddypress.groups.single-item
    #item-header-avatar,
    body.buddypress.groups.single-item
    #item-header-avatar a {
        width: 72px !important;
        height: 72px !important;
    }

    body.buddypress.groups.single-item
    #item-header-avatar img.avatar {
        width: 72px !important;
        height: 72px !important;
    }

    body.buddypress.groups.single-item
    #item-actions {
        grid-column: 1 / -1;
        margin-top: 6px !important;
        text-align: left;
    }

    body.buddypress.groups.single-item
    #item-actions #group-admins {
        justify-content: flex-start;
    }

    body.buddypress.groups.single-item
    .kuukunen-group-title {
        font-size: 21px;
    }
}

/*
 * =====================================================
 * KUUKUNEN – RYHMÄN JÄSENLUETTELO
 * =====================================================
 */

/* Yksittäinen jäsen */

body.buddypress.groups.single-item
#members-list > li.item-entry {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 1px solid #e7ebef !important;
    border-radius: 14px !important;
    background: #fff !important;
    overflow: hidden;
}

/* Kortin sisältö */

body.buddypress.groups.single-item
#members-list > li.item-entry > .list-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 18px !important;
    width: 100% !important;
    min-height: 104px;
    margin: 0 !important;
    padding: 14px 18px !important;
    box-sizing: border-box !important;
    border: 0 !important;
}

/*
 * =====================================================
 * AVATAR
 * =====================================================
 */

body.buddypress.groups.single-item
#members-list .item-avatar {
    flex: 0 0 76px !important;
    width: 76px !important;
    height: 76px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.buddypress.groups.single-item
#members-list .item-avatar a {
    display: block;
    width: 76px;
    height: 76px;
}

body.buddypress.groups.single-item
#members-list .item-avatar img.avatar {
    display: block;
    width: 76px !important;
    height: 76px !important;
    margin: 0 !important;
    border-radius: 50% !important;
    object-fit: cover;
}

/*
 * =====================================================
 * JÄSENEN TIEDOT
 * =====================================================
 */

body.buddypress.groups.single-item
#members-list .item {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

body.buddypress.groups.single-item
#members-list .item-block {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Nimi + liittymisaika */

body.buddypress.groups.single-item
#members-list .member-name {
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
}

body.buddypress.groups.single-item
#members-list .member-name a {
    text-decoration: none !important;
}

body.buddypress.groups.single-item
#members-list .joined {
    margin: 4px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/*
 * * BuddyPressin .item-block sisältää sekä nimen/tiedot
 * * että toimintopainikkeen. Tehdään siitä joustava.
 */

body.buddypress.groups.single-item
#members-list .item-block {
    flex-wrap: wrap !important;
}

/* Nimi ja liittymisaika vasemmalle */

body.buddypress.groups.single-item
#members-list .item-block .member-name,
body.buddypress.groups.single-item
#members-list .item-block .joined {
    flex-basis: calc(100% - 180px);
}

/*
 * =====================================================
 * YSTÄVÄPAINIKE
 * =====================================================
 */

body.buddypress.groups.single-item
#members-list .groups-meta.action {
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    float: none !important;
}

body.buddypress.groups.single-item
#members-list .groups-meta.action .generic-button {
    margin: 0 !important;
}

body.buddypress.groups.single-item
#members-list .groups-meta.action button,
body.buddypress.groups.single-item
#members-list .groups-meta.action a.button {
    width: auto !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 1px solid #dce2e8 !important;
    border-radius: 8px !important;
    background: #fff !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 600px) {
    body.buddypress.groups.single-item
    #members-list > li.item-entry > .list-wrap {
        gap: 12px !important;
        min-height: 0;
        padding: 12px !important;
    }

    body.buddypress.groups.single-item
    #members-list .item-avatar,
    body.buddypress.groups.single-item
    #members-list .item-avatar a,
    body.buddypress.groups.single-item
    #members-list .item-avatar img.avatar {
        width: 58px !important;
        height: 58px !important;
    }

    body.buddypress.groups.single-item
    #members-list .item-avatar {
        flex-basis: 58px !important;
    }

    body.buddypress.groups.single-item
    #members-list .item-block {
        display: block !important;
    }

    body.buddypress.groups.single-item
    #members-list .member-name {
        font-size: 16px !important;
    }

    body.buddypress.groups.single-item
    #members-list .groups-meta.action {
        margin: 9px 0 0 !important;
    }
}

/*
 * =====================================================
 * KUUKUNEN – RYHMÄN KUTSU JÄSENIÄ
 * =====================================================
 */

body.buddypress.groups.single-item
#item-body {
    overflow-x: hidden;
}

/* Kutsu-sivun sisältö */

body.buddypress.groups.single-item
#item-body .bp-invites-content,
body.buddypress.groups.single-item
#item-body .group-invites {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

/* Otsikko */

body.buddypress.groups.single-item
#item-body .screen-heading {
    margin: 22px 0 14px;
    color: #1f2937;
    font-size: 22px;
    font-weight: 700;
}

/*
 * =====================================================
 * OMAT YSTÄVÄT / KAIKKI JÄSENET
 * =====================================================
 */

body.buddypress.groups.single-item
#item-body .bp-invites-nav,
body.buddypress.groups.single-item
#item-body .group-invites .bp-navs {
    margin-bottom: 14px;
}

body.buddypress.groups.single-item
#item-body .bp-invites-nav ul,
body.buddypress.groups.single-item
#item-body .group-invites .bp-navs ul {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: 0;
    padding: 4px;
    border-radius: 11px;
    background: #f4f6f8;
    list-style: none;
}

body.buddypress.groups.single-item
#item-body .bp-invites-nav li,
body.buddypress.groups.single-item
#item-body .group-invites .bp-navs li {
    margin: 0;
}

body.buddypress.groups.single-item
#item-body .bp-invites-nav a,
body.buddypress.groups.single-item
#item-body .group-invites .bp-navs a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.buddypress.groups.single-item
#item-body .bp-invites-nav li.current > a,
body.buddypress.groups.single-item
#item-body .bp-invites-nav li.selected > a,
body.buddypress.groups.single-item
#item-body .group-invites .bp-navs li.current > a,
body.buddypress.groups.single-item
#item-body .group-invites .bp-navs li.selected > a {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/*
 * =====================================================
 * HAKU
 * =====================================================
 */

body.buddypress.groups.single-item
#item-body .group-invites .bp-search,
body.buddypress.groups.single-item
#item-body .group-invites .dir-search {
    width: 100%;
    max-width: 420px;
    margin: 0 0 16px;
}

body.buddypress.groups.single-item
#item-body .group-invites form[role="search"] {
    position: relative;
    width: 100%;
}

body.buddypress.groups.single-item
#item-body .group-invites input[type="search"] {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 14px;
    border: 1px solid #dfe3e7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: none;
}

body.buddypress.groups.single-item
#item-body .group-invites form[role="search"] button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
}

/*
 * =====================================================
 * TYHJÄN TILAN ILMOITUS
 * =====================================================
 */

body.buddypress.groups.single-item
#item-body .group-invites .bp-feedback,
body.buddypress.groups.single-item
#item-body .bp-invites-content .bp-feedback {
    width: 100%;
    max-width: none;
    margin: 16px 0 0;
    box-sizing: border-box;
}

/*
 * =====================================================
 * YLILEVEÄT SISÄELEMENTIT KURIIN
 * =====================================================
 */

body.buddypress.groups.single-item
#item-body .group-invites *,
body.buddypress.groups.single-item
#item-body .bp-invites-content * {
    max-width: 100%;
    box-sizing: border-box;
}

body.buddypress.groups.single-item
#item-body .group-invites ul,
body.buddypress.groups.single-item
#item-body .bp-invites-content ul {
    margin-left: 0;
    margin-right: 0;
}

/* Mobiili */

@media (max-width: 700px) {
    body.buddypress.groups.single-item
    #item-body .bp-invites-nav ul,
    body.buddypress.groups.single-item
    #item-body .group-invites .bp-navs ul {
        overflow-x: auto;
    }

    body.buddypress.groups.single-item
    #item-body .bp-invites-nav a,
    body.buddypress.groups.single-item
    #item-body .group-invites .bp-navs a {
        white-space: nowrap;
    }
}

/*
 * =====================================================
 * KUUKUNEN – RYHMÄKUTSUJEN LOPULLINEN LEVEYSKORJAUS
 * =====================================================
 */

body.buddypress.groups.single-item
#group-invites-container {
    box-sizing: border-box !important;
}

/* BuddyPressin varsinainen sisältösarake */

body.buddypress.groups.single-item
#group-invites-container .group-invites-column {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/*
 * =====================================================
 * OMAT YSTÄVÄT / KAIKKI JÄSENET / ODOTTAVAT KUTSUT
 * =====================================================
 */

body.buddypress.groups.single-item
#group-invites-container .bp-invites-nav {
    width: 100% !important;
    margin: 0 0 14px !important;
}

body.buddypress.groups.single-item
#group-invites-container .bp-invites-nav ul {
    display: flex !important;
    align-items: center;
    width: 100% !important;
    margin: 0 !important;
    padding: 4px !important;
    border-radius: 11px;
    background: #f4f6f8;
    list-style: none;
}

body.buddypress.groups.single-item
#group-invites-container .bp-invites-nav li {
    flex: 0 0 auto;
    margin: 0 !important;
}

body.buddypress.groups.single-item
#group-invites-container .bp-invites-nav a {
    display: inline-flex;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #66707d;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

body.buddypress.groups.single-item
#group-invites-container .bp-invites-nav li.current a {
    background: #ffffff;
    color: #1f2937;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

/*
 * =====================================================
 * HAKU
 * =====================================================
 */

body.buddypress.groups.single-item
#group_invites_search_form {
    position: relative;
    width: 100% !important;
    margin: 0 !important;
}

body.buddypress.groups.single-item
#group_invites_search {
    display: block;
    width: 100% !important;
    height: 42px;
    margin: 0 !important;
    padding: 0 44px 0 14px !important;
    border: 1px solid #dfe3e7;
    border-radius: 10px;
    box-sizing: border-box;
}

body.buddypress.groups.single-item
#group_invites_search_submit {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 8px;
    background: transparent !important;
}

/*
 * =====================================================
 * INFO-VIESTI
 * =====================================================
 */

body.buddypress.groups.single-item
#group-invites-container .bp-invites-feedback {
    box-sizing: border-box !important;
}

body.buddypress.groups.single-item
#group-invites-container
.bp-invites-feedback .bp-feedback.info {
    width: 100% !important;
    margin: 14px 0 0 !important;
    box-sizing: border-box !important;
}

/*
 * =====================================================
 * JÄSENLISTA
 * =====================================================
 */

body.buddypress.groups.single-item
#group-invites-container .bp-invites-content {
    box-sizing: border-box !important;
}

body.buddypress.groups.single-item
#group-invites-container #members-list {
    width: 100% !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/*
 * =====================================================
 * MOBIILI
 * =====================================================
 */

@media (max-width: 700px) {
    body.buddypress.groups.single-item
    #group-invites-container .bp-invites-nav ul {
        overflow-x: auto;
    }
}

/*
 * =====================================================
 * KUUKUNEN – RYHMÄKUTSUT
 * BuddyPressin vanha kaksipalstainen rakenne pois
 * =====================================================
 */

body.buddypress.groups.single-item
#group-invites-container {
    display: block !important;
    width: 100% !important;
    max-width: 760px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
}

/*
 * -----------------------------------------------------
 * VASEMMAN PALSTAN NAVIGAATIOSTA NORMAALI YLÄRIVI
 * -----------------------------------------------------
 */

body.buddypress.groups.single-item
#group-invites-container > .bp-invites-nav {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    position: static !important;
    overflow: visible !important;
}

body.buddypress.groups.single-item
#group-invites-container > .bp-invites-nav ul.subnav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 4px !important;
    border-radius: 11px;
    background: #f4f6f8;
    overflow: visible !important;
}

body.buddypress.groups.single-item
#group-invites-container > .bp-invites-nav li {
    display: block !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.buddypress.groups.single-item
#group-invites-container > .bp-invites-nav li a {
    display: inline-flex !important;
    width: auto !important;
    padding: 8px 12px !important;
    white-space: nowrap;
}

/*
 * -----------------------------------------------------
 * OIKEA PALSTA POIS – SISÄLTÖ NAVIN ALLE
 * -----------------------------------------------------
 */

body.buddypress.groups.single-item
#group-invites-container > .group-invites-column {
    display: block !important;
    float: none !important;
    clear: both !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/*
 * -----------------------------------------------------
 * HAKU
 * -----------------------------------------------------
 */

body.buddypress.groups.single-item
#group-invites-container .bp-invites-filters {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    position: static !important;
}

body.buddypress.groups.single-item
#group-invites-container .group-invites-search {
    display: block !important;
    float: none !important;
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 !important;
}

/*
 * -----------------------------------------------------
 * PALAUTEVIESTI
 * -----------------------------------------------------
 */

body.buddypress.groups.single-item
#group-invites-container .bp-invites-feedback {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.buddypress.groups.single-item
#group-invites-container
.bp-invites-feedback .bp-feedback {
    width: 100% !important;
    margin: 14px 0 0 !important;
}

/*
 * -----------------------------------------------------
 * JÄSENLISTA
 * -----------------------------------------------------
 */

body.buddypress.groups.single-item
#group-invites-container .bp-invites-content {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

body.buddypress.groups.single-item
#group-invites-container .bp-invites-content #members-list {
    width: 100% !important;
    margin: 14px 0 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* Varmistus: kutsunäkymään ei sisäistä vaakavieritystä */

body.buddypress.groups.single-item
#group-invites-container,
body.buddypress.groups.single-item
#group-invites-container > *,
body.buddypress.groups.single-item
#group-invites-container .group-invites-column {
    overflow-x: visible !important;
}

/* =====================================================
   KUUKUNEN – ACTIVITY-FEEDIN YLEINEN LOPULLINEN KORJAUS
   Profiili, etusivu, ryhmät jne.
   ===================================================== */


/* -----------------------------------------------------
   RYHMÄTAPAHTUMIEN TURHA ESIKATSELUKORTTI POIS
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-item.joined_group
.bp-group-activity-preview,

body.buddypress #buddypress
.activity-item.created_group
.bp-group-activity-preview {
    display: none !important;
}


/* Jos activity-inner sisältää vain tuon previewn */
body.buddypress #buddypress
.activity-item.joined_group
.activity-inner:has(.bp-group-activity-preview),

body.buddypress #buddypress
.activity-item.created_group
.activity-inner:has(.bp-group-activity-preview) {
    display: none !important;
}


/* -----------------------------------------------------
   KOMMENTTIALUE KOKO LEVEYDELLE
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-list li.activity-item
.activity-comments {
    display: block !important;

    width: calc(100% - 60px) !important;
    max-width: none !important;

    margin: 14px 0 0 60px !important;
    padding: 0 !important;

    clear: both !important;

    box-sizing: border-box !important;
}


/* Kommenttilomake */
body.buddypress #buddypress
.activity-list li.activity-item
.activity-comments form.ac-form {
    display: grid !important;

    grid-template-columns: 38px minmax(0, 1fr) !important;
    column-gap: 10px !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 12px 0 0 !important;

    box-sizing: border-box !important;

    border-top: 1px solid #edf0f2;
}


/* -----------------------------------------------------
   KOMMENTOIJAN AVATAR
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-list li.activity-item
.ac-reply-avatar {
    grid-column: 1 !important;

    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
}

body.buddypress #buddypress
.activity-list li.activity-item
.ac-reply-avatar img {
    width: 36px !important;
    height: 36px !important;

    border-radius: 50%;
    object-fit: cover;
}


/* -----------------------------------------------------
   KOMMENTIN SISÄLTÖ
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-list li.activity-item
.ac-reply-content {
    position: relative !important;

    grid-column: 2 !important;

    display: block !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    float: none !important;
}


/* Wrapper */
body.buddypress #buddypress
.activity-list li.activity-item
.ac-textarea {
    display: block !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    margin: 0 !important;
}


/* Varsinainen textarea */
body.buddypress #buddypress
.activity-list li.activity-item
textarea.ac-input {
    display: block !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    min-height: 46px !important;

    padding: 11px 44px 11px 14px !important;

    box-sizing: border-box !important;

    border: 1px solid #e2e6ea !important;
    border-radius: 20px !important;

    background: #f3f5f7 !important;

    resize: vertical;
}


/* -----------------------------------------------------
   RTMEDIA-KUVAPAINIKE
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-list li.activity-item
button.rtmedia-comment-media-upload {
    position: absolute !important;

    top: 6px !important;
    right: 7px !important;

    width: 32px !important;
    height: 32px !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* -----------------------------------------------------
   JULKAISE JA PERUUTA
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-list li.activity-item
.ac-reply-content input[type="submit"],

body.buddypress #buddypress
.activity-list li.activity-item
.ac-reply-cancel {
    display: inline-flex !important;
    align-items: center !important;

    width: auto !important;
    min-width: max-content !important;

    margin-top: 8px !important;

    white-space: nowrap !important;
    word-break: normal !important;
    writing-mode: horizontal-tb !important;
}

body.buddypress #buddypress
.activity-list li.activity-item
.ac-reply-content input[type="submit"] {
    margin-right: 6px !important;
}


/* -----------------------------------------------------
   RTMEDIA-UPLOADER EI SAA KAVENTAA LOMAKETTA
   ----------------------------------------------------- */

body.buddypress #buddypress
.activity-list li.activity-item
.activity-comments .rtmedia-container {
    grid-column: 2 !important;

    width: 100% !important;
    max-width: none !important;
}


/* -----------------------------------------------------
   MOBIILI
   ----------------------------------------------------- */

@media (max-width: 600px) {

    body.buddypress #buddypress
    .activity-list li.activity-item
    .activity-comments {
        width: 100% !important;

        margin-left: 0 !important;
    }
}

/* =====================================================
   KUUKUNEN – ETUSIVUN FEEDIN VIIMEISTELY
   ===================================================== */

/* Feedin keskitys ja leveys */
body.buddypress #buddypress
.activity {
    width: 100%;
}

body.buddypress #buddypress
.activity-list {
    width: 100%;
    max-width: 760px;

    margin-left: auto;
    margin-right: auto;
}


/* =====================================================
   SUODATUS JA HAKU
   ===================================================== */

body.buddypress #buddypress
.activity-type-tabs {
    max-width: 760px;

    margin-left: auto;
    margin-right: auto;
}

body.buddypress #buddypress
.activity-type-tabs ul {
    display: flex;
    align-items: center;
    gap: 4px;

    flex-wrap: wrap;
}

body.buddypress #buddypress
.activity-type-tabs li {
    margin: 0;
}

body.buddypress #buddypress
.activity-type-tabs li a {
    min-height: 36px;

    padding: 8px 12px;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 600;

    color: #66707d;
}

body.buddypress #buddypress
.activity-type-tabs li.selected a,
body.buddypress #buddypress
.activity-type-tabs li.current a {
    background: #eef4ff;
    color: #2563eb;
}


/* Haku + suodatin */
body.buddypress #buddypress
.activity-search,
body.buddypress #buddypress
.activity-filter {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}


/* =====================================================
   ACTIVITY-KORTIT
   ===================================================== */

body.buddypress #buddypress
.activity-list li.activity-item {
    width: 100%;

    margin-bottom: 14px !important;

    padding: 18px !important;

    border: 1px solid #e8ecf0 !important;
    border-radius: 14px !important;

    background: #ffffff !important;

    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}


/* Avatar */
body.buddypress #buddypress
.activity-list li.activity-item
.activity-avatar img.avatar {
    width: 46px !important;
    height: 46px !important;

    border-radius: 50% !important;

    object-fit: cover;
}


/* Sisältö avatarin viereen */
body.buddypress #buddypress
.activity-list li.activity-item
.activity-content {
    margin-left: 62px !important;
}


/* Header */
body.buddypress #buddypress
.activity-list li.activity-item
.activity-header {
    margin-bottom: 8px;

    font-size: 13px;
    line-height: 1.45;

    color: #7a838f;
}

body.buddypress #buddypress
.activity-list li.activity-item
.activity-header a {
    color: #1f2937;
    font-weight: 700;
}

body.buddypress #buddypress
.activity-list li.activity-item
.activity-header .time-since {
    color: #8f97a2;
    font-weight: 400;
}


/* Julkaisun varsinainen teksti */
body.buddypress #buddypress
.activity-list li.activity-item
.activity-inner {
    margin: 10px 0 14px !important;
    padding: 0 !important;

    background: transparent !important;

    color: #20252d;

    font-size: 15px;
    line-height: 1.55;
}

body.buddypress #buddypress
.activity-list li.activity-item
.activity-inner p {
    margin: 0;
}


/* =====================================================
   TOIMINTORIVI
   ===================================================== */

body.buddypress #buddypress
.activity-list li.activity-item
.activity-meta.action {
    display: flex;
    align-items: center;
    gap: 6px;

    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid #edf0f2;
}

body.buddypress #buddypress
.activity-list li.activity-item
.activity-meta.action a.button {
    min-height: 34px;

    padding: 7px 10px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #626b78;

    font-size: 13px;
    font-weight: 600;
}

body.buddypress #buddypress
.activity-list li.activity-item
.activity-meta.action a.button:hover {
    background: #f3f5f7;

    color: #1f2937;
}


/* =====================================================
   AUTOMAATTISET TAPAHTUMAT TIIVIIMMIKSI
   ===================================================== */

body.buddypress #buddypress
.activity-list li.joined_group,

body.buddypress #buddypress
.activity-list li.created_group,

body.buddypress #buddypress
.activity-list li.friendship_created {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}

body.buddypress #buddypress
.activity-list li.joined_group .activity-header,

body.buddypress #buddypress
.activity-list li.created_group .activity-header,

body.buddypress #buddypress
.activity-list li.friendship_created .activity-header {
    margin-bottom: 4px;
}


/* =====================================================
   MOBIILI
   ===================================================== */

@media (max-width: 600px) {

    body.buddypress #buddypress
    .activity-list li.activity-item {
        padding: 14px !important;

        border-radius: 12px !important;
    }

    body.buddypress #buddypress
    .activity-list li.activity-item
    .activity-avatar img.avatar {
        width: 42px !important;
        height: 42px !important;
    }

    body.buddypress #buddypress
    .activity-list li.activity-item
    .activity-content {
        margin-left: 56px !important;
    }

    body.buddypress #buddypress
    .activity-meta.action {
        flex-wrap: wrap;
    }
}