/* Visual site editor (textedit.js): the editor window with a computer / phone preview, the form that
 * opens next to an edited text or button, and the frames drawn over the preview. The editor has its own
 * dark look so it reads the same on every shop theme. */
.te-link{color:inherit;text-decoration:underline;text-underline-offset:.16em}

/* ---- editor window ---- */
#te-shell{position:fixed;inset:0;z-index:2147483000;display:flex;flex-direction:column;background:#0d1210;color:#eef2ef;font:500 14px/1.4 Manrope,system-ui,sans-serif}
#te-shell *{box-sizing:border-box}
#te-shell .te-top{display:flex;align-items:center;gap:12px;padding:10px 16px;background:#141b17;border-bottom:1px solid #26312b;flex-wrap:wrap}
#te-shell .te-top b{font-size:15px;white-space:nowrap}
#te-shell button{font:inherit;color:inherit;cursor:pointer;border:1px solid #33413a;background:#1b2520;border-radius:10px;padding:8px 14px;min-height:38px}
#te-shell button:hover{background:#243029}
#te-shell .te-devices{display:flex;gap:4px;padding:3px;border-radius:12px;background:#0d1210;border:1px solid #26312b}
#te-shell .te-devices button{border:0;background:transparent;padding:6px 12px;min-height:32px}
#te-shell .te-devices button.is-on{background:#2a3830;color:#fff}
#te-shell .te-add{background:#d8fa46;color:#101a15;border-color:#d8fa46;font-weight:700}
#te-shell .te-add:hover{background:#e6ff72}
#te-shell .te-done{margin-left:auto;font-weight:700}
#te-shell .te-status{flex:1 1 220px;min-width:0;color:#a9b8af;font-size:13px}
#te-shell .te-status[data-state="busy"]{color:#e8c76a}
#te-shell .te-status[data-state="ok"]{color:#8fe0a5}
#te-shell .te-status[data-state="error"]{color:#ff8f86}
#te-shell .te-stage{flex:1;min-height:0;overflow:auto;display:flex;justify-content:center;align-items:flex-start;padding:12px;background:radial-gradient(circle at 50% 0,#17201b,#0d1210 70%)}
#te-shell .te-frame{flex:none;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 20px 60px #000a;position:relative}
#te-shell .te-frame[data-device="phone"]{padding:12px;background:#05070a;border-radius:44px;border:2px solid #2d3833}
#te-shell .te-frame[data-device="phone"] .te-screen{border-radius:32px;overflow:hidden}
#te-shell .te-screen{position:relative;transform-origin:0 0;overflow:hidden;background:#fff}
#te-shell iframe{width:100%;height:100%;border:0;display:block;background:#fff}

/* ---- the open-editor entry points ---- */
.te-pill{position:fixed;right:16px;bottom:16px;z-index:60;border:0;border-radius:999px;padding:11px 18px;background:#101a15;color:#d8fa46;font:700 14px/1 Manrope,system-ui,sans-serif;box-shadow:0 8px 24px #0006;cursor:pointer}
@media (max-width:760px){.te-pill{bottom:calc(84px + env(safe-area-inset-bottom))}}

/* ---- inside the preview ---- */
html[data-te-editing] #app{cursor:text}
html[data-te-editing] [data-link-index]{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;outline:1px dashed #d8fa46;outline-offset:3px}
html[data-te-editing] [data-link-index],html[data-te-editing] [data-link-index] *{-webkit-touch-callout:none;touch-action:none}
html[data-te-editing] [data-te-from]{outline:1px dotted #8fc8ff;outline-offset:2px}
html.te-dragging,html.te-dragging *{cursor:grabbing!important;user-select:none!important}
.te-drop-before{box-shadow:-4px 0 0 #d8fa46,0 -4px 0 #d8fa46}
.te-drop-after{box-shadow:4px 0 0 #d8fa46,0 4px 0 #d8fa46}
.te-hover{position:fixed;z-index:2147482000;pointer-events:none;border:2px solid #4da3ff;border-radius:5px;background:#4da3ff1f}
.te-ghost{position:fixed;z-index:2147483000;pointer-events:none;opacity:.85;transform:rotate(-2deg);box-shadow:0 10px 30px #0006;margin:0}

/* ---- the form next to an edited text or button ---- */
.te-pop{position:fixed;z-index:2147483200;width:340px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;padding:14px;border-radius:14px;background:#151c18;color:#eef2ef;border:1px solid #33413a;box-shadow:0 16px 48px #000a;font:500 14px/1.4 Manrope,system-ui,sans-serif;text-align:left}
.te-pop *{box-sizing:border-box}
.te-pop [hidden]{display:none!important}
.te-pop select{display:block;width:100%;padding:10px;border-radius:9px;border:1px solid #33413a;background:#0d1210;color:#fff;font:inherit;min-height:44px}
.te-pop .te-button-preview{display:inline-block;max-width:100%;overflow-wrap:anywhere;padding:12px 18px;margin:8px 0 16px;background:#d8fa46;color:#101a15;border-radius:10px;font-weight:700}
.te-pop h4{margin:0 0 10px;font:700 15px/1.2 Manrope,system-ui,sans-serif;color:#fff}
.te-pop label{display:block;margin:0 0 10px}
.te-pop label span{display:block;margin-bottom:4px;color:#a9b8af;font-size:12px}
.te-pop input,.te-pop textarea{display:block;width:100%;margin:0;padding:9px 11px;border-radius:9px;border:1px solid #33413a;background:#0d1210;color:#fff;font:500 14px/1.4 Manrope,system-ui,sans-serif;resize:vertical}
.te-pop input:focus,.te-pop textarea:focus{outline:2px solid #d8fa46;outline-offset:0}
.te-pop small{display:block;margin-top:4px;color:#7f9187;font-size:12px}
.te-pop .te-note{margin:0 0 10px;color:#7f9187;font-size:12px}
.te-pop .te-error{margin:0 0 8px;color:#ff8f86;font-size:13px;min-height:0}
.te-pop .te-error:empty{display:none}
.te-pop .te-piece-wrap{margin:0 0 10px}
.te-pop .te-piece-box{display:flex;gap:6px;margin-top:6px}
.te-pop .te-piece-box[hidden]{display:none}
.te-pop .te-piece-box input{flex:1}
.te-pop button{font:600 13px/1 Manrope,system-ui,sans-serif;color:#eef2ef;cursor:pointer;border:1px solid #33413a;background:#1f2a24;border-radius:9px;padding:9px 12px;min-height:36px;margin:0}
.te-pop button:hover{background:#2a3830}
.te-pop .te-actions{display:flex;flex-wrap:wrap;gap:8px}
.te-pop .te-primary{background:#d8fa46;border-color:#d8fa46;color:#101a15;font-weight:700}
.te-pop .te-primary:hover{background:#e6ff72}
.te-pop .te-danger{color:#ff8f86;border-color:#5a3431}
@media (max-width:520px){.te-pop{left:8px!important;right:8px;top:auto!important;bottom:8px;width:auto!important}.te-pop input,.te-pop textarea{font-size:16px}.te-pop button{min-height:44px}}
@media (max-width:760px){#te-shell .te-top{padding:8px 10px;gap:8px}#te-shell .te-status{order:9;flex-basis:100%}}

/* ---- the corner handle that makes the selected text or button bigger or smaller ---- */
.te-sel{position:fixed;z-index:2147482500;pointer-events:none;border:2px solid #d8fa46;border-radius:5px}
.te-sel[data-scale]::after{content:attr(data-scale);position:absolute;left:0;top:-26px;padding:3px 8px;border-radius:6px;background:#101a15;color:#d8fa46;font:700 12px/1.2 Manrope,system-ui,sans-serif}
.te-handle{position:absolute;right:-11px;bottom:-11px;width:22px;height:22px;border-radius:6px;background:#d8fa46;border:2px solid #101a15;cursor:nwse-resize;pointer-events:auto;touch-action:none;box-shadow:0 2px 8px #0008}

/* Size row inside the edit form: − 100 % + and a button back to the normal size */
.te-pop .te-size{display:flex;align-items:center;gap:8px;margin:0 0 10px}
.te-pop .te-size-label{flex:1;color:#a9b8af;font-size:12px}
.te-pop .te-size-value{min-width:52px;text-align:center;font:700 14px/1 Manrope,system-ui,sans-serif;color:#fff}
.te-pop .te-size-step{width:40px;min-height:40px;padding:0;font-size:20px;line-height:1}
.te-pop .te-size-reset:disabled{opacity:.45;cursor:default}
.te-pop .te-size{flex-wrap:wrap}
.te-pop .te-percent{display:flex;align-items:center;gap:10px;flex-basis:100%;margin:0}
.te-pop .te-percent span{margin:0;flex:1}
.te-pop .te-size-input{width:100px;min-height:44px}
#te-shell button:disabled{opacity:.45;cursor:wait}
#te-shell .te-retry{border-color:#ff8f86;color:#ffb5af}
.location-contact-btn[data-link-index]{overflow-wrap:anywhere;max-width:100%}
@media(max-width:720px){
  [data-scheme] .location-hero .location-contact{display:block}
  [data-scheme] .location-hero .location-contact-actions{display:flex;flex-wrap:wrap;gap:8px}
  [data-scheme] .location-hero .location-contact-btn{width:auto;flex:0 1 auto;min-height:44px;font-size:13px;line-height:1.35}
}
/* The corner handle keeps its look but is easy to hit with a finger */
.te-handle::after{content:"";position:absolute;inset:-12px}
#te-shell .te-reset{font-weight:700}
@media (max-width:520px){.te-pop .te-size-step{width:48px;min-height:48px}}
