.tlocrt-editor { margin: 1.5em 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; position: relative; }
.tlocrt-editor * { box-sizing: border-box; }

.tl-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: #f3f4f6; border: 1px solid #d1d5db; border-bottom: 0; border-radius: 8px 8px 0 0; position: relative; z-index: 8; }
.tl-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-right: 8px; border-right: 1px solid #d1d5db; }
.tl-group:last-child { border-right: 0; padding-right: 0; }

.tlocrt-editor [data-tip] { position: relative; }
.tlocrt-editor button.tl-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; padding: 0; margin: 0;
	background: #fff; color: #1f2937; border: 1px solid #c4c9d0; border-radius: 6px; cursor: pointer;
}
.tlocrt-editor button.tl-btn:hover { background: #e8eef9; }
.tlocrt-editor button.tl-btn.tl-on { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.tlocrt-editor button.tl-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

.tl-th { display: inline-flex; align-items: center; gap: 3px; height: 38px; padding: 0 6px; background: #fff; border: 1px solid #c4c9d0; border-radius: 6px; font-size: 13px; color: #374151; }
.tl-th input { width: 46px; height: 28px; padding: 0 4px; font: inherit; border: 1px solid #d1d5db; border-radius: 4px; }

/* tooltip pri prelasku pokazivačem */
.tlocrt-editor [data-tip]:hover::after {
	content: attr(data-tip); position: absolute; top: calc(100% + 7px); left: 50%; transform: translateX(-50%);
	background: #111827; color: #fff; font-size: 12px; font-weight: 400; line-height: 1.2; padding: 5px 8px; border-radius: 4px;
	white-space: nowrap; z-index: 60; pointer-events: none;
}
.tlocrt-editor [data-tip]:hover::before {
	content: ""; position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%);
	border: 5px solid transparent; border-bottom-color: #111827; border-top: 0; z-index: 60; pointer-events: none;
}

.tl-fwrap { position: relative; }
.tl-pal {
	position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: 360px; max-width: 86vw; max-height: 440px; overflow-y: auto;
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px;
	background: #fff; border: 1px solid #c4c9d0; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.tl-pal[hidden] { display: none; }
.tl-cat { grid-column: 1 / -1; margin-top: 4px; font-size: 12px; font-weight: 700; color: #1f2937; text-transform: uppercase; letter-spacing: .03em; }
.tl-pal button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; font: inherit; font-size: 11px; line-height: 1.15; text-align: center; color: #374151; background: #fafafa; border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer; }
.tl-pal button:hover { background: #e8eef9; }
.tl-pal button.tl-on { border-color: #1a73e8; background: #e8f0fe; }
.tl-pal canvas { width: 56px; height: 56px; }

.tl-floors { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 6px 8px; background: #e9ecf1; border: 1px solid #d1d5db; border-bottom: 0; position: relative; z-index: 7; }
.tl-floors .tl-lbl { font-size: 12px; font-weight: 700; color: #4b5563; margin-right: 4px; }
.tl-floors button.tl-tab { font: inherit; font-size: 13px; padding: 6px 12px; height: 32px; background: #fff; color: #1f2937; border: 1px solid #c4c9d0; border-radius: 6px; cursor: pointer; }
.tl-floors button.tl-tab:hover { background: #e8eef9; }
.tl-floors button.tl-tab.tl-on { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.tl-floors button.tl-btn { width: 32px; height: 32px; }

.tl-wrap { border: 1px solid #d1d5db; background: #fff; overflow: hidden; position: relative; }
.tl-wrap canvas { display: block; width: 100%; touch-action: none; outline: none; }
.tl-input {
	position: absolute; width: 90px; height: 32px; padding: 4px 8px; font: 600 14px system-ui, sans-serif; text-align: center;
	border: 2px solid #1a73e8; border-radius: 16px; background: #fff; color: #111; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.tl-hint { padding: 6px 10px; font-size: 13px; color: #4b5563; background: #f9fafb; border: 1px solid #d1d5db; border-top: 0; border-radius: 0 0 8px 8px; min-height: 30px; }

/* e-mail dijalog */
.tl-modal { position: fixed; inset: 0; z-index: 99999; background: rgba(17,24,39,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tl-modal[hidden] { display: none; }
.tl-card { width: 100%; max-width: 420px; background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.tl-card h3 { margin: 0 0 12px; font-size: 18px; }
.tl-card label { display: block; margin-bottom: 10px; font-size: 13px; color: #374151; }
.tl-card input[type=email], .tl-card input[type=text], .tl-card textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; font-size: 14px; border: 1px solid #c4c9d0; border-radius: 6px; }
.tl-card .tl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tl-m-status { min-height: 20px; margin-bottom: 8px; font-size: 13px; }
.tl-m-status.tl-err { color: #b3261e; }
.tl-m-status.tl-ok { color: #1b7f3b; }
.tl-m-btns { display: flex; justify-content: flex-end; gap: 8px; }
.tl-m-btns button { font: inherit; font-size: 14px; padding: 9px 16px; border-radius: 6px; border: 1px solid #c4c9d0; background: #fff; cursor: pointer; }
.tl-m-btns button.tl-primary { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.tl-m-btns button:disabled { opacity: .6; cursor: default; }

/* izbornik poda */
.tl-fctl { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 1px solid #e5e7eb; }
.tl-fctl label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: #374151; }
.tl-fctl input[type=color] { width: 100%; height: 34px; padding: 2px; border: 1px solid #c4c9d0; border-radius: 6px; background: #fff; cursor: pointer; }
.tl-fctl input[type=number] { width: 100%; height: 34px; padding: 0 6px; font: inherit; border: 1px solid #c4c9d0; border-radius: 6px; }
.tl-fnote { grid-column: 1 / -1; font-size: 11px; color: #6b7280; line-height: 1.35; }

.tl-pal button.tl-fclose { grid-column: 1 / -1; flex-direction: row; justify-content: center; padding: 8px; font-size: 13px; background: #1a73e8; border-color: #1a73e8; color: #fff; }
.tl-pal button.tl-fclose:hover { background: #1558b8; }

/* v5: boja tepiha, kote */
.tl-th[hidden] { display: none; }
.tl-th input[type=color] { width: 34px; height: 28px; padding: 1px; border: 1px solid #d1d5db; border-radius: 4px; background: #fff; cursor: pointer; }
