/* Just For Baby community — uses the theme's CSS variables, with fallbacks. */
.jfbc { --c-green: var(--green, #42bb91); --c-navy: var(--navy, #2c2a4a); --c-card: var(--card, rgba(129, 209, 223, .145)); --c-line: var(--line, rgba(44, 42, 74, .1)); --c-r: var(--radius, 10px); }
.jfbc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.jfbc-card { background: var(--c-card); border-radius: var(--c-r); padding: 28px; }
.jfbc-notice { margin: 0 0 24px; padding: 14px 18px; border-radius: var(--c-r); background: #e7f7f0; color: #1f6b4f; border-left: 4px solid var(--c-green); animation: jfbc-in .4s ease; }
.jfbc-notice.is-error { background: #fdecee; color: #8a1f2d; border-color: #e5536b; }
.jfbc-empty { text-align: center; padding: 30px 0; color: #777; }
.jfbc-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; font-size: 12px; color: #777; }
.jfbc-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; background: #eee; color: #555; }
.jfbc-badge.is-publish, .jfbc-badge.is-resolved { background: #e7f7f0; color: #1f6b4f; }
.jfbc-badge.is-pending { background: #fff4dc; color: #8a5a00; }

/* Forms */
.jfbc-form { display: grid; gap: 16px; }
.jfbc-form h2 { margin: 0 0 4px; font-size: 24px; }
.jfbc-form label { display: grid; gap: 6px; font-weight: 600; color: var(--c-navy); font-size: 14px; }
.jfbc-form input[type=text], .jfbc-form input[type=email], .jfbc-form input[type=password], .jfbc-form input[type=file], .jfbc-form textarea, .jfbc-search input {
	font: inherit; font-weight: 400; width: 100%; padding: 12px 16px; border: 1px solid #d5dde2; border-radius: 12px; background: #fff; color: #333;
	transition: border-color .2s, box-shadow .2s;
}
.jfbc-form input:focus, .jfbc-form textarea:focus, .jfbc-search input:focus { outline: none; border-color: var(--c-green); box-shadow: 0 0 0 3px rgba(66, 187, 145, .2); }
.jfbc-form input:user-invalid, .jfbc-form textarea:user-invalid { border-color: #e5536b; }
.jfbc-form .jfbc-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; }
.jfbc-form .jfbc-check input { margin-top: 4px; accent-color: var(--c-green); }
.jfbc-form .jfb-btn { justify-self: start; }
.jfbc-alt { margin: 0; font-size: 14px; }
.jfbc-alt a, .jfbc-card a:not(.jfb-btn) { color: var(--c-green); font-weight: 600; }
.jfbc-auth { max-width: 460px; margin: 0 auto; }
.jfbc-narrow { max-width: 560px; }

/* Account tabs */
.jfbc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.jfbc-tabs a { padding: 9px 20px; border-radius: 22px; border: 1px solid var(--c-green); color: var(--c-navy); transition: background-color .2s, color .2s; }
.jfbc-tabs a:hover, .jfbc-tabs a[aria-current] { background: var(--c-green); color: #fff; }
.jfbc-tabs .jfbc-logout { margin-left: auto; border-color: transparent; color: #888; }
.jfbc-mylist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.jfbc-mylist li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--c-card); border-radius: var(--c-r); }

/* Forum */
.jfbc-forum__bar { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.jfbc-search { flex: 1; }
.jfbc-search input { border-radius: 25px; padding-left: 20px; }
.jfbc-forum__filters { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.jfbc-chips, .jfbc-sort { display: flex; gap: 8px; flex-wrap: wrap; }
.jfbc-chips a { padding: 6px 16px; border-radius: 18px; border: 1px solid var(--c-green); color: var(--c-navy); font-size: 13px; }
.jfbc-chips a[aria-current], .jfbc-chips a:hover { background: var(--c-green); color: #fff; }
.jfbc-sort a { font-size: 13px; color: #777; padding: 6px 4px; border-bottom: 2px solid transparent; }
.jfbc-sort a[aria-current] { color: var(--c-navy); border-color: var(--c-navy); font-weight: 600; }
.jfbc-questions { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.jfbc-question { display: flex; gap: 18px; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--c-r); transition: transform .3s ease, box-shadow .3s ease, border-color .3s; }
.jfbc-question:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(44, 42, 74, .08); border-color: transparent; }
.jfbc-question h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; }
.jfbc-question h3 a { color: var(--c-navy); }
.jfbc-question h3 a:hover { color: var(--c-green); }
.jfbc-question__count { flex: none; display: grid; place-items: center; width: 70px; height: 62px; border-radius: 12px; background: var(--c-card); font-size: 11px; color: #777; line-height: 1.2; text-align: center; }
.jfbc-question__count strong { font-size: 20px; color: var(--c-navy); }
.jfbc-question__count.has-answers { background: rgba(66, 187, 145, .14); }
.jfbc-question__count.has-answers strong { color: var(--c-green); }

.jfbc-dialog, .jfbc-lightbox { border: 0; border-radius: 16px; padding: 30px; width: min(600px, 92vw); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.jfbc-dialog[open], .jfbc-lightbox[open] { animation: jfbc-in .25s ease; }
.jfbc-dialog::backdrop, .jfbc-lightbox::backdrop { background: rgba(44, 42, 74, .55); }
.jfbc-dialog h2 { margin-top: 0; }
.jfbc-dialog__close { position: absolute; top: 10px; right: 14px; font-size: 28px; line-height: 1; color: #888; background: none; border: 0; cursor: pointer; }

/* Single question */
.jfbc-single { max-width: 860px; }
.jfbc-back { display: inline-block; margin-bottom: 18px; font-size: 14px; }
.jfbc-q h1 { font-size: 28px; margin-bottom: 8px; }
.jfbc-q .jfb-prose { margin-top: 18px; }
.jfbc-resolve { margin-top: 16px; }
.jfbc-answers { margin-top: 40px; }
.jfbc-answers h2 { font-size: 22px; }
.jfbc-answer-list { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 12px; }
.jfbc-answer { padding: 18px 20px; border: 1px solid var(--c-line); border-radius: var(--c-r); background: #fff; }
.jfbc-answer p { margin: 8px 0 0; }
.jfbc-answers .comment-reply-title { font-size: 18px; margin: 0; }
.jfbc-answers textarea { font: inherit; width: 100%; padding: 12px 16px; border: 1px solid #d5dde2; border-radius: 12px; }

/* Baby Moments */
.jfbc-upload { margin-bottom: 40px; }
.jfbc-upload h2 { margin-top: 0; font-size: 22px; }
.jfbc-form--inline { grid-template-columns: 1fr 1fr; align-items: end; }
.jfbc-form--inline .jfbc-check, .jfbc-form--inline .jfb-btn { grid-column: 1 / -1; }
.jfbc-moments { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.jfbc-moments button { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; border-radius: var(--c-r) var(--c-r) 50px var(--c-r); overflow: hidden; background: var(--c-card); }
.jfbc-moments img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .5s ease; }
.jfbc-moments button:hover img { transform: scale(1.06); }
.jfbc-moments button span { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 14px 12px; color: #fff; font-weight: 600; font-size: 14px; text-align: left; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); }
.jfbc-moments--mine figure { margin: 0; }
.jfbc-moments--mine img { border-radius: var(--c-r); }
.jfbc-moments--mine figcaption { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 13px; }
.jfbc-lightbox { width: auto; max-width: 92vw; padding: 16px; background: #fff; }
.jfbc-lightbox figure { margin: 0; text-align: center; }
.jfbc-lightbox img { max-width: 86vw; max-height: 78vh; width: auto; border-radius: 10px; }
.jfbc-lightbox figcaption { margin-top: 10px; font-weight: 600; color: var(--c-navy); }
.jfbc-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 28px; color: var(--c-green); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
.jfbc-lightbox__nav.is-prev { left: 24px; }
.jfbc-lightbox__nav.is-next { right: 24px; }

/* Bookmark button (cards + article) */
.jfbc-bm { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 0; background: none; color: #b9bcc6; cursor: pointer; border-radius: 50%; transition: color .2s, transform .2s; }
.jfbc-bm:hover { color: var(--green, #42bb91); }
.jfbc-bm.is-on { color: var(--green, #42bb91); }
.jfbc-bm.is-on svg { animation: jfbc-pop .4s ease; }
.jfbc-bm.has-label { border-radius: 0; border: 1px solid #000; border-bottom-width: 3px; padding: 0 18px; min-height: 40px; color: #000; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.jfbc-bm.has-label.is-on { background: var(--navy, #2c2a4a); border-color: var(--navy, #2c2a4a); color: #fff; }

@keyframes jfbc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes jfbc-pop { 40% { transform: scale(1.4); } }

@media (max-width: 782px) {
	.jfbc-card { padding: 20px; }
	.jfbc-forum__bar { flex-direction: column; align-items: stretch; }
	.jfbc-form--inline { grid-template-columns: 1fr; }
	.jfbc-moments { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.jfbc-question { padding: 14px; gap: 12px; }
	.jfbc-question__count { width: 56px; height: 54px; }
	.jfbc-tabs .jfbc-logout { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .jfbc * { animation: none !important; transition: none !important; } }

/* Baby Moments gallery (v1.2) */
.moments-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin: 10px 0 26px; }
.moments-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 5px; border-radius: 30px; background: #fff; box-shadow: var(--shadow-soft, 0 10px 30px rgba(28,74,156,.08)); }
.moments-filters a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 24px; color: var(--blue, #1c4a9c); font-weight: 600; font-size: 14px; transition: background-color .25s, color .25s; }
.moments-filters a:hover { background: #eef8fc; }
.moments-filters a[aria-current] { background: linear-gradient(135deg, #4fc89d, var(--green, #42bb91)); color: #fff; }
.moments-count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(28, 74, 156, .08); font-size: 12px; }
.moments-filters a[aria-current] .moments-count { background: rgba(255, 255, 255, .25); }
.moments-grid { list-style: none; margin: 0; padding: 0; columns: 4 240px; column-gap: 18px; transition: opacity .25s; }
.moments-grid.is-loading { opacity: .35; }
.mcard { break-inside: avoid; margin: 0 0 18px; }
.mcard a { position: relative; display: block; overflow: hidden; border-radius: 22px; background: #e4f3fb; box-shadow: var(--shadow-soft, 0 10px 30px rgba(28,74,156,.08)); transition: transform .45s var(--spring, ease), box-shadow .3s; }
.mcard img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; transition: transform .8s ease; }
.mcard a:hover, .mcard a:focus-visible { transform: translateY(-6px) rotate(-.6deg); box-shadow: var(--shadow-pop, 0 22px 50px rgba(28,74,156,.16)); }
.mcard a:hover img { transform: scale(1.06); }
.mcard__cap { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; padding: 40px 14px 12px; color: #fff; background: linear-gradient(transparent, rgba(16, 32, 70, .65)); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.mcard a:hover .mcard__cap, .mcard a:focus-visible .mcard__cap { opacity: 1; transform: none; }
.mcard__title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.mcard__tag { flex: none; padding: 3px 10px; border-radius: 12px; background: var(--sun, #ffc533); color: #1c4a9c; font-size: 11px; font-weight: 700; }
.mcard.is-featured a::after { content: "★"; position: absolute; top: 10px; left: 12px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--sun-2, #ffb000); font-size: 15px; box-shadow: 0 4px 10px rgba(0,0,0,.1); }
.js .mcard { animation: mpop .6s var(--spring, ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
@keyframes mpop { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.moments-more { text-align: center; margin-top: 16px; }
.moments-empty { text-align: center; padding: 50px 20px; background: #fff; border-radius: 28px; box-shadow: var(--shadow-soft, 0 10px 30px rgba(28,74,156,.08)); }
.moments-empty svg { margin: 0 auto 12px; animation: bob 4s ease-in-out infinite; }
.moments-empty h3 { font-family: var(--display, inherit); color: var(--blue, #1c4a9c); font-size: 24px; margin: 0 0 6px; }
.jfbc-drop { position: relative; padding: 22px; border: 2px dashed #b9dceb; border-radius: 18px; background: #f5fbff; text-align: center; }
.jfbc-drop input[type=file] { margin-top: 8px; border: 0; background: transparent; }
.jfbc-preview { max-height: 220px; width: auto; margin: 0 auto; border-radius: 16px; }
@media (hover: none) { .mcard__cap { opacity: 1; transform: none; } }
@media (max-width: 782px) {
	.moments-grid { columns: 2 140px; column-gap: 12px; }
	.mcard { margin-bottom: 12px; }
	.mcard a { border-radius: 16px; }
	.moments-bar { flex-direction: column; align-items: stretch; }
	.moments-filters { justify-content: center; border-radius: 22px; }
	.moments-filters a { padding: 8px 12px; font-size: 13px; }
}
