.bsync-member-category-archive {
    padding: 2rem 0;
}

.bsync-member-category-archive .bsync-member-category-header {
    margin-bottom: 1.5rem;
}

.bsync-member-category-archive .bsync-member-category-title {
    font-size: 2em;
    margin: 0 0 0.5rem;
}

.bsync-member-category-archive .bsync-member-category-description {
    max-width: 700px;
    color: #555;
}

.bsync-member-category-archive .bsync-member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.bsync-member-category-archive .bsync-member-card {
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.bsync-member-category-archive .bsync-member-card-title {
    font-size: 1.1em;
    margin: 0 0 0.75rem;
}

.bsync-member-category-archive .bsync-member-card-title a {
    text-decoration: none;
    color: inherit;
}

.bsync-member-category-archive .bsync-member-card-title a:hover,
.bsync-member-category-archive .bsync-member-card-title a:focus {
    text-decoration: underline;
}

.bsync-member-category-archive .bsync-member-card-excerpt {
    font-size: 0.95em;
    color: #555555;
}

.bsync-member-category-archive .bsync-member-pagination {
    margin-top: 2rem;
}

/* Basic spacing tweaks for the portal so styles feel consistent */
.bsync-member-portal>*, .bsync-member-tab-content>*, .bsync-member-profile-image {
    margin: 0 0 1rem 0;
}
.bsync-member-portal .bsync-member-account-links {
    margin-top: 0.5rem;
    font-size: 0.95em;
}

.bsync-member-profile-edit-form {
    max-width: 760px;
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
}

.bsync-member-profile-edit-form h3 {
    margin-top: 0;
}

.bsync-member-profile-edit-form .regular-text {
    max-width: 100%;
    width: 100%;
}

.bsync-member-profile-image-preview {
    margin: 0 0 0.5rem;
    min-height: 24px;
}

.bsync-member-profile-image-preview img {
    display: block;
    max-width: 120px;
    height: auto;
    border: 1px solid #ddd;
    padding: 2px;
    background: #fff;
}

.bsync-member-profile-image-actions {
    margin: 0;
}

.bsync-member-profile-edit-table-wrap {
    overflow-x: auto;
}

.bsync-member-profile-edit-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: #fff;
}

.bsync-member-profile-edit-table th,
.bsync-member-profile-edit-table td {
    border: 1px solid #e2e2e2;
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
}

.bsync-member-profile-edit-table th {
    font-weight: 600;
    background: #f8f9fa;
}

.bsync-member-profile-edit-table input,
.bsync-member-profile-edit-table select {
    width: 100%;
    max-width: 100%;
}

.bsync-member-profile-edit-table .bsync-linked-member-preview {
    margin-top: 6px;
    font-size: 0.85em;
}

.bsync-member-profile-edit-section {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
}

.bsync-member-profile-edit-section legend {
    font-weight: 600;
    padding: 0 0.4rem;
}

.bsync-member-profile-edit-check {
    display: block;
    margin: 0 0 0.35rem;
}

.bsync-member-profile-edit-group-label {
    margin: 0.5rem 0 0.35rem;
}

.bsync-member-profile-edit-actions {
    margin-top: 1rem;
}

.bsync-member-profile-edit-notice {
    max-width: 760px;
    margin: 0 0 0.9rem;
    padding: 0.75rem 0.9rem;
    border-radius: 4px;
    border: 1px solid transparent;
}

.bsync-member-profile-edit-notice.success {
    background: #f0f7ee;
    border-color: #b9d9b2;
    color: #215f2b;
}

.bsync-member-profile-edit-notice.error {
    background: #fff2f1;
    border-color: #e7b9b5;
    color: #8a1f19;
}

/* Back to Member Portal link styling */
.bsync-member-back-link {
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e2e2;
}

.bsync-member-back-link a {
    text-decoration: none;
    color: #0073aa;
    font-size: 0.95em;
    font-weight: 500;
}

.bsync-member-back-link a:hover,
.bsync-member-back-link a:focus {
    color: #005177;
    text-decoration: underline;
}

.bsync-event-back-link {
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e2e2;
}

.bsync-event-back-link a {
    text-decoration: none;
    color: #0073aa;
    font-size: 0.95em;
    font-weight: 500;
}

.bsync-event-back-link a:hover,
.bsync-event-back-link a:focus {
    color: #005177;
    text-decoration: underline;
}

/* Member menu styling - horizontal navigation */
.bsync-member-menu {
    background: #24242424;
}

.bsync-member-menu h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1em;
    color: #333;
}

.bsync-member-menu-nav {
    display: block;
}

.bsync-member-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.bsync-member-menu-item {
    position: relative;
    margin: 0;
    padding: 0;
}

.bsync-member-menu-item a {
    padding: 8px;
    background: inherit;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    color: inherit;
    font-weight: inherit;
    font-size: 0.95em;
    transition: color 0.2s ease;
    width: 100%;
    display: block;
}
.bsync-member-menu-sublist a{
    font-size: .85em;
}
.bsync-member-menu-item.has-submenu > a::after {
    content: "▾";
    margin-left: 0.35em;
    font-size: 0.7em;
    line-height: 1;
    display: inline-block;
    transition: transform 0.2s ease;
}

.bsync-member-menu-item a:hover,
.bsync-member-menu-item a:focus {
    color: #0073aa;
    text-decoration: none;
}

.bsync-member-menu-sublist {
list-style: none;
    position: absolute;
    left: 0;
    top: calc(100%);
    min-width: 100px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 50;
    padding: 0;
}

.bsync-member-menu-sublist .bsync-member-menu-item {
    display: block;
}

.bsync-member-menu-sublist .bsync-member-menu-item.has-submenu > a::after {
    content: "▸";
}

.bsync-member-menu-list > .bsync-member-menu-item.has-submenu:hover > a::after,
.bsync-member-menu-list > .bsync-member-menu-item.has-submenu:focus-within > a::after {
    transform: rotate(180deg);
}

.bsync-member-menu-sublist .bsync-member-menu-item.has-submenu:hover > a::after,
.bsync-member-menu-sublist .bsync-member-menu-item.has-submenu:focus-within > a::after {
    transform: rotate(90deg);
}

.bsync-member-menu-item:hover > .bsync-member-menu-sublist,
.bsync-member-menu-item:focus-within > .bsync-member-menu-sublist {
    display: block;
}

/* Simple styling for the member categories list shortcode */
.bsync-member-category-list {
    margin: 2rem 0;
}

.bsync-member-category-list-items {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.bsync-member-category-list-item a {
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid #e2e2e2;
    background: #fafafa;
    font-size: 0.95em;
}

.bsync-member-category-list-item a:hover,
.bsync-member-category-list-item a:focus {
    background: #f0f0f0;
}

/* Styled member login form */
.bsync-member-login {
    max-width: 420px;
    margin: 2rem auto;
    padding: 1.75rem 2rem;
    border-radius: 8px;
    border: 1px solid #e2e2e2;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bsync-member-login h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.bsync-member-login form p {
    margin-bottom: 1rem;
}

.bsync-member-login-reset {
    margin-top: 0.5rem;
    font-size: 0.95em;
}

/* Tab Navigation */
.bsync-member-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 2px solid #24242424;
    padding-bottom: 0;
}

.bsync-member-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1.25rem;
    font-size: 1em;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.bsync-member-tab-btn:hover {
    color: #0073aa;
    background: #f8f9fa;
}

.bsync-member-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.bsync-member-tab-content {
    display: none;
}

.bsync-member-tab-content.active {
    display: block;
}

/* Member profiles grid in Members tab */
.bsync-member-profiles-grid, .bsync-member-main-spouse-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
    gap: 1rem;
}
.bsync-member-main-spouse-wrapper>div, .bsync-member-child-profile, .bsync-member-profile-card-wrapper {
    border: 1px solid #111;
    padding: min(1vw, 2em);
    background: #11111111;
}
.bsync-member-profile-card-wrapper{
    padding: 0;
}
.bsync-member-profile-card{
    padding: min(1vw, 2em);   
}
.bsync-member-children-list{
    padding: 0;
    list-style: none;
	margin: 0 0 1em 0;
}
.bsync-member-household-block h3{
     margin: 0 0 5px 0;
    font-size: 1.2em;
}

.bsync-member-profile-card h4 {
    margin: 0 0 0.5rem;
    font-size: 1.15em;
    color: #333;
}

.bsync-member-profile-card .bsync-member-type {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 0.75em;
    font-weight: 500;
}

.bsync-member-profile-card .bsync-member-email {
    font-size: 0.9em;
    color: #999;
    margin: 0 0 1rem;
    word-break: break-word;
}

.bsync-member-profile-card .bsync-member-profile-image-link,
.bsync-member-profile-card .bsync-member-profile-image,
.bsync-member-profile-summary .bsync-member-profile-image-link,
.bsync-member-profile-summary .bsync-member-profile-image {
    display: inline-block;
}

.bsync-member-profile-summary .bsync-member-profile-image, .bsync-member-profile-card-wrapper .bsync-member-profile-image {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 7 / 4;
    margin: 0;
}

.bsync-member-profile-card p:last-child {
    margin-bottom: 0;
}

.bsync-member-profile-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.3em;
    line-height: 1.3;
}

.bsync-member-profile-card p {
    margin: 0 0 0.5rem;
    line-height: 1.45;
}

.bsync-member-profile-card p > strong:only-child {
    display: block;
    margin-top: 0.8rem;
    font-size: 0.88em;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #555;
}

.bsync-member-profile-card p:first-of-type > strong:only-child {
    margin-top: 0;
}

.bsync-member-profile-card ul {
    margin: 0.25rem 0 0.5rem 1.25rem;
}

.bsync-member-profile-card li {
    margin: 0 0 0.35rem;
}

.bsync-member-profile-card .bsync-member-contact-icon,
.bsync-member-profile-summary .bsync-member-contact-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.bsync-member-profile-card .bsync-member-contact-icon--mask,
.bsync-member-profile-summary .bsync-member-contact-icon--mask,
.bsync-member-directory .bsync-member-contact-icon--mask {
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bsync-member-profile-card .bsync-member-contact-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0 0 0.35rem;
}

.bsync-member-profile-card .bsync-member-contact-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.bsync-contact-row, .bsync-member-household-address>p{
    font-size: .9em;
    margin: 0 0 4px 0;
}

.bsync-contact-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.bsync-member-child-profile .bsync-member-contact-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.bsync-member-child-profile .bsync-member-contact-icon--mask {
    display: inline-block;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.bsync-member-child-profile .bsync-member-contact-label,
.bsync-member-child-profile .bsync-member-contact-text {
    line-height: 1.3;
}
.bsync-contact-row.relation{
    margin: 10px 0 0 0;
}
.bsync-member-profile-card .bsync-member-contact-label,
.bsync-member-profile-card .bsync-member-contact-text,
.bsync-member-profile-summary .bsync-member-contact-label,
.bsync-member-profile-summary .bsync-member-contact-text {
    line-height: 1.3;
}

.bsync-member-profile-card .bsync-member-contact-link,
.bsync-member-profile-summary .bsync-member-contact-link {
    word-break: break-word;
    line-height: 1.3;
}

.bsync-member-profile-card .bsync-member-text-link,
.bsync-member-profile-summary .bsync-member-text-link {
    text-decoration: none;
    line-height: 1;
}

.bsync-member-profile-card .bsync-member-text-link:hover .bsync-member-text-icon,
.bsync-member-profile-card .bsync-member-text-link:focus .bsync-member-text-icon,
.bsync-member-profile-summary .bsync-member-text-link:hover .bsync-member-text-icon,
.bsync-member-profile-summary .bsync-member-text-link:focus .bsync-member-text-icon {
    text-decoration: underline;
}

.bsync-member-profile-card a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.bsync-member-profile-card a:hover,
.bsync-member-profile-card a:focus {
    text-decoration: underline;
}

.bsync-member-directory .bsync-member-contact-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.bsync-member-directory .bsync-member-contact-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin: 0 0 0.35rem;
}

.bsync-member-directory .bsync-member-contact-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.bsync-member-directory .bsync-member-contact-label,
.bsync-member-directory .bsync-member-contact-text {
    line-height: 1.3;
}

.bsync-member-directory .bsync-member-contact-link {
    word-break: break-word;
    line-height: 1.3;
}

.bsync-member-directory .bsync-member-text-link {
    text-decoration: none;
    line-height: 1;
}

.bsync-member-directory .bsync-member-text-link:hover .bsync-member-text-icon,
.bsync-member-directory .bsync-member-text-link:focus .bsync-member-text-icon {
    text-decoration: underline;
}

.bsync-member-events-calendar table {
    width: 100%;
}

.bsync-member-events-calendar table th,
.bsync-member-events-calendar table td {
    width: 14.5%;
    vertical-align: top;
    min-height: 100px;
    border-bottom: 1px solid;
    border-radius: 0;
    padding: 4px;
}

.bsync-member-events-calendar table ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 480px) {
    .bsync-member-directory .bsync-member-contact-row,
    .bsync-member-directory .bsync-member-contact-inline,
    .bsync-member-profile-card .bsync-member-contact-row,
    .bsync-member-profile-card .bsync-member-contact-inline {
        gap: 0.25rem;
    }
}

