/* TLM Portal — forms, company header, customer sections and account widgets.
   Colours come from CSS variables so Elementor style settings (and the theme) can change them. */

.tlm-auth, .tlm-form, .tlm-company, .tlm-sections, .tlm-account-card, .tlm-account, .tlm-notice {
	--tlm-accent-c: var(--tlm-accent, #0068cd);
	--tlm-button-c: var(--tlm-button, #d90000);
	--tlm-button-hover-c: var(--tlm-button-hover, #ad0000);
	--tlm-ink-c: #212121;
	--tlm-muted-c: #555555;
	--tlm-line-c: #dddddd;
	box-sizing: border-box;
}
.tlm-auth *, .tlm-form *, .tlm-company *, .tlm-sections *, .tlm-account-card *, .tlm-account * { box-sizing: border-box; }

/* Buttons and links */
.tlm-btn, .tlm-submit {
	display: inline-block;
	padding: 14px 26px;
	border: 2px solid var(--tlm-button-c);
	border-radius: 0;
	background: var(--tlm-button-c);
	color: #ffffff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}
.tlm-btn:hover, .tlm-submit:hover { border-color: var(--tlm-button-hover-c); background: var(--tlm-button-hover-c); color: #ffffff; }
.tlm-btn--outline { border-color: var(--tlm-accent-c); background: transparent; color: var(--tlm-accent-c); }
.tlm-btn--outline:hover { border-color: var(--tlm-accent-c); background: var(--tlm-accent-c); color: #ffffff; }
.tlm-btn--light { border-color: #ffffff; background: #ffffff; color: var(--tlm-accent-c); }
.tlm-btn--light:hover { border-color: #ffffff; background: transparent; color: #ffffff; }
.tlm-submit { width: 100%; margin-top: 8px; font-size: 14px; }
.tlm-submit:disabled { opacity: .6; cursor: wait; }
.tlm-link { color: inherit; font-weight: 600; }
.tlm-btn:focus-visible, .tlm-submit:focus-visible, .tlm-link:focus-visible { outline: 3px solid var(--tlm-accent-c); outline-offset: 3px; }

/* Messages */
.tlm-notice { margin: 0; padding: 18px 20px; border-left: 3px solid var(--tlm-accent-c); background: #f2f7fc; color: var(--tlm-ink-c); }
.tlm-message:empty { display: none; }
.tlm-message { margin: 0 0 18px; padding: 14px 16px; border-left: 3px solid var(--tlm-accent-c); background: #f2f7fc; font-size: 14px; }
.tlm-message.is-error { border-color: #d90000; background: #fff1f1; color: #a80000; }
.tlm-message.is-success { border-color: #187044; background: #edf8f1; color: #155b37; }
.tlm-message:focus { outline: none; }
.tlm-editor-note { margin: 12px 0 0; padding: 8px 12px; border: 1px dashed #999; color: #555; font-size: 12px; }

/* Login / sign-up tabs */
.tlm-tabs { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--tlm-line-c); }
.tlm-tab {
	margin: 0 0 -1px;
	padding: 12px 0;
	border: 0;
	border-bottom: 3px solid transparent;
	background: none;
	color: var(--tlm-muted-c);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.tlm-tab[aria-selected="true"] { border-bottom-color: var(--tlm-button-c); color: var(--tlm-accent-c); }
.tlm-tab:hover { color: var(--tlm-accent-c); }
.tlm-tab:focus-visible { outline: 3px solid var(--tlm-accent-c); outline-offset: 2px; }
.tlm-tab-panel[hidden] { display: none; }

/* Form fields */
.tlm-form { color: var(--tlm-ink-c); }
.tlm-field { margin: 0 0 18px; }
.tlm-field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.tlm-form input[type="text"], .tlm-form input[type="email"], .tlm-form input[type="password"], .tlm-form input[type="url"], .tlm-form input:not([type]) {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1px solid #bbbbbb;
	border-radius: 0;
	background: #ffffff;
	color: var(--tlm-ink-c);
	font: inherit;
	font-size: 16px; /* 16px stops phones zooming in on focus */
}
.tlm-form input:focus { border-color: var(--tlm-accent-c); outline: 2px solid var(--tlm-accent-c); outline-offset: 1px; }
.tlm-form input[readonly] { background: #f3f3f3; color: var(--tlm-muted-c); }
.tlm-field--check label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.tlm-field--check input { width: 18px; height: 18px; margin: 0; accent-color: var(--tlm-accent-c); }
.tlm-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.tlm-hint, .tlm-captcha-note { display: block; margin-top: 6px; color: var(--tlm-muted-c); font-size: 13px; }
.tlm-note { margin: 16px 0 0; color: var(--tlm-muted-c); font-size: 13px; line-height: 1.7; }
.tlm-note a { color: var(--tlm-accent-c); }
.tlm-password { position: relative; display: block; }
.tlm-form .tlm-password input { padding-right: 76px; }
.tlm-password-toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	padding: 6px 10px;
	border: 0;
	background: none;
	color: var(--tlm-accent-c);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}
.tlm-captcha { margin: 0 0 18px; padding: 16px; border: 1px solid var(--tlm-line-c); background: #f7f9fc; }
.tlm-captcha label { display: block; font-size: 14px; font-weight: 600; }
.tlm-captcha input { max-width: 140px; margin-top: 8px; }
.tlm-captcha-note { margin: 8px 0 0; }
.tlm-trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tlm-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tlm-actions .tlm-submit { width: auto; margin-top: 0; }

/* Company header */
.tlm-company { display: flex; align-items: center; justify-content: space-between; gap: 32px; color: var(--tlm-company-text, inherit); }
.tlm-company-details { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.tlm-company-kicker {
	margin: 0 0 14px;
	padding-left: 12px;
	border-left: 4px solid #d90000;
	color: var(--tlm-company-kicker, inherit);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.4;
	text-transform: uppercase;
}
.tlm-company-name { margin: 0 0 14px; color: var(--tlm-company-name, inherit); font-size: clamp(32px, 4vw, 54px); line-height: 1.1; }
.tlm-company-content { max-width: 760px; }
.tlm-company-content p:last-child { margin-bottom: 0; }
.tlm-company-welcome { margin: 14px 0 0; font-size: 17px; }
.tlm-company-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin: 24px 0 0; }
.tlm-company-image { flex: 0 1 270px; max-width: 35%; }
.tlm-company-logo { display: block; width: 100%; max-height: 200px; object-fit: contain; padding: 16px; background: #ffffff; }

/* Customer sections */
.tlm-sections-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 28px; }
.tlm-sections-nav-label { margin-right: 4px; color: var(--tlm-muted-c); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tlm-sections-nav a {
	padding: 8px 16px;
	border: 1px solid var(--tlm-accent-c);
	color: var(--tlm-accent-c);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}
.tlm-sections-nav a:hover, .tlm-sections-nav a:focus-visible { background: var(--tlm-accent-c); color: #ffffff; }
.tlm-section {
	margin: 0 0 28px;
	padding: clamp(18px, 3vw, 32px);
	border: 1px solid var(--tlm-line-c);
	border-top: 4px solid var(--tlm-accent-c);
	background: var(--tlm-section-bg, #ffffff);
	scroll-margin-top: 24px;
}
.tlm-section:last-child { margin-bottom: 0; }
.tlm-section-title { margin: 0 0 18px; color: var(--tlm-section-title, var(--tlm-accent-c)); font-size: clamp(22px, 2.6vw, 30px); }
.tlm-section-embed { width: 100%; min-width: 0; }
.tlm-section-embed iframe { display: block; width: 100%; max-width: 100%; border: 0; background: #ffffff; }
.tlm-section-text { color: var(--tlm-muted-c); line-height: 1.8; }
.tlm-section-text p:last-child { margin-bottom: 0; }

/* Account card */
.tlm-account-card { color: var(--tlm-ink-c); }
.tlm-avatar {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	margin-bottom: 18px;
	overflow: hidden;
	border-radius: 50%;
	background: var(--tlm-accent-c);
	color: #ffffff;
	font-family: "Josefin Sans", Arial, sans-serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
}
.tlm-avatar--image { border: 1px solid var(--tlm-line-c); background: #ffffff; }
.tlm-avatar img { width: 100%; height: 100%; object-fit: contain; }
.tlm-account-name { margin: 0; font-family: "Josefin Sans", Arial, sans-serif; font-size: 22px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.tlm-account-company { margin: 4px 0 0; color: var(--tlm-muted-c); font-size: 14px; }
.tlm-account-links { margin: 18px 0 0; padding: 0; list-style: none; }
.tlm-account-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--tlm-line-c); color: var(--tlm-accent-c); font-size: 14px; font-weight: 600; text-decoration: none; }
.tlm-account-links a:hover { color: #d90000; }

/* Account details, edit form and password */
.tlm-account { color: var(--tlm-ink-c); }
.tlm-account-heading { margin: 0 0 18px; color: var(--tlm-accent-c); font-size: clamp(26px, 3vw, 34px); }
.tlm-account-list { display: grid; gap: 0; margin: 0 0 24px; }
.tlm-account-list > div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--tlm-line-c); }
.tlm-account-list dt { color: var(--tlm-muted-c); font-size: 14px; font-weight: 600; }
.tlm-account-list dd { margin: 0; overflow-wrap: anywhere; }
.tlm-edit { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--tlm-line-c); scroll-margin-top: 24px; }
.tlm-edit[hidden] { display: none; }
.tlm-edit h3 { margin: 0 0 16px; color: var(--tlm-accent-c); font-size: 24px; }
.tlm-edit h3:focus { outline: none; }
.tlm-password-change { margin-top: 28px; border-top: 1px solid var(--tlm-line-c); }
.tlm-password-change summary { padding: 18px 0; color: var(--tlm-accent-c); font-weight: 700; cursor: pointer; }
.tlm-password-change .tlm-form { max-width: 460px; padding-bottom: 8px; }

@media (max-width: 640px) {
	.tlm-field-grid { grid-template-columns: minmax(0, 1fr); }
	.tlm-company { flex-direction: column; align-items: flex-start; gap: 20px; }
	.tlm-company-image { max-width: 220px; }
	.tlm-account-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	/* Phones: the jump list is one row you can swipe, instead of a tall stack above the content. */
	.tlm-sections-nav { flex-wrap: nowrap; margin-right: -20px; padding: 0 20px 6px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
	.tlm-sections-nav a, .tlm-sections-nav-label { flex: 0 0 auto; white-space: nowrap; }
	.tlm-actions .tlm-submit, .tlm-actions .tlm-btn { width: 100%; }
}
