/* BMP Groups — frontend
 * Theme tokens are wrapped under html.light-mode / html.dark-mode per site convention.
 * Structural rules (layout/spacing) are bare so layout works regardless of mode.
 */

/* ---------- Layout ---------- */
.bmp-groups-page {
    width: 100%;
    max-width: none;
    margin: 3px 0 24px;
    padding: 0 32px;
}
.bmp-group-single { padding: 0; }
.bmp-groups-empty { padding: 32px; text-align: center; opacity: 0.7; }

/* ---------- Directory hero ---------- */
html.light-mode .bmp-groups-hero,
html.dark-mode .bmp-groups-hero {
    position: relative;
    grid-column: 1 / -1;
    flex: 0 0 100%;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    margin: 3px 0 2px;
    border-radius: 8px;
    overflow: hidden;
    color: #ffffff;
    background: #07120f;
    box-sizing: border-box;
}

.bmp-groups-hero,
.bmp-groups-hero * { box-sizing: border-box; }

.bmp-groups-hero__slides {
    position: relative;
    min-height: 340px;
}

.bmp-groups-hero__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(300px, 1.05fr);
    align-items: center;
    gap: 22px;
    min-height: 340px;
    padding: 34px 48px 44px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease;
}

.bmp-groups-hero__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.bmp-groups-hero__slide--one {
    background:
        radial-gradient(circle at 72% 14%, rgba(255, 255, 255, 0.24), transparent 29%),
        linear-gradient(112deg, #041615 0%, #0a4b39 54%, #9b6b18 100%);
}

.bmp-groups-hero__slide--two {
    background:
        radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.2), transparent 30%),
        linear-gradient(112deg, #0a1022 0%, #273f7b 51%, #8f3154 100%);
}

.bmp-groups-hero__slide--three {
    background:
        radial-gradient(circle at 72% 16%, rgba(255, 255, 255, 0.22), transparent 30%),
        linear-gradient(112deg, #15100b 0%, #60401f 50%, #0b6570 100%);
}

.bmp-groups-hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 18%, rgba(255, 255, 255, 0.18), transparent 34%);
    pointer-events: none;
}

.bmp-groups-hero__copy,
.bmp-groups-hero__groups,
.bmp-groups-hero__dots {
    position: relative;
    z-index: 2;
}

.bmp-groups-hero__copy {
    max-width: 610px;
    min-width: 0;
}

.bmp-groups-hero__eyebrow {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
}

.bmp-groups-hero__title {
    max-width: 640px;
    margin: 0 0 18px;
    font-size: 56px;
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: 0;
    color: #ffffff;
    overflow-wrap: anywhere;
}

.bmp-groups-hero__slide--two .bmp-groups-hero__title {
    font-size: 50px;
}

.bmp-groups-hero__slide--three .bmp-groups-hero__title {
    font-size: 48px;
}

.bmp-groups-hero__body {
    max-width: 560px;
    margin: 0 0 24px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.28;
    color: rgba(255, 255, 255, 0.94);
}

.bmp-groups-hero__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 7px;
    background: #ffffff;
    color: #06110f;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.bmp-groups-hero__button:hover,
.bmp-groups-hero__button:focus {
    color: #06110f;
    text-decoration: none;
    transform: translateY(-1px);
}

.bmp-groups-hero__groups {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 250px;
    padding: 12px 6px 28px;
}

.bmp-groups-hero__group {
    position: relative;
    width: 178px;
    margin: 0;
    text-align: center;
    transition: transform 180ms ease;
    z-index: 2;
}

.bmp-groups-hero__group--1 {
    transform: translate(28px, 28px) rotate(-5deg);
    z-index: 2;
}

.bmp-groups-hero__group--2 {
    width: 208px;
    transform: translateY(-8px);
    z-index: 3;
}

.bmp-groups-hero__group--3 {
    transform: translate(-28px, 34px) rotate(5deg);
    z-index: 1;
}

.bmp-groups-hero__group--1:hover,
.bmp-groups-hero__group--1:focus-within {
    transform: translate(28px, 16px) rotate(-5deg) scale(1.08);
    z-index: 5;
}

.bmp-groups-hero__group--2:hover,
.bmp-groups-hero__group--2:focus-within {
    transform: translateY(-20px) scale(1.08);
    z-index: 5;
}

.bmp-groups-hero__group--3:hover,
.bmp-groups-hero__group--3:focus-within {
    transform: translate(-28px, 22px) rotate(5deg) scale(1.08);
    z-index: 5;
}

.bmp-groups-hero__group-link {
    display: block;
    color: #ffffff;
    text-decoration: none;
}

.bmp-groups-hero__group-link:hover,
.bmp-groups-hero__group-link:focus {
    color: #ffffff;
    text-decoration: none;
}

.bmp-groups-hero__group img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 5px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    object-fit: cover;
    background: #080808;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.28);
}

.bmp-groups-hero__group figcaption {
    display: block;
    max-width: 100%;
    margin-top: 9px;
    padding: 5px 4px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.15;
    color: #ffffff;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bmp-groups-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 20px;
    display: flex;
    gap: 12px;
    transform: translateX(-50%);
}

.bmp-groups-hero__dot {
    width: 16px;
    height: 16px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.bmp-groups-hero__dot.is-active {
    background: #ffffff;
}

.bmp-groups-categories {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    flex: 0 0 100%;
    flex-wrap: nowrap;
    gap: 16px;
    grid-column: 1 / -1;
    margin: 8px 0;
    overflow: hidden;
    padding: 0 4px;
    white-space: nowrap;
    width: 100%;
}

.bmp-groups-categories span,
.bmp-groups-categories__scroller a {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none;
}

.bmp-groups-categories span {
    color: #0b5f94;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.bmp-groups-categories__scroller {
    display: flex;
    flex: 1 1 auto;
    gap: 17px;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.bmp-groups-categories__scroller::-webkit-scrollbar {
    display: none;
}

.bmp-groups-categories__scroller a {
    color: inherit;
    flex: 0 0 auto;
    font-weight: 700;
}

.bmp-groups-categories__scroller a:hover,
.bmp-groups-categories__scroller a:focus {
    color: #0b5f94;
    text-decoration: none;
}

/* ---------- Buttons ---------- */
.bmp-groups-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 32px; padding: 0 15px; border-radius: 6px;
    border-style: solid; border-width: 1px;
    cursor: pointer; font-weight: 600; text-decoration: none;
    font-size: 14px; line-height: 1; box-sizing: border-box;
    white-space: nowrap;
}
.bmp-groups-btn.bmp-disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

/* Gray 3D Static */
.bmp-groups-btn-gray,
.bmp-groups-btn:not([class*="bmp-groups-btn-"]) {
    background: linear-gradient(180deg, #e2e2e2, #d4d4d4);
    border-top-color: #f0f0f0; border-left-color: #f0f0f0;
    border-right-color: #b0b0b0; border-bottom-color: #b0b0b0;
    color: #2d2d2d;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.18);
}

/* Dark Gray 3D Static */
.bmp-groups-btn-dark {
    background: linear-gradient(180deg, #383838, #343434);
    border-top-color: #555555; border-left-color: #555555;
    border-right-color: #282828; border-bottom-color: #282828;
    color: #ffffff;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.4);
}

/* Green 3D Static */
.bmp-groups-btn-primary {
    background: linear-gradient(180deg, #2d7c2d, #1f5f1f);
    border-top-color: #3d9d3d; border-left-color: #3d9d3d;
    border-right-color: #1a4d1a; border-bottom-color: #1a4d1a;
    color: #ffffff;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
}

/* Teal Hologram Static */
.bmp-groups-btn-teal {
    background: linear-gradient(180deg, #ccfff6, #99ffe8);
    border: 2px solid #00cc99;
    color: #007755;
    box-shadow: 0 0 0 3px rgba(0,204,153,0.15), 0 4px 8px rgba(0,204,153,0.2);
}

/* ---------- Header ---------- */
.bmp-group-header { border-radius: 12px; overflow: hidden; }
.bmp-group-cover {
    height: 280px; background-size: cover; background-position: center;
    position: relative;
}
.bmp-cover-edit {
    position: absolute; right: 16px; bottom: 16px;
    padding: 6px 12px; border-radius: 999px; border: 0;
    background: rgba(0,0,0,0.55); color: #fff; cursor: pointer;
}
.bmp-group-headbar {
    display: flex; align-items: center; gap: 16px;
    padding: 12px 16px;
}
.bmp-group-avatar-wrap { position: relative; margin-top: -56px; }
.bmp-group-avatar {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover; border: 4px solid transparent;
}
.bmp-avatar-edit {
    position: absolute; right: 4px; bottom: 4px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 0; cursor: pointer;
}
.bmp-group-titlebar { flex: 1; }
.bmp-group-title { margin: 0; font-size: 24px; }
.bmp-group-meta { margin: 4px 0 0; display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.bmp-group-status,
.bmp-group-role,
.bmp-member-role,
.bmp-dir-status { padding: 2px 8px; border-radius: 999px; font-size: 11px; text-transform: capitalize; }
.bmp-group-actions { margin-left: auto; }

/* ---------- Tabs nav ---------- */
.bmp-group-tabs-nav { margin: 16px 0; border-bottom: 1px solid; }
.bmp-group-tabs-nav ul { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.bmp-group-tabs-nav .bmp-tab a {
    display: block; padding: 10px 14px; text-decoration: none;
    border-bottom: 3px solid transparent; font-weight: 500;
}
.bmp-group-tabs-nav .bmp-tab.is-active a { border-bottom-color: currentColor; font-weight: 700; }

/* ---------- Tab content ---------- */
.bmp-group-tab-content { padding: 8px 0 40px; }
.bmp-group-forum { display: grid; gap: 18px; }
.bmp-group-forum-head h2,
.bmp-group-forum-topic h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; }
.bmp-group-forum-head p,
.bmp-forum-meta,
.bmp-forum-breadcrumb,
.bmp-group-forum-topic-row p { margin: 0; font-size: 13px; opacity: 0.78; }
.bmp-group-forum-form { display: grid; gap: 10px; max-width: 760px; }
.bmp-group-forum-form h3 { margin: 0; font-size: 18px; }
.bmp-group-forum-form label { font-weight: 700; font-size: 13px; }
.bmp-group-forum-form input,
.bmp-group-forum-form textarea {
    width: 100%;
    border: 1px solid currentColor;
    border-radius: 6px;
    padding: 10px 12px;
    background: transparent;
    color: inherit;
    box-sizing: border-box;
}
.bmp-group-forum-topics,
.bmp-forum-replies { display: grid; gap: 10px; }
.bmp-group-forum-topic-row,
.bmp-forum-post,
.bmp-forum-reply {
    border: 1px solid;
    border-radius: 8px;
    padding: 14px;
}
.bmp-group-forum-topic-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}
.bmp-group-forum-topic-row h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.25; }
.bmp-group-forum-stats { display: grid; gap: 2px; text-align: right; font-size: 13px; }
.bmp-forum-reply header { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
html.light-mode .bmp-group-forum-topic-row,
html.light-mode .bmp-forum-post,
html.light-mode .bmp-forum-reply { border-color: #e5e7eb; background: #fff; }
html.dark-mode .bmp-group-forum-topic-row,
html.dark-mode .bmp-forum-post,
html.dark-mode .bmp-forum-reply { border-color: #2a2a2a; background: #151515; }
html.light-mode .bmp-notice-error { background: #fee2e2; color: #991b1b; }
html.dark-mode .bmp-notice-error { background: #451a1a; color: #fecaca; }
@media (max-width: 640px) {
    .bmp-group-forum-topic-row { grid-template-columns: 1fr; }
    .bmp-group-forum-stats { text-align: left; }
}
.bmp-tab-pane h2 { margin-top: 0; }

.bmp-home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.bmp-tab-side .bmp-card { padding: 16px; border-radius: 10px; margin-bottom: 16px; }
.bmp-card h3 { margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.bmp-member-mini { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 10px; list-style: none; }
.bmp-member-mini img { width: 36px; height: 36px; border-radius: 50%; }
.bmp-owner-row { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.bmp-owner-row img { width: 40px; height: 40px; border-radius: 50%; }

.bmp-about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.bmp-about-meta { padding: 0; margin: 0; list-style: none; }
.bmp-about-meta li { padding: 4px 0; }

.bmp-activity-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.bmp-activity-main { }

.bmp-members-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.bmp-members-main { }

.bmp-tab-side .bmp-card { padding: 16px; border-radius: 10px; margin-bottom: 16px; }

/* ---------- Manage page ---------- */
.bmp-manage-card {
    padding: 24px; border-radius: 12px; margin-bottom: 24px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.08);
}
.bmp-manage-card h2 { margin-top: 0; margin-bottom: 16px; }
.bmp-manage-card h3 { margin-top: 20px; margin-bottom: 12px; }
.bmp-manage-card p.description { font-size: 13px; margin: 0 0 16px; }

.bmp-field { margin-bottom: 16px; }
.bmp-field label { display: block; font-weight: 500; margin-bottom: 6px; }
.bmp-field input[type="text"],
.bmp-field input[type="email"],
.bmp-field input[type="file"],
.bmp-field select,
.bmp-field textarea {
    width: 100%; padding: 8px 12px; border-radius: 6px;
    font-size: 14px; box-sizing: border-box;
}
.bmp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bmp-field-row > div { min-width: 0; }

.bmp-tabs-config { margin-bottom: 16px; }
.bmp-tabs-config input[type="text"],
.bmp-tabs-config input[type="number"],
.bmp-tabs-config select { width: 100%; padding: 6px 8px; font-size: 13px; }

.bmp-mod-list { list-style: none; padding: 0; margin: 0 0 16px; }
.bmp-mod-list li { padding: 12px; border-radius: 8px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.bmp-mod-list img { width: 40px; height: 40px; border-radius: 50%; }
.bmp-mod-list a { text-decoration: none; }

.bmp-manage-card-danger { border-top: 4px solid #dc2626; }

/* 3D Button styles */
.bmp-groups-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 32px; padding: 0 15px; border-radius: 6px;
    border: 1px solid; font-weight: 600; font-size: 14px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: all 0.2s ease;
}
.bmp-groups-btn:hover { transform: translateY(-1px); }
.bmp-groups-btn:active { transform: translateY(1px); }

.bmp-groups-btn-primary {
    background: linear-gradient(180deg, #2d7c2d, #1f5f1f);
    border-color: #1a4d1a; border-top-color: #3d9d3d; border-left-color: #3d9d3d;
    border-right-color: #1a4d1a; border-bottom-color: #1a4d1a;
    color: #ffffff;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.3);
}

.bmp-groups-btn-gray {
    background: linear-gradient(180deg, #e2e2e2, #d4d4d4);
    border-color: #b0b0b0; border-top-color: #f0f0f0; border-left-color: #f0f0f0;
    border-right-color: #b0b0b0; border-bottom-color: #b0b0b0;
    color: #2d2d2d;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.18);
}

.bmp-groups-btn-danger {
    background: linear-gradient(180deg, #7f1d1d, #6b1111);
    border-color: #5a0e0e; border-top-color: #991b1b; border-left-color: #991b1b;
    border-right-color: #5a0e0e; border-bottom-color: #5a0e0e;
    color: #fee2e2;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.4);
}

/* ---------- Members ---------- */
.bmp-member-list { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.bmp-member-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
}
.bmp-member-link { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 1; }
.bmp-member-link img { width: 48px; height: 48px; border-radius: 50%; }
.bmp-member-actions { display: flex; gap: 6px; align-items: center; }
.bmp-member-actions .bmp-role-select { padding: 4px 8px; border-radius: 6px; }
.bmp-btn-remove,
.bmp-btn-ban {
    padding: 4px 10px; border-radius: 999px; border: 0; font-size: 12px; cursor: pointer;
}

/* ---------- Directory ---------- */
.bmp-dir-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.bmp-dir-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.bmp-dir-filters input[type="search"] { flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid; }
.bmp-dir-cat-select { height: 32px; padding: 0 10px; border-radius: 6px; border: 1px solid; font-size: 14px; cursor: pointer; }

.bmp-dir-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 0; margin: 0; list-style: none; }
.bmp-dir-card { border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.bmp-dir-cover { display: block; height: 120px; background-size: cover; background-position: center; }
.bmp-dir-body { padding: 12px 14px; position: relative; }
.bmp-dir-avatar { width: 56px; height: 56px; border-radius: 50%; position: absolute; top: -28px; right: 14px; border: 3px solid; }
.bmp-dir-card h3 { margin: 4px 0; font-size: 16px; }
.bmp-dir-card h3 a { text-decoration: none; }
.bmp-dir-meta { display: flex; gap: 8px; font-size: 12px; opacity: 0.85; margin: 4px 0; }
.bmp-dir-excerpt { font-size: 13px; line-height: 1.4; margin: 6px 0 0; }
.bmp-dir-pager { margin-top: 24px; text-align: center; }

/* ---------- Create form ---------- */
.bmp-create-form .bmp-field { margin-bottom: 14px; display: block; }
.bmp-create-form label { display: block; margin-bottom: 4px; font-weight: 600; }
.bmp-create-form input[type="text"],
.bmp-create-form select,
.bmp-create-form textarea { width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid; }
.bmp-field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.bmp-groups-error { padding: 10px 14px; border-radius: 8px; }

.bmp-create-panel {
    box-sizing: border-box;
    max-width: 920px;
    margin: 14px auto 36px;
    padding: 20px;
    border-radius: 10px;
}

.bmp-create-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid;
}

.bmp-create-panel__header p {
    margin: 0 0 4px;
    color: #0b5f94;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.bmp-create-panel__header h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 900;
    line-height: 1.05;
}

.bmp-create-form {
    display: grid;
    gap: 12px;
}

.bmp-create-form .bmp-field {
    display: grid;
    gap: 6px;
}

.bmp-create-form .bmp-field label {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.bmp-create-form input[type="text"],
.bmp-create-form select,
.bmp-create-form textarea,
.bmp-create-form input[type="file"] {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid;
    border-radius: 7px;
    font-size: 14px;
}

.bmp-create-form input[type="text"],
.bmp-create-form select {
    min-height: 40px;
    padding: 0 12px;
}

.bmp-create-form textarea {
    min-height: 112px;
    padding: 10px 12px;
    resize: vertical;
}

.bmp-create-form input[type="file"] {
    min-height: 40px;
    padding: 8px 10px;
}

.bmp-create-form__row,
.bmp-field-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bmp-create-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

/* ---------- Manage tab ---------- */
.bmp-manage-nav { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid; }
.bmp-manage-nav a { padding: 8px 12px; text-decoration: none; border-bottom: 2px solid transparent; }
.bmp-manage-nav a.is-active { border-bottom-color: currentColor; font-weight: 700; }
.bmp-manage-section { display: none; padding: 16px 0; }
.bmp-manage-section.is-active { display: block; }
.bmp-manage-danger { border-top: 1px solid; }
.bmp-perm-matrix { width: 100%; border-collapse: collapse; }
.bmp-perm-matrix th, .bmp-perm-matrix td { padding: 8px; text-align: center; border: 1px solid; }
.bmp-perm-matrix th:first-child, .bmp-perm-matrix td:first-child { text-align: left; }
.bmp-mod-list { padding: 0; margin: 0; list-style: none; display: flex; gap: 8px; flex-wrap: wrap; }
.bmp-mod-list li { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; }
.bmp-mod-list img { width: 24px; height: 24px; border-radius: 50%; }
.bmp-add-role-form { display: flex; gap: 8px; margin-top: 12px; }
.bmp-add-role-form input { padding: 8px 12px; border-radius: 8px; border: 1px solid; }
.bmp-notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }

/* ---------- Light mode ---------- */


html.light-mode .bmp-group-header { background: #ffffff; border: 1px solid #e5e7eb; }
html.light-mode .bmp-group-avatar { border-color: #ffffff; }
html.light-mode .bmp-avatar-edit { background: #ffffff; color: #1f2937; }
html.light-mode .bmp-group-title { color: #1f2937; }
html.light-mode .bmp-group-meta { color: #6b7280; }

html.light-mode .bmp-status-public,    html.light-mode .bmp-role-member  { background: #d1fae5; color: #065f46; }
html.light-mode .bmp-status-private,   html.light-mode .bmp-role-moderator { background: #dbeafe; color: #1e40af; }
html.light-mode .bmp-status-hidden,    html.light-mode .bmp-role-admin     { background: #fef3c7; color: #92400e; }
html.light-mode .bmp-status-secret,    html.light-mode .bmp-role-owner     { background: #fee2e2; color: #991b1b; }
html.light-mode .bmp-role-banned { background: #1f2937; color: #ffffff; }

html.light-mode .bmp-group-tabs-nav { border-bottom-color: #e5e7eb; }
html.light-mode .bmp-group-tabs-nav .bmp-tab a { color: #6b7280; }
html.light-mode .bmp-group-tabs-nav .bmp-tab a:hover { color: #1f2937; }
html.light-mode .bmp-group-tabs-nav .bmp-tab.is-active a { color: #2563eb; border-bottom-color: #2563eb; }

html.light-mode .bmp-tab-side .bmp-card,
html.light-mode .bmp-member-row,
html.light-mode .bmp-dir-card,
html.light-mode .bmp-mod-list li { background: #ffffff; border: 1px solid #e5e7eb; }
html.light-mode .bmp-dir-avatar { border-color: #ffffff; }
html.light-mode .bmp-dir-card h3 a { color: #1f2937; }
html.light-mode .bmp-dir-filters input[type="search"],
html.light-mode .bmp-dir-cat-select,
html.light-mode .bmp-create-form input,
html.light-mode .bmp-create-form select,
html.light-mode .bmp-create-form textarea,
html.light-mode .bmp-add-role-form input { border-color: #e5e7eb; background: #ffffff; color: #1f2937; }

html.light-mode .bmp-btn-remove { background: #fee2e2; color: #991b1b; }
html.light-mode .bmp-btn-ban    { background: #1f2937; color: #ffffff; }
html.light-mode .bmp-groups-error { background: #fee2e2; color: #991b1b; }
html.light-mode .bmp-notice-success { background: #d1fae5; color: #065f46; }
html.light-mode .bmp-create-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
html.light-mode .bmp-create-panel__header { border-bottom-color: #e5e7eb; }
html.light-mode .bmp-create-panel__header h1,
html.light-mode .bmp-create-form .bmp-field label { color: #1f2937; }
html.light-mode .bmp-create-form input[type="text"],
html.light-mode .bmp-create-form select,
html.light-mode .bmp-create-form textarea,
html.light-mode .bmp-create-form input[type="file"] {
    background: #ffffff;
    border-color: #d1d5db;
    color: #111827;
}
html.light-mode .bmp-create-form input:focus,
html.light-mode .bmp-create-form select:focus,
html.light-mode .bmp-create-form textarea:focus {
    border-color: #0b5f94;
    box-shadow: 0 0 0 3px rgba(11, 95, 148, 0.12);
    outline: none;
}

html.light-mode .bmp-manage-nav { border-bottom-color: #e5e7eb; }
html.light-mode .bmp-manage-nav a { color: #6b7280; }
html.light-mode .bmp-manage-nav a.is-active { color: #2563eb; border-bottom-color: #2563eb; }
html.light-mode .bmp-perm-matrix th, html.light-mode .bmp-perm-matrix td { border-color: #e5e7eb; }
html.light-mode .bmp-perm-matrix thead th { background: #f3f4f6; }
html.light-mode .bmp-manage-danger { border-top-color: #fee2e2; }

/* ---------- Dark mode ---------- */


html.dark-mode .bmp-group-header { background: #000000; border: 1px solid #2a2a2a; }
html.dark-mode .bmp-group-avatar { border-color: #000000; }
html.dark-mode .bmp-avatar-edit { background: #1a1a1a; color: #e0e0e0; }
html.dark-mode .bmp-group-title { color: #e0e0e0; }
html.dark-mode .bmp-group-meta { color: #9ca3af; }

html.dark-mode .bmp-status-public,    html.dark-mode .bmp-role-member  { background: #064e3b; color: #d1fae5; }
html.dark-mode .bmp-status-private,   html.dark-mode .bmp-role-moderator { background: #1e3a8a; color: #dbeafe; }
html.dark-mode .bmp-status-hidden,    html.dark-mode .bmp-role-admin     { background: #78350f; color: #fef3c7; }
html.dark-mode .bmp-status-secret,    html.dark-mode .bmp-role-owner     { background: #7f1d1d; color: #fee2e2; }
html.dark-mode .bmp-role-banned { background: #ffffff; color: #1f2937; }

html.dark-mode .bmp-group-tabs-nav { border-bottom-color: #2a2a2a; }
html.dark-mode .bmp-group-tabs-nav .bmp-tab a { color: #9ca3af; }
html.dark-mode .bmp-group-tabs-nav .bmp-tab a:hover { color: #e0e0e0; }
html.dark-mode .bmp-group-tabs-nav .bmp-tab.is-active a { color: #2da44e; border-bottom-color: #2da44e; }

html.dark-mode .bmp-tab-side .bmp-card,
html.dark-mode .bmp-member-row,
html.dark-mode .bmp-dir-card,
html.dark-mode .bmp-mod-list li { background: #000000; border: 1px solid #2a2a2a; }
html.dark-mode .bmp-dir-avatar { border-color: #000000; }
html.dark-mode .bmp-dir-card h3 a { color: #e0e0e0; }
html.dark-mode .bmp-dir-filters input[type="search"],
html.dark-mode .bmp-dir-cat-select,
html.dark-mode .bmp-create-form input,
html.dark-mode .bmp-create-form select,
html.dark-mode .bmp-create-form textarea,
html.dark-mode .bmp-add-role-form input { border-color: #333; background: #1a1a1a; color: #e0e0e0; }

html.dark-mode .bmp-btn-remove { background: #7f1d1d; color: #fee2e2; }
html.dark-mode .bmp-btn-ban    { background: #ffffff; color: #1f2937; }
html.dark-mode .bmp-groups-error { background: #7f1d1d; color: #fee2e2; }
html.dark-mode .bmp-notice-success { background: #064e3b; color: #d1fae5; }
html.dark-mode .bmp-create-panel {
    background: #101214;
    border: 1px solid #2a2a2a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}
html.dark-mode .bmp-create-panel__header { border-bottom-color: #2a2a2a; }
html.dark-mode .bmp-create-panel__header h1,
html.dark-mode .bmp-create-form .bmp-field label { color: #e5e7eb; }
html.dark-mode .bmp-create-form input[type="text"],
html.dark-mode .bmp-create-form select,
html.dark-mode .bmp-create-form textarea,
html.dark-mode .bmp-create-form input[type="file"] {
    background: #181b1f;
    border-color: #33383f;
    color: #f4f4f5;
}
html.dark-mode .bmp-create-form input:focus,
html.dark-mode .bmp-create-form select:focus,
html.dark-mode .bmp-create-form textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
    outline: none;
}

html.dark-mode .bmp-manage-nav { border-bottom-color: #2a2a2a; }
html.dark-mode .bmp-manage-nav a { color: #9ca3af; }
html.dark-mode .bmp-manage-nav a.is-active { color: #2da44e; border-bottom-color: #2da44e; }
html.dark-mode .bmp-perm-matrix th, html.dark-mode .bmp-perm-matrix td { border-color: #2a2a2a; }
html.dark-mode .bmp-perm-matrix thead th { background: #1a1a1a; }
html.dark-mode .bmp-manage-danger { border-top-color: #7f1d1d; }

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .bmp-groups-page {
        padding: 0 14px;
    }

    .bmp-create-panel {
        margin: 10px 0 28px;
        padding: 16px;
        border-radius: 8px;
    }

    .bmp-create-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .bmp-create-panel__header h1 {
        font-size: 25px;
    }

    .bmp-create-form__row,
    .bmp-field-row {
        grid-template-columns: 1fr;
    }

    html.light-mode .bmp-groups-hero,
    html.dark-mode .bmp-groups-hero {
        margin-top: 3px;
        margin-bottom: 2px;
    }

    .bmp-groups-hero__slides {
        min-height: 430px;
    }

    .bmp-groups-hero__slide {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 12px;
        min-height: 430px;
        padding: 22px 18px 48px;
    }

    .bmp-groups-hero__copy {
        max-width: 100%;
    }

    .bmp-groups-hero__eyebrow {
        margin-bottom: 8px;
        font-size: 12px;
    }

    .bmp-groups-hero__title {
        max-width: 100%;
        margin-bottom: 10px;
        font-size: 34px;
        line-height: 1;
    }

    .bmp-groups-hero__slide--two .bmp-groups-hero__title {
        font-size: 27px;
        line-height: 1.04;
    }

    .bmp-groups-hero__slide--three .bmp-groups-hero__title {
        font-size: 26px;
        line-height: 1.04;
    }

    .bmp-groups-hero__body {
        max-width: 100%;
        margin-bottom: 14px;
        font-size: 15px;
        line-height: 1.28;
    }

    .bmp-groups-hero__button {
        min-height: 38px;
        padding: 0 16px;
        font-size: 14px;
    }

    .bmp-groups-hero__groups {
        min-height: 150px;
        padding: 0 0 18px;
    }

    .bmp-groups-hero__group {
        width: 104px;
    }

    .bmp-groups-hero__group--1 {
        transform: translate(18px, 14px) rotate(-5deg);
    }

    .bmp-groups-hero__group--2 {
        width: 122px;
        transform: translateY(-2px);
    }

    .bmp-groups-hero__group--3 {
        transform: translate(-18px, 16px) rotate(5deg);
    }

    .bmp-groups-hero__group--1:hover,
    .bmp-groups-hero__group--1:focus-within {
        transform: translate(18px, 6px) rotate(-5deg) scale(1.06);
    }

    .bmp-groups-hero__group--2:hover,
    .bmp-groups-hero__group--2:focus-within {
        transform: translateY(-10px) scale(1.06);
    }

    .bmp-groups-hero__group--3:hover,
    .bmp-groups-hero__group--3:focus-within {
        transform: translate(-18px, 8px) rotate(5deg) scale(1.06);
    }

    .bmp-groups-hero__group img {
        border-width: 4px;
    }

    .bmp-groups-hero__group figcaption {
        font-size: 12px;
    }

    .bmp-groups-hero__dots {
        bottom: 16px;
    }

    .bmp-group-cover { height: 180px; }
    .bmp-group-headbar { flex-wrap: wrap; }
    .bmp-group-avatar { width: 88px; height: 88px; margin-top: -44px; }
    .bmp-group-actions { margin-left: 0; width: 100%; }
    .bmp-home-grid, .bmp-about-grid { grid-template-columns: 1fr; }
    .bmp-field-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .bmp-groups-hero__slides,
    .bmp-groups-hero__slide {
        min-height: 405px;
    }

    .bmp-groups-hero__slide {
        padding: 18px 14px 44px;
    }

    .bmp-groups-hero__title {
        font-size: 29px;
    }

    .bmp-groups-hero__slide--two .bmp-groups-hero__title {
        font-size: 24px;
    }

    .bmp-groups-hero__slide--three .bmp-groups-hero__title {
        font-size: 23px;
    }

    .bmp-groups-hero__body {
        font-size: 14px;
    }

    .bmp-groups-hero__group {
        width: 88px;
    }

    .bmp-groups-hero__group--2 {
        width: 104px;
    }
}

/* ---------- Activity stream ---------- */
.bmp-tab-activity { max-width: 720px; margin: 0 auto; }

.bmp-activity-composer {
    display: flex; gap: 12px; padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.08);
}
.bmp-activity-composer-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.bmp-activity-composer-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.bmp-activity-composer-body textarea,
.bmp-activity-reply-form textarea {
    width: 100%; resize: vertical; min-height: 38px;
    padding: 8px 10px; border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.15);
    font: inherit; box-sizing: border-box;
}
.bmp-activity-composer-footer { display: flex; justify-content: flex-end; }

.bmp-activity-stream { list-style: none; margin: 0; padding: 0; }
.bmp-activity-stream > li.bmp-groups-empty { border: 1px dashed rgba(0,0,0,0.15); border-radius: 10px; }

.bmp-activity-item {
    display: flex; gap: 12px; padding: 16px;
    border-radius: 12px;
    margin: 0 0 16px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.08);
}
.bmp-activity-item.bmp-activity-system {
    background: rgba(0,0,0,0.03); font-size: 13px; opacity: 0.85;
}
.bmp-activity-avatar img { width: 48px; height: 48px; border-radius: 50%; display: block; }
.bmp-activity-system .bmp-activity-avatar { display: none; }

.bmp-activity-body { flex: 1; min-width: 0; }
.bmp-activity-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; margin-bottom: 4px;
}
.bmp-activity-name { font-weight: 600; text-decoration: none; }
.bmp-activity-time { opacity: 0.7; font-size: 12px; }
.bmp-activity-delete {
    margin-left: auto; background: none; border: 0;
    cursor: pointer; font-size: 18px; line-height: 1;
    opacity: 0.5; padding: 0 4px;
}
.bmp-activity-delete:hover { opacity: 1; }

.bmp-activity-content { word-wrap: break-word; }
.bmp-activity-content p { margin: 0 0 6px; }

.bmp-activity-replies {
    list-style: none; margin: 10px 0 0;
    padding: 8px 0 0; border-top: 1px solid rgba(0,0,0,0.05);
}
.bmp-activity-reply {
    padding: 8px; margin-bottom: 6px;
    border-radius: 8px; border: 0;
    background: rgba(0,0,0,0.03);
}
.bmp-activity-reply .bmp-activity-avatar img { width: 32px; height: 32px; }

.bmp-activity-reply-form {
    display: flex; gap: 8px; margin-top: 8px; align-items: flex-start;
}
.bmp-activity-reply-form textarea { flex: 1; min-height: 32px; }

.bmp-activity-more-wrap { text-align: center; margin: 16px 0; }

/* Composer tools (Photo / Text on image) */
.bmp-activity-composer-tools {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 4px 0; font-size: 13px;
}
.bmp-activity-tool {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.12);
    cursor: pointer; user-select: none;
}
.bmp-activity-tool:hover { background: rgba(0,0,0,0.04); }
.bmp-activity-tool input[type="file"] { display: none; }
.bmp-activity-tool .dashicons { font-size: 18px; width: 18px; height: 18px; }
.bmp-activity-preview { font-size: 12px; opacity: 0.75; margin-left: 4px; }

/* Big "headline" content (short posts) */
.bmp-activity-big {
    font-size: 26px; line-height: 1.25; font-weight: 700;
    padding: 6px 0;
}
.bmp-activity-big p { margin: 0 0 6px; }

/* Image grid */
.bmp-activity-media {
    display: grid; gap: 4px; margin-top: 8px;
    border-radius: 10px; overflow: hidden;
}
.bmp-activity-media a { display: block; line-height: 0; }
.bmp-activity-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bmp-activity-media-1 { grid-template-columns: 1fr; }
.bmp-activity-media-1 img { max-height: 520px; }
.bmp-activity-media-2 { grid-template-columns: 1fr 1fr; }
.bmp-activity-media-2 img { height: 280px; }
.bmp-activity-media-3 { grid-template-columns: 2fr 1fr; grid-auto-rows: 140px; }
.bmp-activity-media-3 a:first-child { grid-row: span 2; }
.bmp-activity-media-3 img { height: 100%; }
.bmp-activity-media-4 { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }

/* Activity cards - Light mode */
html.light-mode .bmp-activity-composer,
html.light-mode .bmp-activity-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}
html.light-mode .bmp-activity-composer-body textarea,
html.light-mode .bmp-activity-reply-form textarea,
html.light-mode .bmp-activity-reply {
    background: #f9fafb;
    border-color: #e5e7eb;
    color: #1f2937;
}
html.light-mode .bmp-activity-item.bmp-activity-system { background: #f3f4f6; }
html.light-mode .bmp-activity-reply { background: #f9fafb; }
html.light-mode .bmp-activity-name { color: #1f2937; }
html.light-mode .bmp-activity-time { color: #6b7280; }

/* Activity cards - Dark mode */
html.dark-mode .bmp-activity-composer,
html.dark-mode .bmp-activity-item {
    background: #000000;
    border: 1px solid #2a2a2a;
}
html.dark-mode .bmp-activity-composer-body textarea,
html.dark-mode .bmp-activity-reply-form textarea,
html.dark-mode .bmp-activity-reply {
    background: #1a1a1a;
    border-color: #333;
    color: #e0e0e0;
}
html.dark-mode .bmp-activity-item.bmp-activity-system { background: #1a1a1a; }
html.dark-mode .bmp-activity-reply { background: #0a0a0a; }
html.dark-mode .bmp-activity-name { color: #e0e0e0; }
html.dark-mode .bmp-activity-time { color: #9ca3af; }

/* Manage page - Light mode */
html.light-mode .bmp-manage-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}
html.light-mode .bmp-manage-card input[type="text"],
html.light-mode .bmp-manage-card input[type="email"],
html.light-mode .bmp-manage-card input[type="file"],
html.light-mode .bmp-manage-card input[type="number"],
html.light-mode .bmp-manage-card select,
html.light-mode .bmp-manage-card textarea {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}
html.light-mode .bmp-manage-card label { color: #1f2937; }
html.light-mode .bmp-manage-card p { color: #4b5563; }
html.light-mode .bmp-mod-list li { background: #f9fafb; border: 1px solid #e5e7eb; }
html.light-mode .bmp-manage-card-danger { background: #fef2f2; border-top-color: #dc2626; }

/* Manage page - Dark mode */
html.dark-mode .bmp-manage-card {
    background: #000000;
    border: 1px solid #2a2a2a;
}
html.dark-mode .bmp-manage-card input[type="text"],
html.dark-mode .bmp-manage-card input[type="email"],
html.dark-mode .bmp-manage-card input[type="file"],
html.dark-mode .bmp-manage-card input[type="number"],
html.dark-mode .bmp-manage-card select,
html.dark-mode .bmp-manage-card textarea {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
}
html.dark-mode .bmp-manage-card label { color: #e0e0e0; }
html.dark-mode .bmp-manage-card p { color: #9ca3af; }
html.dark-mode .bmp-mod-list li { background: #0a0a0a; border: 1px solid #2a2a2a; }
html.dark-mode .bmp-manage-card-danger { background: #1a0a0a; border-top-color: #991b1b; }

/* Text-on-image (background) post */
.bmp-activity-bg {
    position: relative; min-height: 280px;
    display: flex; align-items: center; justify-content: center;
    padding: 32px 24px; border-radius: 12px;
    background-size: cover; background-position: center;
    color: #fff; text-align: center;
    margin: 4px 0 0;
    box-shadow: inset 0 0 0 9999px rgba(0,0,0,0.35);
    overflow: hidden;
}
.bmp-activity-bg.is-big { min-height: 360px; }
.bmp-activity-bg-text {
    position: relative; z-index: 1;
    max-width: 90%; font-size: 22px; line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.bmp-activity-bg.is-big .bmp-activity-bg-text {
    font-size: 34px; line-height: 1.2;
}
.bmp-activity-bg-text a { color: #fff; text-decoration: underline; }
.bmp-activity-bg-text p { margin: 0 0 8px; }
