/* TG Demo-Basis: Hinweisleiste, Mail-Vorschau, Hinweis, gesperrte Kassenfelder */
:root {
	--tgdemo-green: #1f5f4a;
	--tgdemo-green-dark: #134e3a;
	--tgdemo-soft: #eef6f2;
	--tgdemo-text: #1d2320;
	--tgdemo-line: #cfd6d2;
}

body { padding-bottom: 56px; }

/* ---------- Hinweisleiste ---------- */
.tgdemo-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990;
	background: var(--tgdemo-green-dark); color: #fff;
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, .15);
}
.tgdemo-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; max-width: 1200px; margin: 0 auto; padding: 10px 16px; }
.tgdemo-badge { background: #fff; color: var(--tgdemo-green-dark); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.tgdemo-bar-text { flex: 1 1 260px; }
.tgdemo-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.tgdemo-bar .tgdemo-link, .tgdemo-bar button.tgdemo-link { color: #fff; text-decoration: underline; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.tgdemo-bar .tgdemo-link:hover, .tgdemo-bar .tgdemo-link:focus { color: #d9efe5; }
.tgdemo-inline { display: inline; margin: 0; }
.tgdemo-mail-btn { background: #fff; color: var(--tgdemo-green-dark); border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.tgdemo-mail-btn:focus-visible, .tgdemo-bar .tgdemo-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.tgdemo-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--tgdemo-soft); text-align: center; }
.tgdemo-count.is-new { background: #d63638; color: #fff; }

/* ---------- Mail-Vorschau ---------- */
.tgdemo-panel {
	position: fixed; right: 16px; bottom: 64px; z-index: 99991;
	width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 100px);
	display: flex; flex-direction: column;
	background: #fff; color: var(--tgdemo-text); border: 1px solid var(--tgdemo-line); border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
	font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tgdemo-panel[hidden] { display: none; }
.tgdemo-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--tgdemo-line); }
.tgdemo-close { background: none; border: 0; font-size: 24px; line-height: 1; cursor: pointer; color: var(--tgdemo-text); padding: 0 4px; }
.tgdemo-panel-hint { margin: 0; padding: 8px 16px; background: var(--tgdemo-soft); font-size: 13px; }
.tgdemo-panel-body { overflow: auto; padding: 8px 16px 16px; }
.tgdemo-empty { color: #555; }
.tgdemo-mail { border: 1px solid var(--tgdemo-line); border-radius: 8px; margin: 8px 0; background: #fff; }
.tgdemo-mail summary { cursor: pointer; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tgdemo-mail-subject { font-weight: 600; }
.tgdemo-mail-meta, .tgdemo-mail-files { font-size: 12px; color: #555; }
.tgdemo-mail-files { margin: 0 12px 6px; }
.tgdemo-mail-frame { display: block; width: 100%; height: 320px; border: 0; border-top: 1px solid var(--tgdemo-line); border-radius: 0 0 8px 8px; background: #fff; }

/* ---------- Hinweis ---------- */
.tgdemo-toast {
	position: fixed; right: 16px; bottom: 64px; z-index: 99992; max-width: min(460px, calc(100vw - 32px));
	display: flex; align-items: center; gap: 12px;
	background: #1d2320; color: #fff; padding: 12px 14px; border-radius: 8px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.tgdemo-toast[hidden] { display: none; }
.tgdemo-toast-btn { flex: none; background: #fff; color: #1d2320; border: 0; border-radius: 6px; padding: 6px 10px; font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- Backend ---------- */
.wp-admin .tgdemo-bar { left: 160px; }
.wp-admin.folded .tgdemo-bar { left: 36px; }
@media (max-width: 960px) { .wp-admin.auto-fold .tgdemo-bar { left: 36px; } }
@media (max-width: 782px) { .wp-admin .tgdemo-bar, .wp-admin.auto-fold .tgdemo-bar { left: 0; } }
.wp-admin #wpfooter { display: none; }

@media (max-width: 600px) {
	body { padding-bottom: 96px; }
	.tgdemo-bar-inner { padding: 8px 12px; font-size: 13px; }
	.tgdemo-panel, .tgdemo-toast { right: 8px; bottom: 104px; width: calc(100vw - 16px); max-width: none; }
}
.tgdemo-locked-field input[readonly] { background: #f3f5f4; color: #444; cursor: not-allowed; } /* Demo-Shop: gesperrte Kassenfelder */
