/* =========================================================================
 * Ủng hộ Luật Online (inc/ung-ho/)
 * .lo-uh        Trang /ung-ho/ (template-parts/ung-ho/page.php)
 * .lo-uh-box    Khung nhỏ: --post (cuối bài), --sidebar ([lo_ung_ho]), --popup (thẻ nổi)
 * .lo-nav__donate  Mục "♥ Ủng hộ" trong menu chính
 * ========================================================================= */
.lo-uh,
.lo-uh-box {
	--uh-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--uh-ink: #0f2346;
	--uh-ink-2: #334155;
	--uh-muted: #5b6b82;
	--uh-line: #dfe6f0;
	--uh-blue: #1d5fe0;
	--uh-blue-2: #1450c8;
	--uh-blue-soft: #e8f0fd;
	--uh-navy: #0b2d6b;
	--uh-red: #ef4444;
	--uh-red-2: #dc2626;
	--uh-pink: #fff3f3;
	--uh-green: #15803d;
	font-family: var(--uh-font);
}
.lo-uh *,
.lo-uh-box * { box-sizing: border-box; }
.lo-uh :where(h1, h2, h3, p, ul, li, dl, dd, dt),
.lo-uh-box :where(p) { margin: 0; padding: 0; }
.lo-uh :where(ul) { list-style: none; }
.lo-uh h1,
.lo-uh h2,
.lo-uh h3,
.lo-uh button,
.lo-uh input,
.lo-uh textarea,
.lo-uh-box button { font-family: var(--uh-font) !important; }
.lo-uh .lo-icon,
.lo-uh-box .lo-icon { flex-shrink: 0; }

/* ------------------------------------------------------------------ Trang */
.lo-uh {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	padding: 22px 16px 56px;
	color: var(--uh-ink-2);
	background:
		radial-gradient(900px 420px at 85% 0, rgba(210, 226, 250, .6), transparent 70%),
		linear-gradient(180deg, #f5f8fd 0%, #eef3fb 100%);
}
body:has(.lo-uh) { overflow-x: clip; }
.lo-uh__wrap { max-width: 1100px; margin: 0 auto; }
.lo-uh-crumbs { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--uh-ink-2); }
.lo-uh-crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--uh-ink-2) !important; text-decoration: none !important; }
.lo-uh-crumbs a svg { width: 17px; height: 17px; color: var(--uh-blue); fill: currentColor; }
.lo-uh-crumbs > svg { width: 15px; height: 15px; color: var(--uh-muted); }
.lo-uh-notice { margin: 14px 0 0 !important; padding: 10px 14px !important; border: 1px solid #b7e4c7; border-radius: 10px; background: #effaf3; color: #166534; font-size: 14px; }
.lo-uh-notice.is-bad { border-color: #f5c2c2; background: #fef2f2; color: #b91c1c; }

.lo-uh-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); align-items: center; gap: 24px; margin-top: 18px; }
.lo-uh-hero h1 { font-size: clamp(32px, 2.6vw + 16px, 50px); font-weight: 800; line-height: 1.12; letter-spacing: -.02em; color: var(--uh-ink); }
.lo-uh-hero__sub { margin-top: 12px !important; font-size: clamp(18px, .7vw + 14px, 23px); font-weight: 500; line-height: 1.4; color: var(--uh-ink); }
.lo-uh-hero__lead { margin-top: 14px !important; max-width: 560px; font-size: 16px; line-height: 1.6; color: var(--uh-muted); }
.lo-uh-hero__img { display: block; width: 100%; max-width: 360px; height: auto; justify-self: end; }

.lo-uh-feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0 28px !important; max-width: 820px; }
.lo-uh-feats li { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; font-size: 15.5px; line-height: 1.45; color: var(--uh-ink); }
.lo-uh-feats__ico { display: inline-flex; align-items: center; justify-content: center; width: 70px; height: 70px; border-radius: 50%; background: #dfeafb; color: var(--uh-blue); box-shadow: 0 6px 16px rgba(29, 95, 224, .1); }
.lo-uh-feats__ico svg { width: 34px; height: 34px; fill: currentColor; stroke: #fff; stroke-width: 1.5; }
.lo-uh-feats .lo-icon--users { stroke: currentColor; }
.lo-uh-feats .lo-icon--settings { stroke: currentColor; }
.lo-uh-feats .lo-icon--settings circle { fill: #fff; stroke: #fff; }

/* Thẻ chọn mức */
.lo-uh-card { padding: 26px 28px 22px; border: 1px solid #e6edf6; border-radius: 18px; background: #fff; box-shadow: 0 14px 40px rgba(15, 35, 70, .07); }
.lo-uh-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lo-uh-card h2 { font-size: clamp(21px, .6vw + 17px, 25px); font-weight: 700; color: var(--uh-ink); }
.lo-uh-card__head p { margin-top: 6px !important; font-size: 15.5px; color: var(--uh-muted); }
.lo-uh-mode { display: inline-flex; padding: 4px; border: 1px solid var(--uh-line); border-radius: 10px; background: #fff; }
.lo-uh-mode button { height: 38px; padding: 0 16px; border: 0; border-radius: 7px; background: none; color: var(--uh-ink-2); font-size: 14.5px; font-weight: 500; cursor: pointer; }
.lo-uh-mode button.is-active { background: var(--uh-navy); color: #fff; }

.lo-uh-amounts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.lo-uh-amount { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 12px 8px; border: 1px solid var(--uh-line); border-radius: 12px; background: #fff; color: var(--uh-ink); font: inherit; text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.lo-uh-amount b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.lo-uh-amount span { font-size: 13.5px; color: var(--uh-muted); }
.lo-uh-amount:hover { border-color: #a9c2f2; }
.lo-uh-amount.is-active { border: 1.5px solid var(--uh-blue); background: var(--uh-blue-soft); color: var(--uh-blue); box-shadow: 0 6px 16px rgba(29, 95, 224, .12); }
.lo-uh-amount.is-active span { color: var(--uh-blue); }
.lo-uh-amount--other input { display: none; width: 100%; height: 34px; margin: 0; padding: 0 8px; border: 1px solid #a9c2f2; border-radius: 8px; background: #fff; color: var(--uh-ink); font: 600 15px var(--uh-font); text-align: center; outline: 0; }
.lo-uh-amount--other.is-active input { display: block; }
.lo-uh-amount--other.is-active .lo-uh-amount__hint { display: none; }
.lo-uh-month-note { margin-top: 12px !important; padding: 10px 14px !important; border-radius: 10px; background: #f3f7fe; font-size: 13.5px; color: var(--uh-ink-2); }

.lo-uh-go { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; gap: 24px; margin-top: 18px; }
.lo-uh-go__btn { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lo-uh-go__btn small { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--uh-muted); }
.lo-uh-go__btn small svg { width: 15px; height: 15px; }
.lo-uh-go__how { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; background: #f6f9fe; font-size: 13.5px; line-height: 1.5; color: var(--uh-muted); }
.lo-uh-go__how b { display: block; margin-bottom: 2px; font-size: 15px; color: var(--uh-ink); }
.lo-uh-go__ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; background: var(--uh-blue-soft); color: var(--uh-blue); }
.lo-uh-go__ico svg { width: 26px; height: 26px; }

.lo-uh .lo-uh-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 54px; padding: 0 20px; border: 0; border-radius: 10px; background: linear-gradient(180deg, #2a6cf0, var(--uh-blue)); box-shadow: 0 8px 20px rgba(29, 95, 224, .25); color: #fff !important; font-size: 18px; font-weight: 600; cursor: pointer; transition: filter .15s, transform .15s; }
.lo-uh .lo-uh-btn svg { display: block; width: 22px; height: 22px; fill: currentColor; }
.lo-uh .lo-uh-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.lo-uh .lo-uh-btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.lo-uh .lo-uh-btn--green { background: linear-gradient(180deg, #179453, var(--uh-green)); box-shadow: 0 8px 20px rgba(21, 128, 61, .22); height: 50px; font-size: 16.5px; }
.lo-uh .lo-uh-btn--green svg { fill: none; }

/* Bước 2: QR + chuyển khoản */
.lo-uh-pay { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px 28px; margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--uh-line); }
.lo-uh-pay[hidden] { display: none; }
.lo-uh-pay { scroll-margin-top: 150px; } /* header dính phía trên */
.lo-uh-pay__qr { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--uh-line); border-radius: 14px; background: #fff; }
.lo-uh-pay__qr img { display: block; width: 100%; max-width: 260px; height: auto; aspect-ratio: 1; object-fit: contain; }
.lo-uh-pay__qr small { font-size: 12.5px; color: var(--uh-muted); }
.lo-uh-pay__info h3,
.lo-uh-form h3 { font-size: 17px; font-weight: 700; color: var(--uh-ink); }
.lo-uh-pay__info dl { display: flex; flex-direction: column; gap: 10px; margin-top: 12px !important; }
.lo-uh-pay__info dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #f0f3f8; }
.lo-uh-pay__info dt { font-size: 14px; color: var(--uh-muted); }
.lo-uh-pay__info dd { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--uh-ink); overflow-wrap: anywhere; }
.lo-uh-ref { padding: 2px 8px; border-radius: 6px; background: #fff7e6; color: #9a5b00; letter-spacing: .04em; }
.lo-uh-copy { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border: 1px solid var(--uh-line); border-radius: 7px; background: #fff; color: var(--uh-blue); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.lo-uh-copy svg { width: 14px; height: 14px; }
.lo-uh-copy.is-done { border-color: #b7e4c7; color: var(--uh-green); }
.lo-uh-pay__warn { margin-top: 12px !important; font-size: 13.5px; color: var(--uh-muted); }

.lo-uh-form { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border-radius: 14px; background: #f7f9fd; }
.lo-uh-form h3 small { font-size: 13px; font-weight: 400; color: var(--uh-muted); }
.lo-uh-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lo-uh-form label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 14px; font-weight: 500; color: var(--uh-ink); }
.lo-uh-form label small { font-weight: 400; color: var(--uh-muted); }
.lo-uh .lo-uh-form input[type="text"],
.lo-uh .lo-uh-form input[type="email"],
.lo-uh .lo-uh-form textarea { width: 100%; min-height: 44px; margin: 0; padding: 10px 12px; border: 1px solid var(--uh-line); border-radius: 9px; background: #fff; box-shadow: none; color: var(--uh-ink); font: 400 15px/1.45 var(--uh-font); outline: 0; }
.lo-uh .lo-uh-form textarea { resize: vertical; }
.lo-uh .lo-uh-form input:focus,
.lo-uh .lo-uh-form textarea:focus { border-color: #7ea3ee; box-shadow: 0 0 0 3px rgba(29, 95, 224, .12); }
.lo-uh-form .lo-uh-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--uh-ink-2); cursor: pointer; }
.lo-uh-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--uh-blue); }
.lo-uh-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.lo-uh-form__err { font-size: 13.5px; color: #dc2626; }
.lo-uh-form__err:empty { display: none; }
.lo-uh-form .lo-uh-btn { max-width: 320px; }
.lo-uh-done { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; border-radius: 14px; background: #f1fbf4; text-align: center; }
.lo-uh-done[hidden] { display: none; }
.lo-uh-done img { width: 86px; height: auto; }
.lo-uh-done h3 { font-size: 20px; font-weight: 700; color: var(--uh-ink); }
.lo-uh-done p { font-size: 15px; color: var(--uh-ink-2); }

/* Lời cảm ơn cuối trang */
.lo-uh-thanks { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 28px; margin-top: 26px; padding: 18px 28px; border-radius: 18px; background: linear-gradient(100deg, #e9f1fd 0%, #f2f6fd 60%, #eef4fd 100%); }
.lo-uh-thanks img { display: block; width: 100%; max-width: 300px; height: auto; }
.lo-uh-thanks h2 { font-size: clamp(19px, .6vw + 15px, 23px); font-weight: 700; color: var(--uh-ink); }
.lo-uh-thanks p { margin-top: 8px !important; font-size: 16px; line-height: 1.6; color: var(--uh-ink-2); }
.lo-uh .lo-uh-sign { display: flex; align-items: center; gap: 8px; margin-top: 10px !important; font-family: "Dancing Script", "Segoe Script", cursive; font-size: 30px; font-weight: 600; color: var(--uh-ink); }
.lo-uh-sign svg { width: 24px; height: 24px; color: var(--uh-red); fill: currentColor; }

/* Danh sách cảm ơn công khai */
.lo-uh-donors { margin-top: 26px; }
.lo-uh-donors h2 { font-size: 21px; font-weight: 700; color: var(--uh-ink); }
.lo-uh-donors ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 14px !important; }
.lo-uh-donors li { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid #e6edf6; border-radius: 14px; background: #fff; }
.lo-uh-donors__ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; height: 38px; border-radius: 50%; background: #ffe9e9; color: var(--uh-red); }
.lo-uh-donors__ico svg { width: 18px; height: 18px; fill: currentColor; }
.lo-uh-donors__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 14px; }
.lo-uh-donors__body b { color: var(--uh-ink); }
.lo-uh-donors__meta { color: var(--uh-muted); font-size: 13px; }
.lo-uh-donors q { margin-top: 4px; color: var(--uh-ink-2); font-style: italic; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ Khung nhỏ */
.lo-uh-box { position: relative; display: flex; align-items: center; gap: 16px; color: var(--uh-ink-2); }
.lo-uh-box__img { display: block; flex: 0 0 auto; width: 84px; height: auto; }
.lo-uh-box__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lo-uh-box .lo-uh-box__title,
.lo-uh-box .lo-uh-box__text { margin: 0 !important; padding: 0 !important; } /* CSS nội dung bài viết của theme chèn lề cho p */
.lo-uh-box .lo-uh-box__title { font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--uh-ink); }
.lo-uh-box .lo-uh-box__text { font-size: 14.5px; line-height: 1.55; color: var(--uh-ink-2); }
.lo-uh-box .lo-uh-box__btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 9px; background: linear-gradient(180deg, #f25555, var(--uh-red)); box-shadow: 0 6px 16px rgba(239, 68, 68, .25); color: #fff !important; font-size: 15.5px; font-weight: 600; text-decoration: none !important; white-space: nowrap; transition: filter .15s; }
.lo-uh-box .lo-uh-box__btn:hover { filter: brightness(1.06); }
.lo-uh-box__btn svg { width: 18px; height: 18px; fill: currentColor; }
.lo-uh-box__close { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: none; color: #94a3b8; cursor: pointer; }
.lo-uh-box__close:hover { background: rgba(15, 35, 70, .06); color: var(--uh-ink); }
.lo-uh-box__close svg { width: 17px; height: 17px; }

/* Cuối bài viết: ngang, nút bên phải */
.lo-uh-box--post { margin: 28px 0 8px; padding: 18px 46px 18px 18px; border: 1px solid #fde1e1; border-radius: 14px; background: linear-gradient(100deg, #fff1f1 0%, #fff8f8 100%); }
.lo-uh-box--post .lo-uh-box__body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title btn" "text btn"; align-items: center; column-gap: 18px; row-gap: 4px; }
.lo-uh-box--post .lo-uh-box__title { grid-area: title; }
.lo-uh-box--post .lo-uh-box__text { grid-area: text; font-size: 13.5px; }
.lo-uh-box--post .lo-uh-box__btn { grid-area: btn; }
.lo-uh-box--post[hidden] { display: none; }

/* Sidebar */
.lo-uh-box--sidebar { padding: 20px 18px; border: 1px solid #fde1e1; border-radius: 16px; background: linear-gradient(135deg, #fff0f0 0%, #fffafa 100%); box-shadow: 0 8px 22px rgba(239, 68, 68, .08); }
.lo-uh-box--sidebar .lo-uh-box__img { width: 92px; }
.lo-uh-box--sidebar .lo-uh-box__btn { margin-top: 6px; }

/* Popup: thẻ nổi góc dưới bên phải, không phủ nền */
.lo-uh-box--popup { position: fixed; right: 20px; bottom: 20px; z-index: 9990; width: min(420px, calc(100vw - 32px)); padding: 20px 22px; border: 1px solid #e6edf6; border-radius: 16px; background: #fff; box-shadow: 0 18px 50px rgba(15, 35, 70, .22); align-items: flex-start; transform: translateY(20px); opacity: 0; transition: opacity .3s, transform .3s; }
.lo-uh-box--popup[hidden] { display: none; }
.lo-uh-box--popup.is-in { transform: none; opacity: 1; }
.lo-uh-box--popup .lo-uh-box__img { width: 96px; padding: 6px; border-radius: 14px; background: #fff1f1; }
.lo-uh-box--popup .lo-uh-box__title { padding-right: 20px; font-size: 18px; }
.lo-uh-box--popup .lo-uh-box__text { font-size: 13.5px; }
.lo-uh-box--popup .lo-uh-box__btn { margin-top: 6px; background: linear-gradient(180deg, #2a6cf0, #1d5fe0); box-shadow: 0 6px 16px rgba(29, 95, 224, .25); }

/* Mục menu "♥ Ủng hộ" */
.lo-nav__item.lo-nav__donate > a { color: #e11d48 !important; }
.lo-nav__donate-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #ffe8ec; font-weight: 600; white-space: nowrap; }
.lo-nav__donate-pill svg { width: 16px; height: 16px; color: #e11d48; fill: currentColor; }
.lo-nav__item.lo-nav__donate > a:hover .lo-nav__donate-pill { background: #ffd6de; }

/* ------------------------------------------------------------------ Màn nhỏ */
@media (max-width: 900px) {
	.lo-uh-amounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.lo-uh-go { grid-template-columns: 1fr; gap: 14px; }
	.lo-uh-pay { grid-template-columns: 1fr; }
	.lo-uh-pay__qr { max-width: 300px; margin: 0 auto; }
	.lo-uh-thanks { grid-template-columns: 200px minmax(0, 1fr); padding: 16px 20px; }
}
@media (max-width: 640px) {
	.lo-uh { padding: 16px 16px 40px; }
	.lo-uh-hero { grid-template-columns: 1fr; }
	.lo-uh-hero__img { justify-self: center; max-width: 260px; order: -1; }
	.lo-uh-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.lo-uh-card { padding: 20px 16px 18px; }
	.lo-uh-mode { width: 100%; }
	.lo-uh-mode button { flex: 1; padding: 0 8px; font-size: 13.5px; }
	.lo-uh-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.lo-uh-amount--other { grid-column: 1 / -1; }
	.lo-uh-pay__info dl > div { grid-template-columns: 1fr; gap: 4px; }
	.lo-uh-form__row { grid-template-columns: 1fr; }
	.lo-uh-thanks { grid-template-columns: 1fr; text-align: center; }
	.lo-uh-thanks img { margin: 0 auto; max-width: 220px; }
	.lo-uh .lo-uh-sign { justify-content: center; }
	.lo-uh-box--post { flex-direction: column; text-align: center; padding: 18px 16px; }
	.lo-uh-box--post .lo-uh-box__body { grid-template-columns: 1fr; grid-template-areas: "title" "text" "btn"; }
	.lo-uh-box--post .lo-uh-box__btn { margin-top: 8px; }
	.lo-uh-box--popup { right: 16px; bottom: 16px; padding: 16px; }
	.lo-uh-box--popup .lo-uh-box__img { width: 72px; }
}
