/* LT Help Desk – client UI. Everything is scoped under .lt-hd so it sits safely inside Divi. Mobile first. */
.lt-hd {
	--lt-hd-ink: #1d2733;
	--lt-hd-muted: #5a6573;
	--lt-hd-line: #dfe4ea;
	--lt-hd-soft: #f5f7f9;
	--lt-hd-accent: #0b6f78;      /* darker take on the LTheme teal (#40c6cc) so white text passes AA */
	--lt-hd-accent-ink: #ffffff;
	--lt-hd-accent-soft: #e6f6f7;
	--lt-hd-ai: #f2f0fb;
	--lt-hd-ai-line: #6b5bb5;
	--lt-hd-ok: #1c6b3a;
	--lt-hd-ok-soft: #e8f5ec;
	--lt-hd-err: #a12222;
	--lt-hd-err-soft: #fdeeee;
	--lt-hd-focus: #1a5fd0;
	--lt-hd-radius: 10px;
	color: var(--lt-hd-ink);
	font-size: 16px;
	line-height: 1.6;
	max-width: 860px;
	margin: 0 auto 48px;
	scroll-margin-top: 90px;
}
.lt-hd *, .lt-hd *::before, .lt-hd *::after { box-sizing: border-box; }
.lt-hd p { padding-bottom: 0; margin: 0 0 12px; }
.lt-hd ul, .lt-hd ol { padding: 0; margin: 0; }
.lt-hd a { color: var(--lt-hd-accent); text-decoration: underline; text-underline-offset: 2px; }
.lt-hd a:hover { text-decoration-thickness: 2px; }
.lt-hd :focus-visible { outline: 3px solid var(--lt-hd-focus); outline-offset: 2px; border-radius: 4px; }

.lt-hd-h2 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; padding: 0; font-weight: 700; color: var(--lt-hd-ink); }
.lt-hd-h3 { font-size: 18px; margin: 0 0 12px; padding: 0; font-weight: 700; color: var(--lt-hd-ink); }
.lt-hd-muted, .lt-hd-hint { color: var(--lt-hd-muted); font-size: 14px; }
.lt-hd-hint { margin: 6px 0 0; }
.lt-hd-lead { font-size: 17px; }

/* Intro */
.lt-hd-intro { margin-bottom: 20px; }
.lt-hd-facts { list-style: none; display: grid; gap: 8px; margin: 12px 0 0; }
.lt-hd-facts li { position: relative; padding-left: 22px; font-size: 15px; }
.lt-hd-facts li::before { content: ""; position: absolute; left: 4px; top: .65em; width: 8px; height: 8px; border-radius: 50%; background: var(--lt-hd-accent); }

/* Cards and layout */
.lt-hd-card { background: #fff; border: 1px solid var(--lt-hd-line); border-radius: var(--lt-hd-radius); padding: 18px; margin-bottom: 20px; }
.lt-hd-grid { display: grid; gap: 16px; }
.lt-hd-narrow { max-width: 480px; }
.lt-hd-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.lt-hd-head .lt-hd-h2 { margin: 0; }
.lt-hd-back { margin-bottom: 12px; font-size: 15px; }

/* Notices */
.lt-hd-notice { border-radius: var(--lt-hd-radius); padding: 12px 14px; margin: 0 0 16px; background: var(--lt-hd-soft); border-left: 4px solid var(--lt-hd-line); }
.lt-hd-notice--ok { background: var(--lt-hd-ok-soft); border-left-color: var(--lt-hd-ok); }
.lt-hd-notice--error { background: var(--lt-hd-err-soft); border-left-color: var(--lt-hd-err); }
.lt-hd-notice ul { margin: 4px 0 0 18px; list-style: disc; }
.lt-hd-notice:focus { outline: none; }
.lt-hd-notice:focus-visible { outline: 3px solid var(--lt-hd-focus); }

/* Forms */
.lt-hd-form .lt-hd-field { margin-bottom: 16px; }
.lt-hd label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }
.lt-hd .lt-hd-req { font-weight: 400; color: var(--lt-hd-muted); font-size: 13px; }
.lt-hd input[type="text"], .lt-hd input[type="email"], .lt-hd input[type="url"], .lt-hd input[type="password"],
.lt-hd select, .lt-hd textarea {
	display: block; width: 100%; max-width: 100%; font: inherit; font-size: 16px; color: var(--lt-hd-ink);
	background: #fff; border: 1px solid #b7c0ca; border-radius: 8px; padding: 10px 12px; min-height: 44px; margin: 0;
	box-shadow: none; -webkit-appearance: none; appearance: none;
}
.lt-hd select { background-image: linear-gradient(45deg, transparent 50%, var(--lt-hd-muted) 50%), linear-gradient(135deg, var(--lt-hd-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.lt-hd textarea { min-height: 140px; resize: vertical; }
.lt-hd input:focus, .lt-hd select:focus, .lt-hd textarea:focus { border-color: var(--lt-hd-focus); outline: 3px solid rgba(26, 95, 208, .25); outline-offset: 0; }
.lt-hd [aria-invalid="true"] { border-color: var(--lt-hd-err); }
.lt-hd-field-error { color: var(--lt-hd-err); font-size: 14px; margin: 6px 0 0; font-weight: 600; }
.lt-hd input[type="file"] { font-size: 15px; max-width: 100%; }
.lt-hd .login-remember label { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
.lt-hd #lt-hd-login p { margin-bottom: 14px; }
.lt-hd-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Buttons (also styles the WordPress login button). Colours use !important because Divi styles links with id selectors. */
.lt-hd .lt-hd-btn, .lt-hd #lt-hd-login-submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
	font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none !important; cursor: pointer;
	color: var(--lt-hd-accent-ink) !important; background: var(--lt-hd-accent) !important; border: 2px solid var(--lt-hd-accent); border-radius: 8px;
}
.lt-hd .lt-hd-btn:hover, .lt-hd #lt-hd-login-submit:hover { background: #085860 !important; border-color: #085860; color: #fff !important; }
.lt-hd .lt-hd-btn--secondary { background: #fff !important; color: var(--lt-hd-accent) !important; }
.lt-hd .lt-hd-btn--secondary:hover { background: var(--lt-hd-accent-soft) !important; color: #085860 !important; }
.lt-hd .lt-hd-btn--link { background: none !important; border: 0; color: var(--lt-hd-accent) !important; padding: 0; min-height: 0; text-decoration: underline !important; font-weight: 400; font-size: 15px; }
.lt-hd .lt-hd-btn--link:hover { background: none !important; color: #085860 !important; }
.lt-hd .lt-hd-btn[disabled] { opacity: .65; cursor: progress; }
.lt-hd-actions { margin-top: 8px; }

/* Private access */
.lt-hd-access { border: 1px dashed #b7c0ca; border-radius: 8px; padding: 0; margin: 0 0 16px; background: var(--lt-hd-soft); }
.lt-hd-access summary { cursor: pointer; padding: 12px 14px; font-weight: 600; min-height: 44px; }
.lt-hd-access-body { padding: 0 14px 4px; }
.lt-hd-access-saved { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 14px; color: var(--lt-hd-muted); margin: 0 0 16px; }
.lt-hd-access-saved p { margin: 0; }

/* Ticket list */
.lt-hd-list { list-style: none; display: grid; gap: 10px; }
.lt-hd-item-link { display: block; background: #fff; border: 1px solid var(--lt-hd-line); border-radius: var(--lt-hd-radius); padding: 14px 16px; text-decoration: none !important; color: inherit !important; }
.lt-hd-item-link:hover { border-color: var(--lt-hd-accent); }
.lt-hd-item-subject { display: block; font-weight: 600; color: var(--lt-hd-accent); margin-bottom: 6px; overflow-wrap: anywhere; }
.lt-hd-item-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 14px; color: var(--lt-hd-muted); margin: 0; }
.lt-hd-empty { color: var(--lt-hd-muted); }

/* Status chips: always text, colour is a bonus */
.lt-hd-chip { display: inline-block; font-size: 13px; font-weight: 600; line-height: 1.2; padding: 4px 10px; border-radius: 999px; background: var(--lt-hd-soft); color: var(--lt-hd-ink); border: 1px solid var(--lt-hd-line); }
.lt-hd-chip--waiting_staff { background: #fff4dc; border-color: #f0d28a; color: #6b4a00; }
.lt-hd-chip--waiting_client { background: #e7f0ff; border-color: #b6cdf5; color: #1b4486; }
.lt-hd-chip--ai_answered { background: var(--lt-hd-ai); border-color: #cfc8ef; color: #45388a; }
.lt-hd-chip--solved { background: var(--lt-hd-ok-soft); border-color: #b9dfc5; color: var(--lt-hd-ok); }
.lt-hd-chip--closed { background: #eef0f2; color: #4a5562; }

/* Ticket view */
.lt-hd-ticket-head { margin-bottom: 16px; }
.lt-hd-ticket-head .lt-hd-h2 { overflow-wrap: anywhere; margin-bottom: 8px; }
.lt-hd-thread { list-style: none; display: grid; gap: 12px; margin-bottom: 16px; }
.lt-hd-msg article { border: 1px solid var(--lt-hd-line); border-radius: var(--lt-hd-radius); padding: 14px 16px; background: #fff; }
.lt-hd-msg--client article { background: var(--lt-hd-soft); }
.lt-hd-msg--staff article { border-left: 4px solid var(--lt-hd-accent); }
.lt-hd-msg--ai article { background: var(--lt-hd-ai); border-color: #d8d2f2; border-left: 4px solid var(--lt-hd-ai-line); }
.lt-hd-msg-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.lt-hd-msg-who { font-weight: 700; }
.lt-hd-msg--ai .lt-hd-msg-who::before { content: "AI"; display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--lt-hd-ai-line); border-radius: 4px; padding: 2px 5px; margin-right: 8px; vertical-align: 2px; }
.lt-hd-msg-head time { font-size: 13px; color: var(--lt-hd-muted); }
.lt-hd-ai-note { font-size: 13px; color: #4b4470; margin-bottom: 10px; }
.lt-hd-msg-body { overflow-wrap: anywhere; }
.lt-hd-msg-body > :last-child { margin-bottom: 0; }
.lt-hd-msg-body ol, .lt-hd-msg-body ul { margin: 0 0 12px 22px; }
.lt-hd-msg-body ol { list-style: decimal; }
.lt-hd-msg-body ul { list-style: disc; }
.lt-hd-msg-body li { margin-bottom: 4px; }
.lt-hd-msg-body img { max-width: 100%; height: auto; }
.lt-hd-msg-body pre, .lt-hd-msg-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; background: rgba(0,0,0,.05); border-radius: 4px; }
.lt-hd-msg-body code { padding: 1px 4px; }
.lt-hd-msg-body pre { padding: 10px; overflow-x: auto; white-space: pre-wrap; }
.lt-hd-msg-body blockquote { border-left: 3px solid var(--lt-hd-line); margin: 0 0 12px; padding-left: 12px; color: var(--lt-hd-muted); }
.lt-hd-files { list-style: none; margin-top: 10px; font-size: 14px; display: grid; gap: 4px; }
.lt-hd-files li::before { content: "📎 "; }
.lt-hd-feedback { margin-top: 14px; padding-top: 12px; border-top: 1px solid #d8d2f2; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lt-hd-feedback-q { width: 100%; margin: 0; font-weight: 600; }
.lt-hd-rated { margin: 10px 0 0; }

/* AI waiting */
.lt-hd-live:empty { display: none; }
.lt-hd-thinking { display: flex; gap: 12px; align-items: center; background: var(--lt-hd-ai); border: 1px dashed #cfc8ef; border-radius: var(--lt-hd-radius); padding: 14px 16px; color: #3f3770; }
.lt-hd-dots { flex: 0 0 auto; width: 36px; height: 10px; background: radial-gradient(circle closest-side, var(--lt-hd-ai-line) 90%, transparent) 0 50% / 12px 10px repeat-x; animation: lt-hd-pulse 1s ease-in-out infinite alternate; }
@keyframes lt-hd-pulse { from { opacity: .25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lt-hd-dots { animation: none; clip-path: none; } }
.lt-hd-links { list-style: none; display: grid; gap: 10px; margin: 0 0 16px; }
.lt-hd-links a { font-weight: 600; }

/* Wider screens */
@media (min-width: 720px) {
	.lt-hd-card { padding: 24px; }
	.lt-hd-grid { grid-template-columns: 1fr 1fr; align-items: start; }
	.lt-hd-h2 { font-size: 26px; }
	.lt-hd-feedback-q { width: auto; margin-right: 6px; }
}

/* Divi styles lists in content with an id selector (#left-area ul); our own lists opt out. */
.lt-hd ul.lt-hd-facts, .lt-hd ul.lt-hd-list, .lt-hd ol.lt-hd-thread, .lt-hd ul.lt-hd-files, .lt-hd ul.lt-hd-links {
	list-style: none !important;
	padding: 0 !important;
	line-height: inherit;
}
.lt-hd ul.lt-hd-facts { padding-bottom: 0 !important; }
.lt-hd .lt-hd-msg-body ol, .lt-hd .lt-hd-msg-body ul, .lt-hd .lt-hd-notice ul { padding: 0 0 0 1.2em !important; margin: 0 0 12px; }
.lt-hd .lt-hd-msg-body ol { list-style: decimal !important; }
.lt-hd .lt-hd-msg-body ul, .lt-hd .lt-hd-notice ul { list-style: disc !important; }
.lt-hd h2.lt-hd-h2, .lt-hd h3.lt-hd-h3 { padding-bottom: 0; }
