/*
 * Inovis Support - styles. Everything is scoped under #ino-support so the theme cannot leak in
 * and nothing here leaks out. Colours are variables at the top for easy re-branding.
 */
#ino-support {
	--sup-bg: #ffffff;
	--sup-fg: #1f2937;
	--sup-muted: #6b7280;
	--sup-line: #e5e7eb;
	--sup-soft: #f3f4f6;
	--sup-accent: #0e5aa7;
	--sup-accent-fg: #ffffff;
	--sup-ok: #047857;
	--sup-err: #b91c1c;
	position: fixed; right: 16px; bottom: 16px; z-index: 99990;
	font-family: inherit; font-size: 14px; line-height: 1.5; color: var(--sup-fg); direction: rtl; text-align: right;
}
#ino-support *, #ino-support *::before, #ino-support *::after { box-sizing: border-box; }
#ino-support [hidden] { display: none !important; }
#ino-support button { font: inherit; cursor: pointer; margin: 0; }

/* the floating pill */
#ino-support .ino-sup-fab {
	display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 12px;
	background: var(--sup-bg); color: var(--sup-fg); border: 1px solid var(--sup-line); border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12); font-size: 13px; font-weight: 500;
}
#ino-support .ino-sup-fab:hover { border-color: var(--sup-accent); }
#ino-support .ino-sup-fab:focus-visible { outline: 2px solid var(--sup-accent); outline-offset: 2px; }
#ino-support .ino-sup-fab-icon { font-size: 17px; line-height: 1; }

/* the panel, opening above the pill */
#ino-support .ino-sup-panel {
	position: absolute; right: 0; bottom: 48px; width: 370px; max-width: calc(100vw - 32px);
	max-height: calc(100vh - 110px); overflow: auto; background: var(--sup-bg);
	border: 1px solid var(--sup-line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 14px;
}
#ino-support .ino-sup-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
#ino-support .ino-sup-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--sup-fg); }
#ino-support .ino-sup-x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--sup-muted); padding: 2px 6px; }
#ino-support .ino-sup-who { margin: 0 0 10px; font-size: 12px; color: var(--sup-muted); }

/* topic switch */
#ino-support .ino-sup-topics { display: flex; gap: 4px; background: var(--sup-soft); border-radius: 8px; padding: 3px; margin-bottom: 10px; }
#ino-support .ino-sup-topic { flex: 1; border: 0; background: none; border-radius: 6px; padding: 6px 4px; font-size: 12.5px; color: var(--sup-muted); }
#ino-support .ino-sup-topic[aria-checked="true"] { background: var(--sup-bg); color: var(--sup-fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

#ino-support .ino-sup-text, #ino-support .ino-sup-case-input {
	width: 100%; border: 1px solid var(--sup-line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13.5px;
	color: var(--sup-fg); background: var(--sup-bg); resize: vertical;
}
#ino-support .ino-sup-text:focus, #ino-support .ino-sup-case-input:focus { outline: 2px solid var(--sup-accent); outline-offset: -1px; }

/* screenshot + diagnostic rows */
#ino-support .ino-sup-tech { display: grid; gap: 8px; margin-top: 10px; }
#ino-support .ino-sup-row { border: 1px solid var(--sup-line); border-radius: 8px; padding: 8px 10px; }
#ino-support .ino-sup-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#ino-support .ino-sup-row-info { flex: 1; min-width: 120px; font-size: 12px; color: var(--sup-muted); }
#ino-support .ino-sup-btn {
	background: var(--sup-soft); border: 1px solid var(--sup-line); border-radius: 6px; padding: 5px 10px; font-size: 12.5px; color: var(--sup-fg);
}
#ino-support .ino-sup-btn:hover { border-color: var(--sup-accent); }
#ino-support .ino-sup-link { background: none; border: 0; padding: 0; color: var(--sup-accent); text-decoration: underline; font-size: 12.5px; }
#ino-support .ino-sup-thumb { display: block; width: 100%; margin-top: 8px; border: 1px solid var(--sup-line); border-radius: 6px; }
#ino-support .ino-sup-bar { height: 5px; background: var(--sup-soft); border-radius: 3px; margin-top: 8px; overflow: hidden; }
#ino-support .ino-sup-bar-fill { height: 100%; width: 0; background: var(--sup-accent); transition: width .3s; }
#ino-support .ino-sup-log { max-height: 90px; overflow: auto; margin-top: 6px; font-size: 11.5px; color: var(--sup-muted); }
#ino-support .ino-sup-report {
	max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 8px; background: var(--sup-soft); border-radius: 6px;
	font-size: 11px; white-space: pre-wrap; direction: rtl; text-align: right; font-family: inherit;
}

/* case picker */
#ino-support .ino-sup-case { margin-top: 10px; }
#ino-support .ino-sup-label { display: block; font-size: 12px; color: var(--sup-muted); margin-bottom: 4px; }
#ino-support .ino-sup-case-list { display: grid; gap: 2px; margin-top: 4px; max-height: 200px; overflow: auto; }
#ino-support .ino-sup-case-opt { text-align: right; background: none; border: 0; border-radius: 6px; padding: 6px 8px; font-size: 12.5px; color: var(--sup-fg); }
#ino-support .ino-sup-case-opt:hover, #ino-support .ino-sup-case-opt:focus { background: var(--sup-soft); outline: none; }
#ino-support .ino-sup-case-chip {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	background: var(--sup-soft); border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
#ino-support .ino-sup-note { font-size: 12px; color: var(--sup-muted); margin-top: 4px; }

/* send + status */
#ino-support .ino-sup-status { min-height: 18px; margin: 8px 0 6px; font-size: 12.5px; color: var(--sup-muted); }
#ino-support .ino-sup-status.is-error { color: var(--sup-err); }
#ino-support .ino-sup-send {
	width: 100%; height: 38px; background: var(--sup-accent); color: var(--sup-accent-fg); border: 0; border-radius: 8px; font-weight: 600;
}
#ino-support .ino-sup-send:hover { filter: brightness(1.08); }
#ino-support .ino-sup-done { display: grid; gap: 10px; justify-items: start; padding: 6px 0; }
#ino-support .ino-sup-done p { margin: 0; color: var(--sup-ok); font-weight: 500; }

/* phones: the pill becomes a round icon; the panel takes the width */
@media (max-width: 600px) {
	#ino-support .ino-sup-fab { width: 42px; height: 42px; padding: 0; justify-content: center; }
	#ino-support .ino-sup-fab-text { display: none; }
	#ino-support .ino-sup-panel { bottom: 52px; width: calc(100vw - 32px); }
}
@media print { #ino-support { display: none !important; } }

/* guest contact fields (0.2.0): shown only to visitors who are not logged in */
#ino-support .ino-sup-guest { display: grid; gap: 6px; margin-bottom: 10px; padding: 8px 10px; border: 1px solid var(--sup-line); border-radius: 8px; background: var(--sup-soft); }
#ino-support .ino-sup-guest-field { display: block; margin: 0; }
#ino-support .ino-sup-guest-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#ino-support .ino-sup-guest .ino-sup-note { margin: 0; }
/* honeypot: clipped to nothing in place (an off-screen offset would scroll the panel sideways) */
#ino-support .ino-sup-hp-wrap { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 600px) { #ino-support .ino-sup-guest-pair { grid-template-columns: 1fr; } }
