/*
 * TEG-ELECTRIC - the shortcodes, wherever a theme puts them.
 *
 * Everything is scoped under .tel-public so that a theme's own headings, lists
 * and forms are left alone, and every rule inherits the theme's font on
 * purpose: this is the contractor's page, not the plugin's.
 *
 * Amber is the accent, the deep blue-grey is the text, and the clear red is
 * kept for one job only - danger. It marks a C1, a C2 and anything that has
 * run out, and it marks nothing else, so that when it appears it means
 * something.
 */

.tel-public {
	--tel-amber: #e0a800;
	--tel-amber-dark: #b98a00;
	--tel-ink: #2b3a4a;
	--tel-ink-soft: #46586b;
	--tel-cream: #f7f4ee;
	--tel-line: #e3ddd2;
	--tel-muted: #74818f;
	--tel-red: #c0392b;
	--tel-green: #1f6f4a;
	color: var(--tel-ink);
}

.tel-public * { box-sizing: border-box; }

.tel-public h3.tel-h,
.tel-public .tel-h { color: var(--tel-ink); margin: 1.6em 0 .5em; }
.tel-public .tel-h4 { color: var(--tel-ink); margin: 1.4em 0 .4em; font-size: 1.05em; }
.tel-public .tel-hint { display: block; color: var(--tel-muted); font-size: .86em; margin-top: 3px; }
.tel-public .tel-lead { font-size: 1.05em; }
.tel-public .tel-muted { color: var(--tel-muted); }
.tel-public .tel-empty,
.tel-public .tel-closed { background: var(--tel-cream); border-left: 4px solid var(--tel-amber); padding: 12px 16px; border-radius: 0 6px 6px 0; }
.tel-public .tel-bad { color: var(--tel-red); font-weight: 600; }
.tel-public .tel-contact { background: var(--tel-cream); border-radius: 8px; padding: 12px 16px; margin-top: 18px; }

.tel-public .tel-flash { padding: 10px 16px; border-radius: 6px; margin: 0 0 16px; }
.tel-public .tel-flash.tel-ok { background: #e4f1ea; color: var(--tel-green); }
.tel-public .tel-flash.tel-bad { background: #fbe9e7; color: var(--tel-red); }
.tel-public .tel-flash.tel-info { background: var(--tel-cream); color: var(--tel-ink-soft); }

.tel-public .tel-urgent {
	background: #fdf3e0;
	border-left: 4px solid var(--tel-red);
	padding: 12px 16px;
	border-radius: 0 6px 6px 0;
	font-weight: 600;
	display: flex;
	gap: 12px;
	align-items: center;
}

.tel-public .tel-btn {
	display: inline-block;
	background: var(--tel-amber);
	color: var(--tel-ink);
	border: 0;
	border-radius: 6px;
	padding: 10px 22px;
	font: inherit;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
}

.tel-public .tel-btn:hover,
.tel-public .tel-btn:focus { background: var(--tel-amber-dark); color: #fff; }
.tel-public .tel-btn-small { padding: 5px 14px; font-size: .88em; }
.tel-public .tel-btn-plain { background: transparent; border: 1px solid var(--tel-line); color: var(--tel-ink-soft); }
.tel-public .tel-btn-plain:hover { background: var(--tel-cream); color: var(--tel-ink); }

/* ── the forms ──────────────────────────────────────────────────────── */

.tel-public .tel-pform { margin: 8px 0 0; }
.tel-public .tel-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 4px 20px; }
.tel-public .tel-field { margin: 0 0 14px; }
.tel-public .tel-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.tel-public .tel-field input[type="text"],
.tel-public .tel-field input[type="email"],
.tel-public .tel-field input[type="tel"],
.tel-public .tel-field input[type="date"],
.tel-public .tel-field input[type="number"],
.tel-public .tel-field select,
.tel-public .tel-field textarea {
	width: 100%;
	max-width: 460px;
	padding: 9px 11px;
	border: 1px solid var(--tel-line);
	border-radius: 6px;
	font: inherit;
	background: #fff;
	color: inherit;
}

.tel-public .tel-field input:focus,
.tel-public .tel-field select:focus,
.tel-public .tel-field textarea:focus { outline: 2px solid var(--tel-amber); outline-offset: 1px; }
.tel-public .tel-req { color: var(--tel-red); }
.tel-public .tel-submit { margin: 20px 0 0; }
.tel-public .tel-terms {
	background: var(--tel-cream);
	border-radius: 8px;
	padding: 12px 16px;
	margin: 14px 0;
	font-size: .9em;
	max-height: 220px;
	overflow: auto;
}

/* The honeypot. Hidden from people and from screen readers, left in the DOM. */
.tel-public .tel-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── what we do ─────────────────────────────────────────────────────── */

.tel-service-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 18px;
}

.tel-service {
	background: #fff;
	border: 1px solid var(--tel-line);
	border-top: 3px solid var(--tel-amber);
	border-radius: 10px;
	padding: 16px 18px;
	margin: 0;
}

.tel-service-name { margin: 0 0 6px; font-size: 1.08em; color: var(--tel-ink); }
.tel-service-text { margin: 0 0 10px; font-size: .95em; }
.tel-service-cta { margin: 0; }

.tel-public .tel-scheme {
	background: var(--tel-cream);
	border-left: 4px solid var(--tel-amber);
	padding: 12px 16px;
	border-radius: 0 6px 6px 0;
	margin-top: 22px;
}

.tel-public .tel-scheme-none { border-left-color: var(--tel-muted); }

/* ── a customer's own page ──────────────────────────────────────────── */

.tel-acc-sec { margin: 0 0 30px; }

.tel-ptable { width: 100%; border-collapse: collapse; margin: 6px 0 12px; }
.tel-ptable th,
.tel-ptable td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--tel-line); vertical-align: top; }
.tel-ptable thead th { font-size: .8em; text-transform: uppercase; letter-spacing: .06em; color: var(--tel-muted); }
.tel-ptable tbody th { color: var(--tel-muted); font-weight: 600; white-space: nowrap; width: 1%; }
.tel-ptable tr.tel-row-bad td { background: #fbe9e7; }

.tel-public .tel-decide { margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }

.tel-public .tel-due { font-weight: 600; white-space: nowrap; }
.tel-public .tel-due-ok { color: var(--tel-green); }
.tel-public .tel-due-due_soon { color: var(--tel-amber-dark); }
.tel-public .tel-due-expired { color: var(--tel-red); }
.tel-public .tel-due-word { font-size: .82em; text-transform: uppercase; letter-spacing: .05em; color: var(--tel-red); }
.tel-public .tel-due-due_soon + .tel-due-word { color: var(--tel-amber-dark); }

.tel-public .tel-outcome { font-weight: 700; }
.tel-public .tel-outcome-satisfactory { color: var(--tel-green); }
.tel-public .tel-outcome-unsatisfactory { color: var(--tel-red); }

.tel-public .tel-balance { font-weight: 700; font-size: 1.05em; }
.tel-public .tel-balance-clear { color: var(--tel-green); font-weight: 600; }

@media (max-width: 600px) {
	.tel-ptable,
	.tel-ptable thead,
	.tel-ptable tbody,
	.tel-ptable tr { display: block; }
	.tel-ptable thead { display: none; }
	.tel-ptable tr { border-bottom: 2px solid var(--tel-line); padding: 6px 0; }
	.tel-ptable td { border: 0; padding: 3px 0; }
}
