/* Removed @import rules. Ensure base.css, header.css, media-viewer.css, dialog.css, slideshow.css, reactions.css, and footer.css are linked in the HTML where needed. */

body {
    padding-bottom: 1rem;
    overflow-y: scroll;
}

the-community {
    width: 100%;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 1rem;
}

the-community div.divider {
    flex: 0 0 1px;
    background-color: rgba(var(--primary-rgb), .25);
    align-self: stretch;
}

/* the-community button {
    font-size: 1rem;
} */

the-community > .header {
    /* position: sticky;
    top: -1px; */
    z-index: 1;
    flex: 0 0 auto;
    max-width: 60rem;
    width: calc(100% - 2rem);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    margin: 0 auto;
    padding: 1rem;
    gap: .5rem;
    border-bottom: 1px solid rgba(var(--primary-rgb), .25);
    border: 1px solid rgba(var(--primary-rgb), .5);
    background: rgba(0, 0, 0, .75);
    border-radius: .25rem;
    backdrop-filter: blur(1rem);
    box-shadow: 0px .25rem 1rem 0 rgb(0 0 0 / 50%), inset 0 0 2rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
}

the-community > .header:empty {
    display: none;
}

the-community > .header div.community-info {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

the-community > .header div.community-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: stretch;
    gap: 1rem;
}
the-community > .header div.community-info img {
    flex: 0 0 8rem;
    width: 8rem;
    height: 8rem;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 1);
    border-radius: .25rem;
}
the-community > .header div.community-info svg {
    flex: 0 0 1.5rem;
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--primary-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
}
the-community > .header div.community-info > div {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: .25rem;
}
the-community > .header div.community-info > div .community-name {
    color: var(--primary-color);
    font-weight: 600;
}

the-community > .header div.community-info > div .community-created {
    font-size: 0.65rem;
    color: rgba(var(--input-rgb), 0.7);
    font-style: italic;
}

the-community > .header div.community-info > div .community-created a.username {
    font-size: 0.8rem;
    color: rgba(var(--secondary-rgb), 0.7);
    font-weight: 600;
    text-decoration: none;
    font-style: normal;
}
the-community > .header div.community-info > div .community-created a.username.admin {
    color: rgba(var(--admin-username-rgb), 0.7);
}

the-community > .header div.community-info > div .community-description {
    color: var(--input-color);
    margin: .5rem 0;
}

the-community > .header div.community-info > div .community-meta {
    color: rgba(var(--secondary-rgb), 0.7);
    font-size: 0.8rem;
    font-weight: 600;
}

the-community > .header div.spacer {
    flex: 1 1 0;
}
the-community > .header div.divider {
    flex: 0 0 1px;
    background-color: rgba(var(--primary-rgb), .25);
    align-self: stretch;
}

/* --- Consolidated Primary Button Styles --- */
the-community > .header > button,
the-community > .header > a,
the-community > .content .meta > button,
the-community > .content .subposts > button:not(.show-comments), /* Exclude show-comments */
the-community > .content .compose-reply .buttons button:not(.cancel-reply) /* Exclude cancel-reply */
{
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: #000000;
    border-radius: .25rem;
    padding: .25rem .5rem;
    outline: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 .25rem .5rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 4));
}

/* Specific styles for header button/link */
the-community > .header > button,
the-community > .header > a {
    flex: 0 0 auto;
    text-decoration: none;
    text-shadow: 0 .25rem .75rem rgba(var(--primary-rgb), calc(var(--glow-intensity) / 1.5));
    font-size: 1rem;
}

/* Specific styles for compose reply button */
the-community > .content .compose-reply .buttons button:not(.cancel-reply) {
    align-self: flex-end;
}
/* --- End Consolidated Primary Button Styles --- */


the-community > .header > svg, the-community > .header > a > svg {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0);
    display: block;
    cursor: pointer;
    padding: .25rem;
    width: 3.5rem;
    height: 3.5rem;
    fill: var(--primary-color);
    transition: opacity .2s;
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
}

the-community > .header svg.allowed {
    opacity: 1;
    pointer-events: all;
}

the-community > .header .search-tools {
    margin-left: auto;
}

the-community > .header .search-tools input {
    flex: 1 1 14rem;
    width: 100%;
    color: var(--input-color);
    background: #000000;
    border: 1px solid var(--primary-color);
    border-radius: .25rem;
    padding: .25rem;
    font-size: 1rem;
    outline: none;
    resize: none;
}
the-community > .header .search-tools input::placeholder {
    color: var(--primary-color);
    font-style: italic;
    opacity: .75;
}

the-community > .header .search-tools button {
    flex: 0 0 auto;
    border: 1px solid var(--primary-color);
    background: #000000;
    color: var(--primary-color);
    font-weight: 800;
    border-radius: .25rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

the-community > .header .search-tools button * {
    pointer-events: none;
}

the-community > .header .search-tools button svg {
    width: 100%;
    height: 100%;
    padding: 0;
    fill: var(--primary-color);
}

/* --- Consolidated Tab Bar Styles (also applied in account.css) --- */
/* the-account .tab-bar (selector added in account.css), */
the-community .tab-bar
 {
    align-self: center;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    padding: 0;
    border: 1px solid rgba(var(--primary-rgb), .5);
    background: rgba(0, 0, 0, .75);
    border-radius: .25rem;
    position: relative;
    backdrop-filter: blur(1rem);
    box-shadow: 0px .25rem 1rem 0 rgb(0 0 0 / 50%), inset 0 0 2rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
}

/* the-account .tab-bar a (selector added in account.css), */
the-community .tab-bar a
 {
    display: block;
    text-decoration: none;
    color: var(--primary-color);
    padding: 1rem 2rem;
    position: relative;
    font-weight: 600;
    text-transform: uppercase;
}

/* the-account .tab-bar a.active (selector added in account.css), */
the-community .tab-bar a.active
 {
    color: var(--input-color);
}

/* the-account .tab-bar a.active::after (selector added in account.css), */
the-community .tab-bar a.active::after
 {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
    box-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
}
/* --- End Consolidated Tab Bar Styles --- */


the-community > .content {
    flex: 1 1 auto;
    width: calc(100% - 2rem);
    max-width: 60rem;
    align-self: center;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem;
    margin: 0;
    border: 1px solid rgba(var(--primary-rgb), .5);
    background: rgba(0, 0, 0, .75);
    border-radius: .25rem;
    backdrop-filter: blur(1rem);
    box-shadow: 0px .25rem 1rem 0 rgb(0 0 0 / 50%), inset 0 0 2rem 0 rgba(var(--primary-rgb), calc(var(--glow-intensity) / 3));
}

the-community > .content .community-list-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 1rem;
}

the-community > .content .community-list-item > a {
    flex: 0 0 auto;
    display: block;
    align-self: center;
}
the-community > .content .community-list-item img {
    display: block;
    width: 5rem;
    height: 5rem;
    border-radius: .25rem;
    overflow: hidden;
    object-fit: cover;
}

the-community > .content .community-list-item .content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    gap: .25rem;
}

the-community > .content .community-list-item .content a.title {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

the-community > .content .community-list-item .content .latest {
    font-size: 0.65rem;
    color: rgba(var(--input-rgb), 0.7);
    font-style: italic;
}

the-community > .content .community-list-item .content .meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: auto;
}

the-community > .content .community-list-item .content .meta a {
    padding: 0;
    margin: 0;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
}

the-community > .content .community-list-item svg {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    padding: .5rem;
    fill: var(--secondary-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--secondary-rgb), var(--glow-intensity)));
    align-self: center;
    cursor: pointer;
}

the-community > .content .community-list-item svg.community-delete, the-community > .content .community-list-item svg.is-favorite {
    fill: var(--primary-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
}



the-community > .content .community-post-list-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: stretch;
    gap: 1rem;
}

the-community > .content .community-post-list-item > a {
    flex: 0 0 auto;
    display: block;
    align-self: flex-start;
}
the-community > .content .community-post-list-item img {
    display: block;
    width: 5rem;
    height: 5rem;
    border-radius: .25rem;
    overflow: hidden;
    object-fit: cover;
}

the-community > .content .community-post-list-item .content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    gap: .25rem;
}

the-community > .content .community-post-list-item .content a.title {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    margin-right: auto;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
}
the-community > .content .community-post-list-item .content a.title span.media-count {
    font-size: 0.8rem;
    color: rgba(var(--secondary-rgb), 0.7);
    font-weight: 600;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: .25rem;
}
the-community > .content .community-post-list-item .content a.title span.media-count svg {
    flex: 0 0 1rem;
    fill: rgba(var(--secondary-rgb), 0.7);
    width: 1rem;
    height: 1rem;
}

the-community > .content .community-post-list-item .content .user {
    display: flex;
    flex-direction: row;
    gap: .25rem;
    justify-content: flex-start;
    align-items: center;
}
the-community > .content .community-post-list-item .content .user a.username {
    font-size: 0.8rem;
    color: rgba(var(--secondary-rgb), 0.7);
    font-weight: 600;
    text-decoration: none;
}
the-community > .content .community-post-list-item .content .user a.username.admin {
    color: rgba(var(--admin-username-rgb), 0.7);
}
the-community > .content .community-post-list-item .content .user span.time {
    font-size: 0.65rem;
    color: rgba(var(--input-rgb), 0.7);
    font-style: italic;
}

the-community > .content .community-post-list-item .content .message {
    flex: 1 1 auto;
    padding: .5rem 0;
}

the-community > .content .community-post-list-item .content .meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    margin-top: auto;
}

the-community > .content .community-post-list-item .content .meta svg {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--primary-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
}
the-community > .content .community-post-list-item .content .meta svg * {
    pointer-events: none;
}

the-community > .content .community-post-list-item .content .meta a {
    padding: 0;
    margin: 0;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
}


the-community > .content .post {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: .25rem;
}

the-community > .content .post .title {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

the-community > .content .post .user {
    display: flex;
    flex-direction: row;
    gap: .25rem;
    justify-content: flex-start;
    align-items: baseline;
}
the-community > .content .post .user a {
    font-size: 0.8rem;
    color: rgba(var(--secondary-rgb), 0.7);
    font-weight: 600;
    text-decoration: none;
}
the-community > .content .post .user a.admin {
    color: rgba(var(--admin-username-rgb), 0.7);
}
the-community > .content .post .user span {
    font-size: 0.65rem;
    color: rgba(var(--input-rgb), 0.7);
    font-style: italic;
}

the-community > .content > .post > the-slideshow {
    flex: 0 0 calc(100vh - 14rem);
    max-height: calc(100vh - 14rem);
    margin: .5rem 0;
    object-fit: contain;
    border-radius: .25rem;
    background: #000000;
    border: 1px solid rgba(var(--primary-rgb), .25);
}

the-community > .content .post .message {
    color: var(--input-color);
}

the-community > .content .post .meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    margin-top: .25rem;
}

the-community > .content .post .meta svg {
    flex: 0 0 auto;
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    width: 1.5rem;
    height: 1.5rem;
    fill: var(--primary-color);
    filter: drop-shadow(0 .25rem .25rem rgba(var(--primary-rgb), var(--glow-intensity)));
}
the-community > .content .post .meta svg * {
    pointer-events: none;
}

the-community > .content .post .meta :not(the-reactions) button {
    padding: .25rem 0;
    margin: 0;
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-shadow: 0 .5rem 1.5rem rgba(var(--secondary-rgb), calc(var(--glow-intensity) / 2));
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
}







the-community > .content .compose-reply {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: .5rem;
    margin-top: .25rem;
}
the-community > .content .compose-reply .buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}
/* Base style applied above */
/* the-community > .content .compose-reply .buttons button { ... } */

the-community > .content .compose-reply .buttons button.cancel-reply {
    /* Keep specific cancel styles */
    border: none;
    color: var(--secondary-color);
    box-shadow: none;
    font-weight: 400;
    background: none;
    cursor: pointer;
}

the-community > .content .compose-reply .buttons button.require-auth {
    justify-self: center;
    margin: 0 auto;
}

/* Hide top level compose reply cancel button */
the-community > .content > .post > .compose-reply > .buttons > .cancel-reply {
    display: none;
}

the-community > .content > .post > .compose-reply {
    margin-bottom: 1rem;
}

the-community > .content .compose-reply .media-add, the-community > .content .compose-reply .added-media {
    flex: 0 0 8rem;
    /* width: 100%; */
    width: 8rem;
    height: 8rem;
    align-self: center;
    background: rgba(0, 0, 0, 0);
    cursor: pointer;
    border: 1px solid rgba(var(--primary-rgb), .5);
    border-radius: .25rem;
    overflow: hidden;
}

the-community > .content .compose-reply .media-add *, the-community > .content .compose-reply .added-media * {
    pointer-events: none;
}

the-community > .content .compose-reply .media-add svg {
    width: 100%;
    height: 100%;
    padding: 1rem;
    fill: rgba(var(--primary-rgb), .5);
}
the-community > .content .compose-reply .added-media img {
    width: 100%;
    height: 100%;
    outline: none;
    object-fit: contain;
    padding: 0;
    margin: 0;
}

the-community > .content .compose-reply .media {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    padding: .5rem;
}






the-community > .content > .post > div.divider {
    margin: .25rem 0;
}

the-community > .content .subposts {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    margin: .5rem 0 0 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(var(--primary-rgb), .25);
}
the-community > .content > .post > .subposts {
    margin: 0;
    padding-left: 0;
    border-left: 0;
}
the-community > .content .subposts:empty {
    display: none;
}
the-community > .content .subposts .community-post .subposts {
    margin-left: 1rem;
}

the-community > .content .subposts the-slideshow {
    flex: 0 0 calc(50vh);
    height: calc(50vh);
    margin: .5rem 0;
    object-fit: contain;
    border-radius: .25rem;
    background: #000000;
    border: 1px solid rgba(var(--primary-rgb), .25);
}

/* Base style applied above */
/* the-community > .content .meta > button, the-community > .content .subposts > button { ... } */

the-community > .content .subposts button.show-comments {
    /* Keep specific show-comments styles */
    border: none;
    color: var(--secondary-color);
    box-shadow: none;
    align-self: flex-start;
    background: rgba(0, 0, 0, 0);
    
}


the-community > .content.feed the-slideshow {
    flex: 0 0 20vh;
    max-height: 20vh;
}


/*********** MEDIA QUERIES START HERE ***********/
@media only screen and (max-width: 720px) {

    body {
        padding-bottom: .5rem;
        gap: .5rem;
    }

    the-community {
        gap: .5rem;
    }

    the-community > .header {
        padding: .5rem;
        gap: .5rem;
        width: calc(100% - 1rem);
        flex-direction: column;
    }

    the-community > .header div.community-info {
        gap: .5rem;
        align-self: stretch;
    }

    the-community > .header div.community-info img {
        flex: 0 0 6rem;
        width: 6rem;
        height: 6rem;
    }

    the-community > .header div.community-info > div {
        gap: .125rem;
    }

    the-community > .header div.community-info > div .community-description {
        margin: .25rem 0;
    }

    /* Apply media query to both tab bars */
    /* the-account .tab-bar a (selector added in account.css), */
    the-community .tab-bar a
     {
        padding: .5rem .75rem; /* Adjusted padding from account.css version */
        white-space: nowrap;
        font-size: .8rem;
    }


    the-community > .content {
        width: calc(100% - 1rem);
        padding: .5rem;
        gap: .5rem;
    }

    the-community > .content .community-list-item {
        gap: .5rem;
    }

    the-community > .content .community-post-list-item {
        gap: .5rem;
    }
    the-community > .content .community-post-list-item img {
        width: 5rem;
        height: 5rem;
    }
    the-community > .content .community-post-list-item .content .message {
        padding: .25rem 0;
    }

    the-community > .content .subposts {
        gap: .5rem;
        margin: .5rem 0 0 .5rem;
        padding-left: .5rem;
    }

}
/*********** MEDIA QUERIES END HERE ***********/
