/* Jurisdiction router — inherits theme accent colours like the rest of the plugin. */

.lir-router { max-width: 720px; margin: 0 auto; }
.lir-router * { box-sizing: border-box; }

.lir-router__intro { font-size: 1.05rem; line-height: 1.65; margin: 0 0 1.25rem; }

.lir-router__panel {
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 12px;
	padding: 22px;
	background: #fff;
}

.lir-router__step {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: #767676;
	margin: 0 0 12px;
}

.lir-router__q { display: block; font-weight: 600; font-size: 1.1rem; margin: 0 0 12px; }

.lir-router__pcrow { display: flex; gap: 8px; flex-wrap: wrap; }
.lir-router__pcrow input {
	flex: 1 1 200px;
	padding: 11px 13px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font: inherit;
	text-transform: uppercase;
}
.lir-router__pcrow input:focus { outline: 2px solid var(--wp--preset--color--accent-1, #eb0045); outline-offset: 1px; }

.lir-router__err { color: var(--wp--preset--color--accent-1, #eb0045); font-size: .85rem; margin: 8px 0 0; min-height: 1em; }

.lir-router__flag {
	background: #fdf3f5;
	border: 1px solid #f3d3dc;
	border-radius: 8px;
	padding: 11px 13px;
	font-size: .9rem;
	margin: 0 0 14px;
}

/* Option buttons.
   Categories are a grid of tiles: fifteen full-width rows is a lot of scrolling
   for a step that should feel quick. Sub-questions keep the wider single column,
   because their wording is longer and the choice is finer. */
.lir-router__opts { display: grid; gap: 9px; }
.lir-router__opts--tiles {
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 10px;
}

.lir-router__opt {
	display: block;
	width: 100%;
	text-align: left;
	font: inherit;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 9px;
	padding: 13px 15px;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.lir-router__opt:hover { border-color: var(--wp--preset--color--accent-1, #eb0045); background: #fafafa; }
.lir-router__opt:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1, #eb0045); outline-offset: 2px; }
.lir-router__opt span { font-weight: 500; }
.lir-router__opt small { display: block; font-weight: 400; font-size: .82rem; color: #767676; margin-top: 2px; }

/* Tile variant */
.lir-router__opt--tile { padding: 16px 15px 15px; }
.lir-router__icon {
	width: 26px; height: 26px;
	display: block;
	margin-bottom: 10px;
	color: var(--wp--preset--color--accent-1, #eb0045);
}
.lir-router__opt--tile .lir-router__optlabel {
	display: block;
	font-weight: 600;
	font-size: .97rem;
	line-height: 1.3;
}
.lir-router__opt--tile small { margin-top: 4px; line-height: 1.45; }
.lir-router__opt--tile:hover { transform: translateY(-1px); }

/* Result */
.lir-router__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.lir-router__tag {
	align-self: flex-start;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #fff;
	background: #767676;
	border-radius: 999px;
	padding: 4px 11px;
}
.lir-router--msp .lir-router__tag { background: var(--wp--preset--color--accent-1, #eb0045); }
.lir-router--mp .lir-router__tag { background: #211c18; }
.lir-router--council .lir-router__tag { background: #5c6142; }
.lir-router__head h3 { margin: 6px 0 0; font-size: 1.35rem; line-height: 1.2; }
.lir-router__body { font-size: 1rem; line-height: 1.6; margin: 0 0 14px; }

.lir-router__soft {
	font-size: .85rem;
	color: #767676;
	border-top: 1px solid rgba(0, 0, 0, .1);
	padding-top: 12px;
	margin: 18px 0 8px;
}

/* Case form */
.lir-router__form { border-top: 1px solid rgba(0, 0, 0, .1); margin-top: 16px; padding-top: 16px; }
.lir-router__form label { display: block; font-weight: 500; margin: 12px 0 5px; }
.lir-router__form input[type="text"],
.lir-router__form input[type="email"],
.lir-router__form input[type="tel"],
.lir-router__form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font: inherit;
	background: #fff;
}
.lir-router__form textarea { resize: vertical; }
.lir-router__form :focus-visible { outline: 2px solid var(--wp--preset--color--accent-1, #eb0045); outline-offset: 1px; }

.lir-router__consent { display: flex; align-items: flex-start; gap: 9px; font-weight: 400 !important; margin-top: 16px !important; font-size: .92rem; }
.lir-router__consent input { margin-top: 3px; flex: none; }

/* Honeypot — hidden from people, visible to bots */
.lir-router__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.lir-router__link {
	font: inherit;
	background: none;
	border: 0;
	padding: 0;
	color: var(--wp--preset--color--accent-3, #a30232);
	text-decoration: underline;
	cursor: pointer;
}

.lir-router__back {
	font: inherit;
	font-size: .88rem;
	background: none;
	border: 0;
	padding: 0;
	margin-right: 14px;
	color: #767676;
	text-decoration: underline;
	cursor: pointer;
}
.lir-router__back:hover { color: var(--wp--preset--color--accent-3, #a30232); }

.lir-router__done p { margin: 0; font-size: 1.05rem; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
	.lir-router * { transition: none !important; }
}

/* Labour representatives for this area */
.lir-router__reps { display: grid; gap: 8px; margin: 0 0 16px; }
.lir-router__rep {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1px solid #ddd;
	border-radius: 9px;
	padding: 11px 13px;
	cursor: pointer;
	font-weight: 400;
	transition: border-color .15s ease;
}
.lir-router__rep:hover { border-color: var(--wp--preset--color--accent-1, #eb0045); }
.lir-router__rep:has(input:checked) {
	border-color: var(--wp--preset--color--accent-1, #eb0045);
	background: #fff7f9;
}
.lir-router__rep input { flex: none; margin: 0; }
.lir-router__rep img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.lir-router__repdot {
	width: 44px; height: 44px; border-radius: 6px; flex: none;
	background: var(--wp--preset--color--accent-1, #eb0045);
	opacity: .18;
}
.lir-router__repmeta { display: flex; flex-direction: column; }
.lir-router__repmeta small { color: #767676; font-size: .82rem; }

/* Inline layout: a single postcode row for use under an existing heading. */
.lir-router__start { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.lir-router__start input[type="text"] {
	flex: 0 1 260px;
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid #ccc;
	border-radius: 8px;
	font: inherit;
	font-size: 16px;
	background: #fff;
	text-transform: uppercase;
}
.lir-router__start input[type="text"]::placeholder { text-transform: none; }
.lir-router__start input[type="text"]:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1, #eb0045);
	outline-offset: 1px;
}
.lir-router__start .lir-btn { flex: none; padding: 14px 26px; font-size: 16px; }

/* Label kept for screen readers — the surrounding page carries the visible question. */
.lir-router__srlabel {
	position: absolute !important;
	width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 480px) {
	.lir-router__start input[type="text"],
	.lir-router__start .lir-btn { flex: 1 1 100%; }
}

.lir-router__loading { color: #767676; }

/* Out of area: the handoff. Given room rather than tucked into a footnote —
   somebody who has typed their postcode and been told "not us" deserves a
   clear next step, not a dead end. */
.lir-router__away{background:rgba(0,0,0,.03);border-radius:10px;padding:16px 18px;margin:0 0 18px}
.lir-router__away .lir-router__flag{margin:0 0 14px}
.lir-router__awaybtns{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.lir-router__awaybtn{display:block;background:#fff;border:1px solid rgba(0,0,0,.12);border-radius:9px;
  padding:13px 15px;text-decoration:none;color:inherit;transition:border-color .15s ease,transform .15s ease}
.lir-router__awaybtn:hover{border-color:var(--wp--preset--color--accent-1,#eb0045);transform:translateY(-1px)}
.lir-router__awaybtn strong{display:block;font-size:15px;color:var(--wp--preset--color--accent-1,#eb0045);margin-bottom:3px}
.lir-router__awaybtn small{display:block;font-size:12.5px;line-height:1.5;color:#5b544c}
.lir-router__awaynote{margin:12px 0 0;font-size:12.5px;color:#767676}
@media (max-width:560px){.lir-router__awaybtns{grid-template-columns:1fr}}


/* ---------------------------------------------------------------------------
 * Buttons rendered as links
 *
 * "Go to <council>" is an anchor wearing .lir-btn, and a block theme's link
 * styles were beating it — dark red underlined text on a red pill, which is
 * both unreadable and reads as a link inside a button. Themes vary too much to
 * guess which selector wins, so this sets every property a theme is likely to
 * touch, at a specificity the plugin controls.
 * ------------------------------------------------------------------------- */
.lir-router a.lir-btn,
.lir-router a.lir-btn:link,
.lir-router a.lir-btn:visited,
.lir-router a.lir-btn:hover,
.lir-router a.lir-btn:focus {
	color: #fff;
	text-decoration: none;
	background-image: none;
	box-shadow: none;
}
.lir-router a.lir-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* The out-of-area stop at step one. Neutral, because it is not a failure —
   the answer is simply somewhere else. */
.lir-router--away .lir-router__tag { background: #6b6a5c; }
