/* ==========================================================================
   tierfreund.de — community pages (pets, photos, BuddyPress, bbPress)
   Loaded only where tf_is_community_page() is true.
   ========================================================================== */

.tf-community-header { margin-bottom: 1.5rem; }
.tf-community-header__intro { color: var(--tf-grey); max-width: 46rem; }

/* ---------- Pets ---------- */
.tf-pet-grid { display: grid; gap: 1.5rem var(--tf-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); margin-bottom: 2rem; }
.tf-pet-grid--small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
.tf-pet-card { min-width: 0; }
.tf-pet-card__media { position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 50% 50% var(--tf-radius) var(--tf-radius) / 30% 30% var(--tf-radius) var(--tf-radius); background: var(--tf-rose-light); text-decoration: none; }
.tf-pet-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tf-pet-card:hover .tf-pet-card__media img { transform: scale(1.04); }
.tf-pet-card__placeholder { font-size: 3rem; opacity: .5; }
.tf-pet-card__status { position: absolute; inset: auto 0 0; padding: .25rem; background: rgb(0 0 0 / .6); color: #fff; font-size: .75rem; text-align: center; }
.tf-pet-card.is-pending .tf-pet-card__media img, .tf-photo-tile.is-pending img { opacity: .6; }
.tf-pet-card__name { margin: .6rem 0 .1rem; font-size: 1.5rem; }
.tf-pet-card__name a { color: var(--tf-burgundy); text-decoration: none; }
.tf-pet-card__name a:hover { text-decoration: underline; }
.tf-pet-card__meta, .tf-pet-card__owner { margin: 0; font-size: .8125rem; color: var(--tf-muted); }

/* Profile (pet page) */
.tf-profile { display: grid; gap: var(--tf-gap); padding: 2rem 0 3rem; }
@media (min-width: 860px) { .tf-profile { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } }
.tf-profile__card { padding: 1rem 1rem 1.25rem; background: var(--tf-rose); border-radius: var(--tf-radius); }
@media (min-width: 860px) { .tf-profile__card { position: sticky; top: 1rem; } }
.tf-profile__image { display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: var(--tf-radius); background: var(--tf-rose-light); }
.tf-profile__image img { width: 100%; height: 100%; object-fit: cover; }
.tf-profile__name { margin: .9rem 0 .4rem; font-size: 2.6rem; }
.tf-facts { margin: 0 0 1rem; font-size: .9375rem; }
.tf-facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid rgb(255 255 255 / .7); }
.tf-facts dt { font-weight: 700; color: var(--tf-burgundy); }
.tf-facts dd { margin: 0; overflow-wrap: anywhere; }
.tf-profile__owner { display: flex; align-items: center; gap: .6rem; font-size: .875rem; }
.tf-profile__owner img { width: 32px; height: 32px; border-radius: 50%; }
.tf-profile__actions { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .75rem; }
.tf-profile__main > .tf-heading:first-child { margin-top: 0; }

/* ---------- Photos ---------- */
.tf-photo-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin-bottom: 2rem; }
.tf-photo-tile { position: relative; margin: 0; min-width: 0; }
.tf-photo-tile a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--tf-radius); background: var(--tf-beige-light); }
.tf-photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tf-photo-tile a:hover img { transform: scale(1.04); }
.tf-photo-tile figcaption { margin-top: .3rem; font-size: .8125rem; color: var(--tf-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tf-photo-single { display: grid; gap: var(--tf-gap); padding: 2rem 0 3rem; }
@media (min-width: 960px) { .tf-photo-single { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.tf-photo-single__figure { margin: 0; background: #1d1d1d; border-radius: var(--tf-radius); overflow: hidden; }
.tf-photo-single__figure img { width: 100%; max-height: 80vh; object-fit: contain; }
.tf-photo-single__title { margin-top: 0; }
.tf-photo-single__nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin: 1.25rem 0; padding: .75rem 0; border-block: 1px solid var(--tf-beige); font-size: .875rem; font-weight: 700; }
.tf-photo-single__nav a { text-decoration: none; }

/* ==========================================================================
   BuddyPress (Nouveau template pack) — tierfreund colours
   ========================================================================== */
.tf-community-content { font-size: .9375rem; }
#buddypress { --bp-accent: var(--tf-burgundy); }
#buddypress a { color: var(--tf-burgundy); }
#buddypress .bp-navs ul li a { font-family: var(--tf-font-display); font-size: 1.2rem; color: var(--tf-grey); }
#buddypress .bp-navs ul li.current a, #buddypress .bp-navs ul li.selected a,
#buddypress .bp-navs ul li a:hover { color: var(--tf-burgundy); }
#buddypress .main-navs:not(.dir-navs) ul li.current a, #buddypress .main-navs:not(.dir-navs) ul li.selected a { background: var(--tf-rose); }
#buddypress .bp-navs ul li .count { background: var(--tf-burgundy); color: #fff; border: 0; }
#buddypress .bp-subnavs, #buddypress .subnav-filters { background: var(--tf-beige-light); }
#buddypress input[type="submit"], #buddypress button:not(.tf-reaction):not(.tf-link-button):not(.tf-account__toggle),
#buddypress .button, #buddypress a.button, #buddypress .generic-button a, #buddypress .generic-button button {
	background: var(--tf-burgundy); border: 1px solid var(--tf-burgundy); color: #fff; border-radius: var(--tf-radius);
	font: 600 .875rem/1.2 var(--tf-font); padding: .55em 1em; text-decoration: none;
}
#buddypress input[type="submit"]:hover, #buddypress .button:hover, #buddypress .generic-button a:hover, #buddypress .generic-button button:hover {
	background: var(--tf-burgundy-dark); border-color: var(--tf-burgundy-dark); color: #fff;
}
#buddypress #item-header { background: var(--tf-rose); border-radius: var(--tf-radius); padding: 1.25rem; margin-bottom: 1.5rem; }
#buddypress #item-header .user-nicename { color: var(--tf-grey); }
#buddypress #item-header h2, #buddypress .item-title { font-family: var(--tf-font-display); color: var(--tf-burgundy); }
#buddypress #item-header-avatar img, #buddypress .item-avatar img { border-radius: 50%; }
#buddypress .activity-list .activity-item { border-color: var(--tf-beige); }
#buddypress .activity-list .activity-content .activity-inner img { max-width: 240px; border-radius: var(--tf-radius); margin-top: .5rem; }
#buddypress .bp-list li { border-color: var(--tf-beige); }
#buddypress .bp-feedback { border-radius: var(--tf-radius); }
#buddypress .bp-feedback.info .bp-icon, #buddypress .bp-feedback.help .bp-icon { background-color: var(--tf-burgundy-mid); }
#buddypress .standard-form label, #buddypress .standard-form span.label { font-weight: 700; }
#buddypress .grid > li .list-wrap { background: #fff; border-color: var(--tf-beige); }
.buddypress-wrap .bp-dir-hori-nav:not(.bp-vertical-navs) nav:not(.tabbed-links) { border-color: var(--tf-beige); box-shadow: none; }
/* The plugins template we use for our tabs: let our grids breathe */
#buddypress .tf-pet-grid, #buddypress .tf-photo-grid { margin-top: 1rem; }
#buddypress .tf-pet-card__name a, #buddypress .tf-pet-card__name { font-family: var(--tf-font-display); }

/* Registration */
#buddypress #signup-form .layout-wrap { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { #buddypress #signup-form .layout-wrap { grid-template-columns: 1fr 1fr; } }
#buddypress #signup-form .register-section { width: auto; float: none; }
#buddypress #signup-form h2 { font-size: 1.6rem; }

/* ==========================================================================
   bbPress
   ========================================================================== */
#bbpress-forums { font-size: .9375rem; }
#bbpress-forums div.bbp-breadcrumb, #bbpress-forums .bbp-breadcrumb { font-size: .8125rem; }
#bbpress-forums ul.bbp-forums, #bbpress-forums ul.bbp-topics, #bbpress-forums ul.bbp-replies, #bbpress-forums ul.bbp-lead-topic { border-color: var(--tf-beige); border-radius: var(--tf-radius); overflow: hidden; font-size: .9375rem; }
#bbpress-forums li.bbp-header, #bbpress-forums li.bbp-footer { background: var(--tf-rose); border-color: var(--tf-beige); font-weight: 700; color: var(--tf-burgundy); }
#bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic { border-color: var(--tf-beige-light); }
#bbpress-forums .bbp-forum-title, #bbpress-forums .bbp-topic-permalink { font-weight: 700; font-size: 1rem; }
#bbpress-forums div.odd, #bbpress-forums ul.odd { background: #fbfbf8; }
#bbpress-forums div.bbp-reply-header, #bbpress-forums div.bbp-topic-header { background: var(--tf-beige-light); border-color: var(--tf-beige); }
#bbpress-forums .tf-is-answer { background: #eef6ec !important; box-shadow: inset 4px 0 0 var(--tf-green); }
.tf-answer-badge { display: inline-block; margin: 0 0 .5rem; padding: .15em .6em; border-radius: 1em; background: var(--tf-green); color: #fff; font-size: .75rem; font-weight: 700; }
.tf-answer-form { margin-left: .5rem; }
#bbpress-forums fieldset.bbp-form { border-color: var(--tf-beige); border-radius: var(--tf-radius); padding: 1rem 1.25rem; }
#bbpress-forums fieldset.bbp-form legend { font-family: var(--tf-font-display); font-size: 1.5rem; color: var(--tf-burgundy); padding: 0 .3rem; }
#bbpress-forums .button.submit, #bbpress-forums button.submit {
	background: var(--tf-burgundy); color: #fff; border: 0; border-radius: var(--tf-radius); padding: .6em 1.2em; font-weight: 700; cursor: pointer;
}
#bbpress-forums .bbp-author-avatar img { border-radius: 50%; }
#bbpress-forums p.bbp-topic-meta img.avatar, #bbpress-forums ul.bbp-reply-revision-log img.avatar { border-radius: 50%; }
.bbp-pagination-links a, .bbp-pagination-links span.current { border-radius: var(--tf-radius); }

@media (max-width: 640px) {
	#bbpress-forums li.bbp-forum-info, #bbpress-forums li.bbp-topic-title { width: 100%; }
	#bbpress-forums li.bbp-forum-topic-count, #bbpress-forums li.bbp-forum-reply-count, #bbpress-forums li.bbp-topic-voice-count, #bbpress-forums li.bbp-topic-reply-count { display: none; }
	#bbpress-forums li.bbp-forum-freshness, #bbpress-forums li.bbp-topic-freshness { width: 100%; text-align: left; font-size: .75rem; }
}
