/* Công cụ Giáo xứ: CSS cho trang công cụ, thư viện, liên hệ. Mọi lớp đều có tiền tố gxcc- để không lẫn với theme. */
.gxcc-app, .gxcc-lib, .gxcc-contact, .gxcc-modal {
	--gx-red: #7b1d1d; --gx-red-2: #5e1414; --gx-gold: #b8862f; --gx-gold-soft: #f3e6c9;
	--gx-ink: #1f1a17; --gx-muted: #6d655c; --gx-line: #e4dfd6; --gx-card: #ffffff; --gx-bg: #f6f4f0;
	font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--gx-ink); box-sizing: border-box;
}
.gxcc-app *, .gxcc-lib *, .gxcc-contact *, .gxcc-modal * { box-sizing: border-box; }
.gxcc-muted { color: var(--gx-muted); font-size: 14px; margin: 0; }

/* Trang công cụ: tràn rộng hơn khung nội dung hẹp của theme, tối đa 1440px */
.gxcc-app { width: min(calc(100vw - 24px), 1440px); max-width: none !important; margin: 8px 0 24px calc(50% - min(50vw - 12px, 720px)) !important; }
.gxcc-app-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.gxcc-app-hint { color: var(--gx-muted); font-size: 13px; }
#gxcc-frame { display: block; width: 100%; height: calc(100vh - 110px); min-height: 680px; border: 1px solid var(--gx-line); border-radius: 12px; background: #f1f0ed; }

.gxcc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--gx-line); background: var(--gx-card); color: var(--gx-ink);
	border-radius: 8px; padding: 8px 14px; font: 600 14px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.gxcc-btn:hover { background: var(--gx-bg); }
.gxcc-btn.gxcc-primary { background: var(--gx-red); border-color: var(--gx-red); color: #fff; }
.gxcc-btn.gxcc-primary:hover { background: var(--gx-red-2); }
.gxcc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.gxcc-btn.gxcc-on { background: var(--gx-gold-soft); border-color: var(--gx-gold); color: #5a3a08; }
.gxcc-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Thư viện */
.gxcc-lib { width: min(calc(100vw - 24px), 1280px); max-width: none !important; margin: 0 0 24px calc(50% - min(50vw - 12px, 640px)) !important; }
.gxcc-lib-bar { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.gxcc-lib-bar input, .gxcc-lib-bar select, .gxcc-feedback input, .gxcc-feedback select, .gxcc-feedback textarea, .gxcc-modal textarea, .gxcc-modal select {
	width: 100%; border: 1px solid var(--gx-line); border-radius: 8px; padding: 9px 11px; font: 15px/1.4 inherit; font-family: inherit; background: #fff; color: var(--gx-ink); min-width: 0; }
.gxcc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.gxcc-chip { border: 1px solid var(--gx-line); background: #fff; border-radius: 99px; padding: 5px 12px; font: 600 13px inherit; font-family: inherit; cursor: pointer; color: var(--gx-ink); }
.gxcc-chip[aria-pressed="true"] { background: var(--gx-red); border-color: var(--gx-red); color: #fff; }
.gxcc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; align-items: start; }
.gxcc-item { background: var(--gx-card); border: 1px solid var(--gx-line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.gxcc-thumb { aspect-ratio: 4 / 5; background: var(--gx-gold-soft) center top / cover no-repeat; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; width: 100%; }
.gxcc-thumb.gxcc-wide { aspect-ratio: 16 / 9; background-size: contain; background-color: #1a1a1a; }
.gxcc-thumb .gxcc-ph { font: 700 15px inherit; font-family: inherit; color: #5a3a08; text-align: center; padding: 16px; }
.gxcc-item-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.gxcc-item-title { font-weight: 700; font-size: 15.5px; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.gxcc-meta { color: var(--gx-muted); font-size: 12.5px; display: flex; gap: 4px 10px; flex-wrap: wrap; }
.gxcc-tag { display: inline-block; background: var(--gx-gold-soft); color: #5a3a08; border-radius: 99px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.gxcc-item-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 14px; }
.gxcc-item-actions .gxcc-btn { padding: 6px 10px; font-size: 13px; }
.gxcc-pager { display: flex; justify-content: center; gap: 8px; margin-top: 20px; align-items: center; }
.gxcc-empty { border: 1px dashed var(--gx-line); border-radius: 12px; padding: 36px 16px; text-align: center; color: var(--gx-muted); background: #fff; }

/* Hộp thoại */
.gxcc-modal { position: fixed; inset: 0; background: rgba(15, 10, 10, .6); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.gxcc-modal[hidden] { display: none; }
.gxcc-modal-box { background: #fff; border-radius: 14px; width: min(860px, 100%); max-height: 100%; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.gxcc-modal-box h2 { margin: 0; font-size: 21px; }
.gxcc-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
.gxcc-detail img { width: 100%; border-radius: 8px; border: 1px solid var(--gx-line); }

/* Liên hệ */
.gxcc-contact { max-width: 860px; margin: 0 auto; }
.gxcc-lead { font-size: 17px; line-height: 1.6; }
.gxcc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 18px 0 26px; }
.gxcc-card { background: #fff; border: 1px solid var(--gx-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.gxcc-card h3 { margin: 4px 0 0; font-size: 19px; }
.gxcc-card p { margin: 0; }
.gxcc-card-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font: 800 22px/1 system-ui, sans-serif; }
.gxcc-fb { background: #1877f2; }
.gxcc-zalo { background: #0068ff; }
.gxcc-phone { font-size: 22px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; user-select: all; }
.gxcc-feedback { background: #fff; border: 1px solid var(--gx-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.gxcc-feedback h3 { margin: 0; }
.gxcc-feedback label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 14px; }
.gxcc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 720px) {
	.gxcc-lib-bar { grid-template-columns: 1fr 1fr; }
	.gxcc-lib-bar input { grid-column: 1 / -1; }
	.gxcc-detail, .gxcc-grid2 { grid-template-columns: 1fr; }
	#gxcc-frame { height: calc(100vh - 90px); min-height: 560px; }
}
