/* TPM mobile navigation (inc/tpm-mobile-nav.php) — inside the WP Mobile Menu right panel.
 * Look follows the approved sample (mobile-navigation 14.11, preview.html).
 * Selectors start with .tmn so they win over the plugin's ".mobmenu-content li a" rules. */

body.tmn-lock { position: fixed !important; left: 0; right: 0; width: 100%; overflow: hidden !important; }

/* the component replaces the plugin's own top band, close icon and lists */
.mobmenu-right-panel.tmn-on::before { display: none !important; }
.mobmenu-right-panel.tmn-on > a.mobmenu-right-bt { display: none !important; }
.mobmenu-right-panel.tmn-on .mobmenu-content > :not(.tmn) { display: none !important; }
.mobmenu-right-panel.tmn-on .mobmenu-content { display: flex !important; flex-direction: column; margin: 0 !important; padding: 0 !important; height: calc(100% - var(--wp-admin--admin-bar--height, 0px)) !important; overflow: hidden !important; }
.mobmenu-right-panel.tmn-on { background: #fff; }

.tmn {
	--tmn-ink: #23445d;
	--tmn-dark: #203e54;
	--tmn-icon: #426989;
	--tmn-muted: #526b7e;
	--tmn-pale: #edf3f7;
	--tmn-line: #d9e4eb;
	--tmn-tree: #94aec1;
	--tmn-focus: #376d92;
	display: grid; grid-template-rows: auto minmax(0, 1fr) auto; flex: 1 1 auto; min-height: 0; height: 100%;
	background: #fff; color: var(--tmn-ink);
	font: 16px/1.35 "Roboto Condensed", Arial, sans-serif; text-align: start;
}
.tmn *, .tmn *::before, .tmn *::after { box-sizing: border-box; }
.tmn ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.tmn li { list-style: none !important; margin: 0 !important; padding: 0 !important; position: static; }
.tmn a { text-decoration: none !important; color: inherit; }
.tmn a, .tmn button, .tmn span, .tmn strong, .tmn small, .tmn h2, .tmn h3 { letter-spacing: normal !important; word-spacing: normal !important; text-transform: none; font-family: inherit; }
.tmn button { font: inherit; margin: 0; cursor: pointer; box-shadow: none !important; text-shadow: none !important; height: auto; line-height: inherit; -webkit-tap-highlight-color: transparent; }
.tmn a { -webkit-tap-highlight-color: transparent; }
.tmn :is(a, button, input):focus-visible { outline: 3px solid var(--tmn-focus) !important; outline-offset: -3px; }
.tmn .tmn-top :is(a, button):focus-visible { outline-color: #e0b164 !important; outline-offset: 2px; }
.tmn [hidden] { display: none !important; }
.tmn .tmn-row svg, .tmn .tx2-icon { pointer-events: none; }

/* ---- top bar: title, back, close ---- */
.tmn .tmn-top { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 12px; align-items: center; min-height: 64px; padding: max(9px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 9px max(16px, env(safe-area-inset-left)); background: var(--tmn-dark); color: #fff; }
.tmn .tmn-heading { display: flex; gap: 10px; align-items: center; min-width: 0; }
.tmn .tmn-title { margin: 0 !important; padding: 0; color: #fff !important; font-size: clamp(17px, 5.25vw, 24px) !important; font-weight: 700; line-height: 1.12 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tmn .tmn-title.is-long { font-size: 17px !important; }
.tmn .tmn-title:focus { outline: none; }
.tmn button.tmn-back { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 !important; border: 0 !important; border-radius: 4px !important; background: #ffffff14 !important; color: #fff !important; }
.tmn button.tmn-close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 !important; border: 1px solid #ffffff55 !important; border-radius: 5px !important; background: none !important; color: #fff !important; }
.tmn .tmn-back svg, .tmn .tmn-close svg { width: 22px; height: 22px; }
@media (hover: hover) { .tmn button.tmn-back:hover, .tmn button.tmn-close:hover { background: #ffffff20 !important; } }

/* ---- screens ---- */
.tmn .tmn-viewport { position: relative; min-height: 0; overflow: hidden; }
.tmn .tmn-screen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.tmn .tmn-screen.is-current:not(.tmn-screen--root) { animation: tmn-in .16s ease-out; }
@keyframes tmn-in { from { transform: translateX(28px); opacity: .72; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tmn .tmn-screen.is-current { animation: none !important; } }
.tmn .tmn-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 13px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }

/* ---- search (the plugin's own form, restyled) ---- */
.tmn .tmn-search { margin: 0 0 15px; }
.tmn .tmn-search .search-form { display: flex !important; align-items: stretch; min-height: 46px; margin: 0 !important; padding: 0 !important; background: #fff; border: 1px solid #9fb4c3; border-radius: 5px; gap: 0 !important; }
.tmn .tmn-search .search-form:focus-within { border-color: var(--tmn-focus); }
.tmn .tmn-search label { flex: 1 1 auto; min-width: 0; margin: 0 !important; display: flex; }
.tmn .tmn-search .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.tmn .tmn-search .search-field { flex: 1; width: 100% !important; min-width: 0; min-height: 44px; height: 44px !important; margin: 0 !important; padding: 0 4px 0 12px !important; border: 0 !important; border-radius: 5px 0 0 5px; background: transparent !important; color: inherit; font: inherit; font-size: 16px !important; box-shadow: none !important; }
.tmn .tmn-search .search-field::placeholder { color: var(--tmn-muted); opacity: 1; }
.tmn .tmn-search .search-field:focus { outline: none; }
.tmn .tmn-search .search-submit { flex: 0 0 46px; width: 46px; min-height: 44px; height: auto !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-left: 1px solid var(--tmn-line) !important; border-radius: 0 4px 4px 0 !important; font-size: 0 !important; color: transparent !important; cursor: pointer;
	background: var(--tmn-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d7f99' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center / 20px no-repeat !important; }

/* ---- rows ---- */
.tmn .tmn-row { display: flex !important; align-items: center; gap: 11px; width: 100%; min-height: 51px; padding: 7px 3px !important; border: 0 !important; border-bottom: 1px solid var(--tmn-line) !important; border-radius: 0 !important; background: transparent !important; color: var(--tmn-ink) !important; font-size: 18px !important; font-weight: 600; line-height: 1.2 !important; text-align: start; }
.tmn .tmn-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmn .tmn-row .tmn-trail { display: inline-grid; place-items: center; margin-inline-start: auto; flex: 0 0 17px; width: 17px; height: 17px; color: #5d7f99; }
.tmn .tmn-trail svg, .tmn .tmn-ico svg { width: 100%; height: 100%; display: block; }
.tmn .tmn-row > .tx2-icon, .tmn .tmn-row > svg, .tmn .tmn-row > .tx2-icon--media { flex: 0 0 21px; width: 21px !important; height: 22px !important; min-width: 0 !important; margin: 0 !important; color: var(--tmn-icon); }
.tmn .tmn-row > [data-tpm-nav-icon*="+"] { flex-basis: 30px; width: 30px !important; }
.tmn .tx2-icon--media svg, .tmn .tx2-icon--media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tmn .tmn-row[aria-current="page"] .tmn-label { text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .tmn .tmn-row:hover { background: var(--tmn-pale) !important; } .tmn .tmn-row:hover > .tx2-icon, .tmn .tmn-row:hover > svg { color: var(--tmn-ink); } }

/* ---- banner (shown when it fits) ---- */
.tmn .tmn-feature { position: relative; display: flex; align-items: flex-end; height: 82px; margin: 0 0 10px; overflow: hidden; border-radius: 6px; background: var(--tmn-ink); color: #fff !important; }
.tmn .tmn-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
.tmn .tmn-feature::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #142f44f0 4%, #142f44ba 50%, #142f4440 100%), linear-gradient(0deg, #142f4450, transparent); }
.tmn .tmn-feature__text { position: relative; z-index: 2; display: grid; gap: 2px; min-width: 0; max-width: calc(100% - 32px); padding: 10px 12px; line-height: 1.12; }
.tmn .tmn-feature strong { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.tmn .tmn-feature small { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.tmn .tmn-feature__go { position: absolute; z-index: 2; right: 10px; bottom: 10px; width: 22px; height: 22px; color: #fff; }
.tmn .tmn-feature__go svg { width: 100%; height: 100%; display: block; }
.tmn.tmn .tmn-no-banner .tmn-feature { display: none; }

/* ---- groups: cards with a short heading, tree lines ---- */
.tmn .tmn-sub + .tmn-sub, .tmn .tmn-feature + .tmn-sub { margin-top: 8px; }
.tmn .tmn-sub--named { border: 1px solid var(--tmn-line); border-radius: 6px; overflow: hidden; }
.tmn .tmn-gt { position: relative; margin: 0 !important; padding: 0 !important; background: #e3edf5; border-bottom: 1px solid #c7d8e5; line-height: 1.1 !important; font-size: 12px !important; }
.tmn .tmn-gt > svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 17px !important; height: 16px !important; color: #375970; pointer-events: none; z-index: 1; }
.tmn .tmn-gt:has(> svg) .tmn-gt__btn { padding-left: 31px !important; }
.tmn button.tmn-gt__btn { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 29px; padding: 4px 9px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; color: #375970 !important; font-size: 12px !important; font-weight: 740; line-height: 1.1 !important; text-align: start; }
.tmn .tmn-gt__btn > span:first-child { letter-spacing: .065em !important; text-transform: uppercase !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tmn .tmn-caret { margin-inline-start: auto; flex: 0 0 auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .75; }
.tmn [aria-expanded="false"] > .tmn-caret { transform: rotate(-45deg); }
.tmn .tmn-sub--named > .tmn-gt + .tmn-stack { margin-top: 0 !important; }
.tmn .tmn-sub--named > .tmn-stack { margin-inline-start: 9px !important; padding-inline-start: 9px !important; }
.tmn .tmn-leaf { min-height: 44px; gap: 6px; padding: 4px 6px !important; font-size: 17px !important; font-weight: 580; line-height: 1.15 !important; }
.tmn .tmn-sub--named .tmn-leaf { padding-inline: 4px 7px !important; }
.tmn .tmn-leaf .tmn-trail { flex-basis: 13px; width: 13px; height: 13px; }
.tmn .tmn-sub--named > .tmn-stack > li:last-child:not(:has(ul)) > .tmn-leaf,
.tmn .tmn-sub--named > .tmn-stack > li:last-child:not(:has(ul)) > .tmn-branch-row > .tmn-leaf { border-bottom: 0 !important; }
.tmn .tmn-branch { margin-inline-start: 10px !important; padding-inline-start: 9px !important; }
.tmn :is(.tmn-sub--named > .tmn-stack, .tmn-branch) > li { position: relative !important; }
.tmn :is(.tmn-sub--named > .tmn-stack, .tmn-branch) > li::before { content: ""; position: absolute; pointer-events: none; inset-inline-start: -9px; top: 0; bottom: 0; border-inline-start: 1px solid var(--tmn-tree); }
.tmn :is(.tmn-sub--named > .tmn-stack, .tmn-branch) > li:last-child::before { bottom: auto; height: 17px; }
.tmn :is(.tmn-sub--named > .tmn-stack, .tmn-branch) > li::after { content: ""; position: absolute; pointer-events: none; inset-inline-start: -9px; top: 17px; width: 7px; height: 6px; border-inline-start: 1px solid var(--tmn-tree); border-bottom: 1px solid var(--tmn-tree); border-end-start-radius: 4px; }

/* branch: under the link normally, its own screen when the screen is short */
.tmn .tmn-branch-row { display: block; }
.tmn button.tmn-branch-toggle { display: none; min-width: 44px; min-height: 44px; padding: 0 !important; border: 0 !important; border-inline-start: 1px solid var(--tmn-line) !important; border-bottom: 1px solid var(--tmn-line) !important; border-radius: 0 !important; background: #f4f8fb !important; color: #5d7f99 !important; place-items: center; }
.tmn .tmn-branch-toggle .tmn-ico { display: block; width: 17px; height: 17px; }
.tmn .tmn-compact .tmn-branch-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.tmn .tmn-compact .tmn-branch-row > .tmn-leaf > .tmn-trail { display: none; }
.tmn .tmn-compact .tmn-branch-row > .tmn-leaf { padding-inline-end: 4px !important; }
.tmn .tmn-compact button.tmn-branch-toggle { display: grid; }
.tmn .tmn-compact .tmn-branch { display: none; }

/* ---- bottom row: account + language ---- */
.tmn .tmn-tools { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 7px; padding: 8px max(16px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); border-top: 1px solid #c8d8e4; background: #f4f8fb; }
.tmn .tmn-account { min-height: 44px; gap: 7px; padding: 0 8px 0 10px !important; background: #e5eef5 !important; border: 1px solid #c6d7e3 !important; border-radius: 5px !important; font-size: 16px !important; line-height: 1.1 !important; }
.tmn .tmn-account .tmn-trail { flex-basis: 14px; width: 14px; height: 14px; }
.tmn .tmn-account > .tx2-icon, .tmn .tmn-account > svg { width: 21px !important; height: 21px !important; }
@media (hover: hover) { .tmn .tmn-account:hover { background: #e0ebf3 !important; } }
.tmn .tmn-flags { position: relative; z-index: 3; align-self: stretch; }
.tmn button.tmn-flag-control, .tmn .tmn-flag-option { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; padding: 0 8px !important; border: 1px solid #c6d7e3 !important; border-radius: 5px !important; background: #fff !important; color: var(--tmn-ink) !important; }
.tmn button.tmn-flag-control { min-width: 62px; height: 100%; }
.tmn button.tmn-flag-control[aria-expanded="true"] { background: #e5eef5 !important; }
.tmn .tmn-flag-control .tmn-caret { margin: 0; width: 6px; height: 6px; transform: translateY(-1px) rotate(45deg); }
.tmn .tmn-flag-control[aria-expanded="true"] .tmn-caret { transform: translateY(2px) rotate(-135deg); }
.tmn .tmn-flags img { width: 24px; height: 16px; display: block; object-fit: contain; }
.tmn .tmn-flag-list { position: absolute; right: 0; bottom: calc(100% + 6px); display: grid; gap: 3px; width: 62px; padding: 4px !important; background: #fff; border: 1px solid #9fb4c3; border-radius: 6px; box-shadow: 0 4px 14px #173a5333; }
.tmn .tmn-flag-option[aria-current="true"] { background: #e5eef5 !important; border-color: #9fb4c3 !important; }

/* ---- narrow phones ---- */
@media (max-width: 380px) {
	.tmn .tmn-top { padding-inline: 10px; gap: 8px; }
	.tmn .tmn-heading { gap: 6px; }
	.tmn .tmn-scroll, .tmn .tmn-tools { padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right)); }
	.tmn .tmn-leaf { font-size: 15px !important; }
	.tmn .tmn-feature strong { font-size: 16px; }
	.tmn .tmn-feature small { display: none; }
}
@media (max-width: 320px) {
	.tmn .tmn-leaf { gap: 4px; }
	.tmn .tmn-leaf > .tx2-icon, .tmn .tmn-leaf > svg { width: 18px !important; flex-basis: 18px; }
}
@media (max-width: 300px) {
	.tmn .tmn-leaf { font-size: 14px !important; }
	.tmn .tmn-sub--named > .tmn-stack { margin-inline-start: 6px !important; }
	.tmn .tmn-account { gap: 4px; padding-inline: 6px !important; }
	.tmn .tmn-account .tmn-trail { display: none; }
	.tmn button.tmn-flag-control, .tmn .tmn-flag-list { min-width: 54px; width: 54px; }
}
