/* TemplateEditor – styly editoru fotek v šabloně (eshop i admin). Prefix te-. */
.te { position: relative; }
.te-tpl { position: relative; width: 100%; height: 0; background: #fff; overflow: hidden; -webkit-user-select: none; user-select: none; }
.te-bg, .te-fg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; }
.te-bg { z-index: 1; }
.te-fg { z-index: 200; }
.te-box { position: absolute; overflow: hidden; background: #eee; z-index: 10; }
.te-box img, .te-ghost img, .te-full-img, .te-full-ghost img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; -webkit-transform-origin: 0 0; pointer-events: none; will-change: transform; }
.te-box.is-demo img { filter: grayscale(.35) brightness(1.05); }
.te-ghost { position: absolute; pointer-events: none; z-index: 300; opacity: 0; transition: opacity .15s; }
.te-ghost img { opacity: .35; }
.te-ghost.on { opacity: 1; }
.te-ui { position: absolute; z-index: 400; cursor: grab; touch-action: manipulation; border-radius: 2px; transition: box-shadow .15s; outline: none; }
.te-ui:active { cursor: grabbing; }
.te-ui.is-demo, .te-ui.is-empty { cursor: pointer; }
.te-tpl:hover .te-ui:not(.is-demo):not(.is-empty), .te-ui:focus-visible { box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 4px rgba(22, 110, 99, .85); }
.te-ui.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #166e63, 0 4px 14px rgba(0, 0, 0, .25) !important; }
.te-icons { position: absolute; right: 6px; top: 6px; display: flex; gap: 5px; }
.te-ic { padding: 0; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: #166e63; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; }
.te-ic:hover { background: #0f5249; }
.te-ui.is-demo .te-icons, .te-ui.is-empty .te-icons { display: none; }
.te-demo { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 8px; background: rgba(255, 255, 255, .55); }
.te-ui.is-demo .te-demo, .te-ui.is-empty .te-demo { display: flex; }
.te-ui.is-empty .te-demo-badge { display: none; }
.te-ui.is-demo:hover .te-demo { background: rgba(255, 255, 255, .4); }
.te-demo-badge { background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 12px; letter-spacing: .03em; text-transform: uppercase; text-align: center; max-width: 90%; line-height: 1.3; }
.te-cta { white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); cursor: pointer; }
/* Vlastní vzhled jen bez tříd hostitele (buttonClass); eshop dává svoje btn btn-danger. */
.te-cta:not(.btn) { border: 0; background: #e30613; color: #fff; font-weight: 400; border-radius: 4px; padding: 8px 14px; font-size: 14px; }
.te-cta:not(.btn):hover { background: #c00510; }
.te-ui.is-loading { background: rgba(255, 255, 255, .45); }
.te-ui.is-loading .te-demo, .te-ui.is-loading .te-icons { display: none; }
/* Kolečko při načítání fotky: hostitel může dát své (eshop FontAwesome), jinak vlastní kroužek. */
.te-loading { display: none; position: absolute; left: 0; top: 0; right: 0; bottom: 0; align-items: center; justify-content: center; font-size: 34px; color: #166e63; }
.te-ui.is-loading .te-loading { display: flex; }
.te-spin { width: 34px; height: 34px; border: 3px solid rgba(0, 0, 0, .12); border-top-color: #166e63; border-radius: 50%; animation: te-spin .8s linear infinite; }
@keyframes te-spin { to { transform: rotate(360deg); } }
.te-ui.pulse { animation: te-pulse .9s 2; }
@keyframes te-pulse { 50% { box-shadow: 0 0 0 2px #fff, 0 0 0 7px rgba(227, 6, 19, .6); } }

html.te-lock, html.te-lock body { overflow: hidden; }
.te-full { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 1040; background: #111; color: #fff; display: none; flex-direction: column; touch-action: none; }
.te-full.on { display: flex; }
.te-full-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); font-size: 15px; }
.te-done:not(.btn) { background: #e30613; color: #fff; border: 0; border-radius: 4px; padding: 8px 18px; font-weight: 400; font-size: 15px; }
.te-full-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.te-full-box, .te-full-ghost { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); }
.te-full-box { overflow: hidden; box-shadow: 0 0 0 2px #fff; }
.te-full-ghost { overflow: visible; pointer-events: none; }
.te-full-ghost img { opacity: .3; }
.te-full-fgclip { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; pointer-events: none; }
.te-full-fg { position: absolute; max-width: none; }
.te-full-bar { display: flex; justify-content: center; gap: 40px; padding: 10px 0; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
.te-full-bar button { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
