/* EMME Visioncare – coloured contact lens try-on. Scoped to .ecl. Same look as the tint try-on. */
.ecl{margin:0 0 30px;color:#1f2a30;font:inherit}
.ecl *{box-sizing:border-box}
.ecl input[type=file],.ecl [hidden]{display:none!important}
.ecl-box{border:1px solid #d9e2e7;background:#f6f9fa;border-radius:8px;padding:18px 20px}
.ecl-title{margin:0 0 4px;font-size:17px;font-weight:700;color:#002352}
.ecl-intro{margin:0 0 6px;color:#45565f;font-size:14px}
.ecl-priv{margin:0 0 14px;color:#45565f;font-size:12.5px}
.ecl-priv::before{content:"\1F512\00a0"}
.ecl-main{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(340px,1fr);gap:24px;align-items:start}
.ecl-stage{position:relative;width:100%;background:#16232a;border-radius:8px;overflow:hidden;aspect-ratio:4/3;user-select:none;-webkit-user-select:none}
@supports not (aspect-ratio:4/3){.ecl-stage{height:0;padding-top:75%}}
.ecl-stage canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
.ecl-stage video{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.ecl-start{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:16px;text-align:center;color:#fff;background:linear-gradient(160deg,#0f4c5c,#16232a)}
.ecl-start.ecl-hide{display:none}
.ecl-glyph{width:140px;height:58px;margin-bottom:4px}
.ecl-hint{margin:0;font-size:13.5px;opacity:.92;max-width:380px}
.ecl-big{display:inline-flex;align-items:center;justify-content:center;min-height:46px;min-width:200px;padding:0 22px;border-radius:23px;border:0;background:#fff;color:#0f4c5c;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.ecl-big.ecl-alt{background:transparent;color:#fff;border:1.5px solid rgba(255,255,255,.8)}
.ecl-msg{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);background:rgba(0,0,0,.66);color:#fff;font-size:13px;padding:6px 12px;border-radius:16px;max-width:90%;text-align:center;pointer-events:none}
.ecl-msg:empty{display:none}
.ecl-tl{position:absolute;top:10px;right:10px;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.ecl-ic{border:0;border-radius:18px;min-height:36px;padding:0 13px;white-space:nowrap;background:rgba(255,255,255,.94);color:#0f4c5c;font:inherit;font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.ecl-ic[hidden],.ecl-tag[hidden]{display:none}
.ecl-ic[aria-pressed="true"]{background:#0f4c5c;color:#fff}
.ecl-save{position:absolute;right:10px;bottom:10px}
.ecl-tag{position:absolute;left:10px;top:10px;background:rgba(15,76,92,.92);color:#fff;font-weight:700;font-size:14px;letter-spacing:.04em;padding:5px 11px;border-radius:14px}
.ecl-side{display:flex;flex-direction:column;gap:12px;min-width:0}
.ecl-info{background:#fff;border:1px solid #d9e2e7;border-radius:8px;padding:10px 12px;min-height:58px}
.ecl-icode{margin:0;font-size:20px;font-weight:800;color:#0f4c5c;letter-spacing:.05em}
.ecl-idesc{margin:2px 0 0;font-size:13.5px;color:#45565f}
.ecl-row{margin:0 0 8px}
.ecl-lbl{margin:0 0 5px;font-weight:700;color:#0f4c5c;font-size:13px;text-transform:uppercase;letter-spacing:.03em}
.ecl-opts{display:flex;flex-wrap:wrap;gap:6px}
.ecl-opt{font:inherit;font-size:13.5px;line-height:1.2;min-height:36px;padding:6px 12px;border-radius:18px;border:1.5px solid #b9cbd3;background:#fff;color:#1f2a30;cursor:pointer}
.ecl-opt[aria-pressed="true"]{background:#0f4c5c;border-color:#0f4c5c;color:#fff}
.ecl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(68px,1fr));gap:8px;max-height:300px;overflow-y:auto;padding:2px;-webkit-overflow-scrolling:touch}
.ecl-tile{display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px 4px;border-radius:10px;border:1.5px solid #d9e2e7;background:#fff;cursor:pointer;font:inherit}
.ecl-tile img{width:44px;height:44px;display:block;border-radius:50%}
.ecl-tile[aria-pressed="true"]{border-color:#0f4c5c;box-shadow:0 0 0 2px #0f4c5c inset}
.ecl-code{font-size:12px;font-weight:700;color:#0f4c5c;letter-spacing:.03em}
.ecl-none{grid-column:1/-1;margin:6px 0;font-size:13.5px;color:#45565f}
.ecl-acts{display:flex;gap:8px;flex-wrap:wrap;border-top:1px solid #d9e2e7;padding-top:14px}
.ecl-btn{flex:1 1 auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;border-radius:22px;color:#fff!important;text-decoration:none!important;font-weight:600;font-size:14px;white-space:nowrap;background:#0f4c5c}
.ecl-btn.ecl-wa{background:#15803d}
.ecl-btn:hover{opacity:.92}
.ecl-acts:empty{display:none}
.ecl-size{display:flex;align-items:center;gap:10px;margin:8px 0 0;font-size:13px;color:#45565f}
.ecl-size input{flex:1;accent-color:#0f4c5c}
.ecl-note{margin:14px 0 0;font-size:12.5px;color:#45565f}
.ecl-opt:focus-visible,.ecl-ic:focus-visible,.ecl-big:focus-visible,.ecl-btn:focus-visible,.ecl-tile:focus-visible{outline:3px solid #1d5c74;outline-offset:2px}
@media(max-width:860px){.ecl-main{grid-template-columns:1fr;gap:14px}.ecl-box{padding:14px 12px}.ecl-grid{max-height:none}}
@media(max-width:600px){
 /* phones: lens tiles in one swipe row right under the picture, then filters, then buttons */
 .ecl-info{order:1;min-height:0;padding:8px 12px}.ecl-grid{order:2}.ecl-filters{order:3}.ecl-acts{order:4}
 .ecl-grid{display:flex;overflow-x:auto;overflow-y:hidden;max-height:none;gap:8px;padding:2px 2px 8px;scroll-snap-type:x proximity}
 .ecl-tile{flex:0 0 72px;scroll-snap-align:start}
 .ecl-icode{font-size:18px}
 .ecl-tag{top:auto;bottom:10px;font-size:13px}
 .ecl-ic{min-height:32px;padding:0 10px;font-size:12px}
 .ecl-acts{flex-direction:column}
 .ecl-btn{width:100%}
 .ecl-opt{font-size:13px;padding:5px 10px;min-height:34px}
}
/* page text under the tool: space above each heading, small gap below */
#content > h2{margin:34px 0 14px!important}
#content > h2 + ul,#content > h2 + p{margin-top:0}
/* keep space while the script loads, so the page does not jump */
[data-emme-tool="ccl"]:empty{min-height:640px}
@media(max-width:860px){[data-emme-tool="ccl"]:empty{min-height:calc(75vw + 760px)}}

/* turn-sideways message (phones / iPads held upright) */
.ecl-rot{position:fixed;inset:0;z-index:100000;background:rgba(15,40,50,.94);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:24px;text-align:center}
.ecl-rot[hidden]{display:none!important}
.ecl-rot p{margin:0;font-size:16px;line-height:1.45;max-width:300px}
/* sideways on a phone or iPad: full-screen app view, photo left, code + options + colours right */
html.ecl-lock,html.ecl-lock body{overflow:hidden!important}
.ecl.ecl-full{position:fixed;inset:0;z-index:99999;margin:0;background:#fff}
.ecl-full .ecl-box{height:100%;border:0;border-radius:0;padding:max(8px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));display:flex;flex-direction:column}
.ecl-full .ecl-title,.ecl-full .ecl-intro,.ecl-full .ecl-priv,.ecl-full .ecl-note{display:none}
.ecl-full .ecl-main{flex:1;min-height:0;display:grid;grid-template-columns:auto minmax(240px,1fr);gap:12px;align-items:stretch}
.ecl-full .ecl-stage{height:100%;width:auto;max-width:64vw;aspect-ratio:4/3;align-self:stretch}
@supports not (aspect-ratio:4/3){.ecl-full .ecl-stage{width:calc((100vh - 16px) * 4 / 3);padding-top:0}}
.ecl-full .ecl-side{height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch;gap:8px;padding-right:2px}
.ecl-full .ecl-side>*{flex-shrink:0}
.ecl-full .ecl-info{order:-2;min-height:0;padding:6px 10px}
.ecl-full .ecl-icode{font-size:17px}
.ecl-full .ecl-idesc{font-size:12.5px}
.ecl-full .ecl-grid{order:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));max-height:none;overflow:visible;gap:6px;padding:2px}
.ecl-full .ecl-tile{flex:none;padding:5px 2px}
.ecl-full .ecl-tile img{width:38px;height:38px}
.ecl-full .ecl-code{font-size:11px}
.ecl-full .ecl-filters{order:0}
.ecl-full .ecl-row{margin:0 0 5px}
.ecl-full .ecl-lbl{font-size:11px;margin:0 0 3px}
.ecl-full .ecl-opts{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.ecl-full .ecl-opts::-webkit-scrollbar{display:none}
.ecl-full .ecl-opt{flex:0 0 auto;font-size:12.5px;min-height:32px;padding:4px 10px}
.ecl-full .ecl-acts{order:-1;flex-direction:row;padding-top:0;border-top:0;gap:6px}
.ecl-full .ecl-btn{min-height:38px;font-size:13px;padding:0 10px;width:auto}
.ecl-full .ecl-tag{top:auto;bottom:8px}
.ecl-full .ecl-tl{left:auto}
.ecl-close{position:absolute;left:8px;top:8px}
.ecl-close[hidden]{display:none!important}
.ecl-full .ecl-tag{left:8px}

/* full-screen side panel: fixed parts on top, colours fill the rest and scroll on their own */
.ecl-full .ecl-side{overflow:hidden;display:flex;flex-direction:column}
.ecl-full .ecl-grid{flex:1 1 auto;min-height:90px;overflow-y:auto;align-content:start}
.ecl-full .ecl-side>.ecl-grid{flex-shrink:1}
.ecl-full .ecl-row{display:flex;align-items:center;gap:6px;margin:0 0 4px}
.ecl-full .ecl-lbl{flex:0 0 58px;margin:0;font-size:10.5px}
.ecl-full .ecl-opts{flex:1;min-width:0}
.ecl-full .ecl-acts{flex-wrap:nowrap}
.ecl-full .ecl-btn{flex:1 1 0;min-width:0;font-size:12px;min-height:34px;padding:0 6px}
@media (max-height:520px){.ecl-full .ecl-idesc{display:inline;margin-left:8px}.ecl-full .ecl-icode{display:inline}.ecl-full .ecl-info{padding:5px 10px}}
.ecl-sh{display:none}
.ecl-full .ecl-lg{display:none}.ecl-full .ecl-sh{display:inline}

/* side box exactly as tall as the photo (top and bottom aligned); colours scroll inside */
@media(min-width:861px){
 .ecl-main{align-items:stretch}
 .ecl-side{height:0;min-height:100%;overflow:hidden;display:flex;flex-direction:column}
 .ecl-side>*{flex-shrink:0}
 .ecl-side>.ecl-grid{flex:1 1 auto;min-height:0;max-height:none;overflow-y:auto;align-content:start;flex-shrink:1}
 .ecl-acts{margin-top:auto}
}
/* iPad (and large touch screens) full-screen: smaller photo, more room for options and colours */
@media (min-width:1000px){
 .ecl-full .ecl-main{grid-template-columns:auto minmax(360px,1fr);gap:16px}
 .ecl-full .ecl-stage{max-width:56vw}
 .ecl-full .ecl-tile img{width:46px;height:46px}
 .ecl-full .ecl-grid{grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px}
 .ecl-full .ecl-code{font-size:12px}
 .ecl-full .ecl-opt{font-size:14px;min-height:38px;padding:6px 12px}
 .ecl-full .ecl-lbl{font-size:12px;flex-basis:66px}
 .ecl-full .ecl-icode{font-size:20px}
 .ecl-full .ecl-idesc{font-size:14px}
 .ecl-full .ecl-btn{font-size:14px;min-height:42px}
}

/* full-screen: fixed widths instead of aspect-ratio, so Safari keeps the photo the full height (bottoms aligned) */
.ecl-full .ecl-main{grid-template-rows:100%}
.ecl-full .ecl-stage{aspect-ratio:auto!important;height:100%!important;max-height:none;width:min(62vw,calc((100vh - 16px) * 4 / 3));width:min(62vw,calc((100dvh - 16px) * 4 / 3));max-width:none;align-self:stretch;padding-top:0}
.ecl-full .ecl-side{height:100%;min-height:0;align-self:stretch}
@media (min-width:1000px){.ecl-full .ecl-stage{width:56vw}}

/* desktop: each filter is one line (swipe/scroll sideways), so more lens colours fit in the box */
@media(min-width:861px){
 .ecl:not(.ecl-full) .ecl-row{display:flex;align-items:center;gap:8px;margin:0 0 6px}
 .ecl:not(.ecl-full) .ecl-lbl{flex:0 0 62px;margin:0;font-size:11.5px}
 .ecl:not(.ecl-full) .ecl-opts{flex:1;min-width:0;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:thin;padding-bottom:3px}
 .ecl:not(.ecl-full) .ecl-opt{flex:0 0 auto;min-height:32px;padding:4px 11px;font-size:13px}
}
/* expand button beside "Save picture": full-screen view of the photo, pinch / double-tap to zoom (same as the tinted lens tool) */
.ecl-exp{position:absolute;right:10px;bottom:10px;z-index:2;width:36px;padding:0!important;display:inline-flex;align-items:center;justify-content:center}
.ecl-exp[hidden]{display:none!important}
.ecl-stage .ecl-save{right:54px}
.ecl-kiosk .ecl-exp{width:48px}
.ecl-kiosk .ecl-stage .ecl-save{right:66px}
.ecl-bigview .ecl-stage{position:fixed!important;inset:0!important;z-index:2147483600!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;padding-top:0!important;aspect-ratio:auto!important;border-radius:0!important;background:#000!important}
.ecl-bigview .ecl-stage canvas{object-fit:contain;cursor:zoom-in}
.ecl-bigview .ecl-close,.ecl-bigview .ecl-save,.ecl-bigview .ecl-msg,.ecl-bigview .ecl-tag,.ecl-bigview .ecl-tl{display:none!important}
html.ecl-lock2,html.ecl-lock2 body{overflow:hidden!important}
