/* Family profile (templates/family/show.html.twig). Everything is scoped under .fp. */
.fp {
    --fp-navy: #142d52; --fp-blue: #1769e8; --fp-blue2: #eaf3ff; --fp-ink: #19263a; --fp-muted: #68788d;
    --fp-line: #e1e8f1; --fp-green: #17834d; --fp-shadow: 0 10px 30px rgba(23, 49, 83, .06);
    color: var(--fp-ink); font-size: 14px; line-height: 1.5;
}
.fp a { text-decoration: none; }
.fp .green { color: var(--fp-green) !important; }

.fp-breadcrumb { font-size: 12px; color: var(--fp-muted); padding: 0 0 10px; }
.fp-breadcrumb a { color: var(--fp-muted); }
.fp-breadcrumb a:hover { color: var(--fp-blue); }
.fp-breadcrumb b { color: var(--fp-blue); font-weight: 700; }

.fp-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.fp-heading h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; color: var(--fp-navy); margin: 0 0 5px; }
.fp-heading p { margin: 0; color: var(--fp-muted); font-size: 14px; }
.fp-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.fp-btn { border: 1px solid var(--fp-line); background: #fff; color: var(--fp-navy); border-radius: 10px; padding: 10px 14px;
    font-weight: 750; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.fp-btn:hover { background: #f5f8fc; color: var(--fp-navy); }
.fp-btn.primary { background: var(--fp-blue); color: #fff; border-color: var(--fp-blue); box-shadow: 0 6px 14px #1769e822; }
.fp-btn.primary:hover { background: #1054c4; color: #fff; }
.fp-btn.fp-block { width: 100%; margin-top: 14px; }
.fp-btn.fp-block + .fp-btn.fp-block { margin-top: 8px; }
.fp-actions .btn-outline-danger { border-radius: 10px; padding: 9px 14px; font-size: 12px; font-weight: 750; }

.fp-content { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 18px; align-items: start; }
.fp-panel { background: #fff; border: 1px solid var(--fp-line); border-radius: 17px; box-shadow: 0 4px 16px #18335404; overflow: hidden; }
.fp-panel-head { padding: 19px 21px; border-bottom: 1px solid var(--fp-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fp-panel-head h3 { margin: 0; color: var(--fp-navy); font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.fp-panel-head p { margin: 4px 0 0; color: var(--fp-muted); font-size: 12px; }
.fp-head-left { display: flex; align-items: center; gap: 10px; }
.fp-head-icon { width: 35px; height: 35px; flex: none; border-radius: 11px; background: #edf4ff; color: var(--fp-blue); display: grid; place-items: center; font-size: 17px; }

.fp-member-list { padding: 0 20px; }
.fp-member { display: grid; grid-template-columns: minmax(190px, 1.2fr) .75fr minmax(0, 1.25fr) auto; align-items: center; gap: 12px; padding: 17px 0; border-bottom: 1px solid #edf1f6; }
.fp-member:last-child { border-bottom: 0; }
.fp-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fp-person-text { min-width: 0; }
.fp-avatar { width: 52px; height: 52px; border-radius: 15px; flex: none; overflow: hidden; }
.fp-avatar > * { border-radius: 15px !important; }
.fp-person-name { display: block; font-size: 13px; font-weight: 800; color: var(--fp-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-person-name:hover { color: var(--fp-blue); }
.fp-person-title { font-size: 12px; font-weight: 700; color: var(--fp-blue); margin-top: 1px; }
.fp-person-sub { font-size: 11px; color: var(--fp-muted); margin-top: 2px; }
.fp-rel { font-size: 12px; font-weight: 700; color: #344660; }
.fp-cell { min-width: 0; }
.fp-cell-label { display: none; color: #8390a2; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.fp-pill { display: inline-flex; max-width: 100%; font-size: 11px; font-weight: 700; color: #315e9c; background: #eef5ff; border: 1px solid #e0ecff; border-radius: 7px; padding: 5px 8px; }
.fp-contact-line { font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-contact-line a { color: var(--fp-blue); text-decoration: none; }
.fp-contact-line a:hover { text-decoration: underline; }
.fp-member-actions { text-align: right; }
.fp-member-actions .fp-row-actions { justify-content: flex-end; margin-top: 0; }
.fp-row-actions { display: flex; gap: 12px; margin-top: 6px; align-items: center; }
.fp-row-actions form { margin: 0; }
.fp-row-actions a, .fp-row-actions button { background: none; border: 0; padding: 0; color: var(--fp-blue); font-weight: 800; font-size: 11px; cursor: pointer; }
.fp-row-actions button { color: #c0392b; }
.fp-member-bottom { padding: 12px 20px; background: #fafcff; border-top: 1px solid var(--fp-line); font-size: 11px; color: var(--fp-muted); }
.fp-empty { padding: 18px 0; margin: 0; color: var(--fp-muted); font-size: 12px; }
.fp-info-card .fp-empty { padding: 0; }

.fp-right { display: grid; gap: 18px; }
.fp-giving-card { padding: 20px; }
.fp-giving-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.fp-giving-head h3 { margin: 0; color: var(--fp-navy); font-size: 16px; font-weight: 700; }
.fp-giving-head p { margin: 4px 0 0; color: var(--fp-muted); font-size: 11px; }
.fp-giving-total { font-size: 30px; font-weight: 900; color: var(--fp-navy); letter-spacing: -1px; margin: 20px 0 3px; }
.fp-giving-meta { font-size: 11px; color: var(--fp-muted); }
.fp-fund-list { margin-top: 17px; display: grid; gap: 12px; }
.fp-fund-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.fp-fund-row span { color: #56667c; }
.fp-fund-row strong { color: var(--fp-navy); }
.fp-fund-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }
.fp-progress { height: 6px; background: #eaf0f7; border-radius: 20px; overflow: hidden; margin-top: 6px; }
.fp-progress span { display: block; height: 100%; border-radius: 20px; }
.fp .c0 { background: #1769e8; } .fp .c1 { background: #21a779; } .fp .c2 { background: #e5a23c; } .fp .c3 { background: #8a5cd6; } .fp .c4 { background: #d9577a; }
.fp-notice { margin-top: 18px; padding: 13px 14px; background: #f0f7ff; border: 1px solid #dcecff; border-radius: 12px; display: flex; gap: 10px; font-size: 11px; color: #4d6482; }
.fp-notice b { color: var(--fp-navy); display: block; margin-bottom: 2px; }

.fp-info-card { padding: 19px 20px; }
.fp-info-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 14px; color: var(--fp-navy); }
.fp-info-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf1f6; font-size: 12px; }
.fp-info-row:last-of-type { border-bottom: 0; }
.fp-info-row span { color: var(--fp-muted); white-space: nowrap; }
.fp-info-row strong { color: var(--fp-navy); text-align: right; }
.fp-info-row strong a { color: var(--fp-blue); }

.fp-activity { margin-top: 18px; }
.fp-activity-list { padding: 5px 20px 12px; }
.fp-activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #edf1f6; }
.fp-activity-item:last-child { border-bottom: 0; }
.fp-activity-icon { width: 32px; height: 32px; border-radius: 10px; background: #e8f8ef; color: #16834d; display: grid; place-items: center; flex: none; }
.fp-activity-text { flex: 1; min-width: 0; }
.fp-activity-text strong { display: block; font-size: 12px; color: var(--fp-navy); }
.fp-activity-text span { display: block; font-size: 11px; color: var(--fp-muted); margin-top: 3px; }
.fp-activity-amount { font-size: 12px; font-weight: 800; color: var(--fp-navy); white-space: nowrap; }

/* Icon tile, used by the giving panel's header. */
.fp-sum-icon { height: 32px; width: 32px; flex: none; border-radius: 10px; background: var(--fp-blue2); color: var(--fp-blue); display: grid; place-items: center; font-size: 16px; }
.fp-dialog { border: 0; padding: 0; border-radius: 15px; width: min(620px, calc(100% - 30px)); max-height: 92vh; overflow: auto; color: var(--fp-navy); box-shadow: 0 20px 60px #0f172a55; }
.fp-dialog[open]:not(:modal) { position: fixed; inset: 4vh 0 auto; margin: 0 auto; z-index: 1050; }
.fp-dialog::backdrop { background: #0f172a88; }
.fp-dialog-head { padding: 15px 18px; border-bottom: 1px solid var(--fp-line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.fp-dialog-head b { display: block; font-size: 16px; }
.fp-dialog-head small { color: var(--fp-muted); font-size: 12px; }
.fp-dialog-body { padding: 18px; margin: 0; }
.fp-dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fp-dialog-grid .full { grid-column: 1 / -1; }
.fp-dialog .form-label { font-size: 11px; font-weight: 800; color: #40516a; margin-bottom: 5px; }
.fp-dialog-note { font-size: 12px; color: var(--fp-muted); background: #f5f8fc; border-radius: 9px; padding: 9px 11px; margin: 4px 0 0; }
.fp-dialog-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.fp-dialog-foot > span { display: flex; gap: 8px; margin-left: auto; }
.fp-link { font-size: 12px; color: var(--fp-blue); }
@media (max-width: 520px) { .fp-dialog-grid { grid-template-columns: 1fr; } }

@media (max-width: 1000px) {
    .fp-content { grid-template-columns: 1fr; }
    .fp-right { grid-template-columns: 1fr 1fr; }
    .fp-member { grid-template-columns: minmax(180px, 1.2fr) .7fr minmax(0, 1.1fr) auto; }
}
@media (max-width: 760px) {
    .fp-heading { align-items: flex-start; flex-direction: column; }
    .fp-heading h1 { font-size: 26px; }
    .fp-actions { width: 100%; }
    .fp-actions > .fp-btn { flex: 1; }
    .fp-member-list { padding: 0 15px; }
    .fp-member { grid-template-columns: 1fr 1fr; padding: 15px 0; }
    .fp-person { grid-column: 1 / -1; }
    .fp-cell-label { display: block; }
    .fp-right { grid-template-columns: 1fr; }
    .fp-panel-head { padding: 16px; }
    .fp-member-bottom { padding: 12px 15px; }
}
@media (max-width: 430px) {
    .fp-panel-head { align-items: flex-start; flex-wrap: wrap; }
    .fp-giving-total { font-size: 27px; }
}
/* Family photo: landscape (3:2), the full width of the Family Information card. */
.fp-family-photo { margin: 0 0 4px; border-radius: 12px; overflow: hidden; aspect-ratio: 3 / 2; background: #f1f5fa; }
.fp-family-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-family-photo-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--fp-muted); font-size: 12px; border: 1px dashed #cdd8e6; border-radius: 12px; }
.fp-family-photo-empty span { font-size: 30px; line-height: 1; opacity: .7; }
.fp-btn.fp-photo-btn { margin: 10px 0 8px; }
.fp-photo-stage { aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: #0f172a; position: relative; }
.fp-photo-stage > img, .fp-photo-stage-empty img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-photo-stage-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    background: #f1f5fa; color: var(--fp-muted); font-size: 13px; text-align: center; padding: 12px; }
.fp-photo-stage-empty span { font-size: 36px; line-height: 1; }
.fp-photo-status { margin: 10px 0 0; font-size: 12px; color: #9a4b00; background: #fff6e8; border-radius: 9px; padding: 8px 11px; }
.fp-photo-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.fp-photo-choices > * { flex: 1 1 160px; justify-content: center; text-align: center; margin: 0; cursor: pointer; }
.fp-photo-dialog .invalid-feedback, .fp-photo-dialog .form-error-message { display: block; }
.fp-btn:disabled { opacity: .55; cursor: not-allowed; }

@media print {
    .fp-photo-dialog { display: none !important; }
    .fp-actions, .fp-row-actions, .fp-btn { display: none !important; }
    .fp-content { grid-template-columns: 1fr; }
    .fp-panel { box-shadow: none; break-inside: avoid; }
}
