/*
 * Consult prompts: shop-grid card, empty-cart card, announcement link and the welcome panel
 * that rises from the bottom. Only transform and opacity animate. Colours come from tokens.css.
 */

/* Inline consult card in the shop grid (after every 8th product): spans the whole row. */
.tml ul.products li.tml-cs-card{grid-column:1/-1}
.tml-cs-card-in{display:flex;align-items:center;gap:18px;padding:20px 24px;border-radius:var(--tml-r-card);background:var(--tml-leaf);color:var(--tml-paper)}
.tml .tml-cs-card-in h3{margin:0;font:400 22px/1.2 var(--tml-serif);color:inherit}
.tml-cs-card-in p{margin:4px 0 0;font-size:15px;opacity:.85}
.tml-cs-card-in .tml-btn{margin-left:auto;flex:none}
.tml-cs-card-ic{flex:none;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:var(--tml-haldi);color:var(--tml-white)}
.tml-cs-card-ic .tml-i{width:28px;height:28px}
@media (max-width:720px){
	.tml-cs-card-in{flex-wrap:wrap;padding:18px}
	.tml-cs-card-in>div{flex:1 1 60%}
	.tml-cs-card-in .tml-btn{width:100%;margin:0}
}

/* Empty cart: consult suggestion above the "cart is empty" card. */
.tml-cs-empty{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;max-width:480px;margin:12px auto 20px;padding:24px;box-sizing:border-box;text-align:center;border-radius:var(--tml-r-md);background:var(--tml-mint)}
.tml .tml-cs-empty h2{margin:0;font:400 22px/1.2 var(--tml-serif);color:var(--tml-leaf)}
.tml-cs-empty p{margin:6px 0 0;color:var(--tml-soft);font-size:15px}

/* Announcement bar: the consult line is a WhatsApp link. */
.tml .tml-marquee-consult{color:var(--tml-paper);font-weight:700;text-decoration:underline;text-underline-offset:3px}
.tml .tml-marquee-consult:hover{color:var(--tml-haldi)}

/* ---------- Welcome panel (#tml-cp): rises from below on the first page of a visit ----------
 * Glows: one behind the text, one on the phone, one on the doctor, plus a white band along the bottom edge; transparent space stays clear and
 * clicks pass through it. */
.tml-cp{position:fixed;left:0;right:0;bottom:0;z-index:56;pointer-events:none;color:var(--tml-ink);
	transform:translate3d(0,110%,0);transition:transform .7s var(--tml-ease)}
.tml-cp[hidden]{display:none}
.tml-cp.is-on{transform:none}
.tml-cp-in{position:relative;isolation:isolate;display:grid;grid-template-columns:1.3fr .75fr .75fr;align-items:end;gap:24px;max-width:1280px;margin:0 auto;padding:0 64px}
.tml-cp-in>*{pointer-events:auto}
/* A white band along the bottom of the panel, full width, behind all three items. */
.tml-cp::before{content:"";position:absolute;left:0;right:0;bottom:0;height:130px;z-index:-1;pointer-events:none;background:linear-gradient(to top,var(--tml-white) 0%,var(--tml-white) 35%,color-mix(in srgb,var(--tml-white) 60%,transparent) 68%,transparent 100%)}

.tml .tml-cp-x{position:absolute;top:6px;right:-14px;z-index:3;width:40px;height:40px;padding:0;border:1px solid var(--tml-rule);border-radius:50%;display:grid;place-items:center;background:var(--tml-card);color:var(--tml-ink);box-shadow:var(--tml-shadow-float);cursor:pointer;pointer-events:auto}
.tml .tml-cp-x:hover{background:var(--tml-leaf);color:var(--tml-paper);border-color:var(--tml-leaf)}
.tml-cp-x .tml-i{width:18px;height:18px}

/* Text */
.tml-cp-txt{position:relative;z-index:0;isolation:isolate;align-self:end;padding:0 0 16px}
.tml-cp-txt::before{content:"";position:absolute;inset:-105px -165px -70px;z-index:-1;pointer-events:none;border-radius:50%;background:radial-gradient(closest-side,var(--tml-white) 0%,var(--tml-white) 64%,color-mix(in srgb,var(--tml-white) 75%,transparent) 83%,transparent 100%);filter:blur(10px)}
.tml-cp-kick{display:inline-flex;align-items:center;gap:8px;padding:4px 12px;border-radius:var(--tml-r-pill);background:var(--tml-mint);color:var(--tml-leaf);font-size:13px;font-weight:700}
.tml .tml-cp h2{margin:6px 0 4px;font:400 clamp(22px,1.8vw,27px)/1.15 var(--tml-serif);color:var(--tml-leaf)}
.tml .tml-cp h2 .tml-hi{color:var(--tml-kumkum)}
.tml-cp-txt p{margin:0 0 10px;max-width:60ch;font-size:14px;color:var(--tml-soft)}
.tml-cp-act{display:flex;flex-wrap:wrap;align-items:center;gap:10px 20px}
.tml .tml-cp-go,.tml .tml-cp-go:hover{background:var(--tml-whatsapp);color:var(--tml-white);min-height:40px;padding:8px 18px;font-size:14.5px;box-shadow:var(--tml-shadow-float)}
.tml .tml-cp-go:hover{transform:translateY(-2px)}
.tml-cp-go .tml-i{width:20px;height:20px}
.tml .tml-cp-call{display:inline-flex;align-items:center;gap:8px;color:var(--tml-leaf);font-weight:600}
.tml-cp-call .tml-i{width:18px;height:18px}

/* Phone with an example WhatsApp chat; the whole phone is a WhatsApp link.  */
.tml-cp-phone{position:relative;justify-self:center;display:block;width:170px;color:var(--tml-wa-ink);text-decoration:none;transform:rotate(-3deg);transition:transform .4s var(--tml-ease)}
.tml-cp-phone::before{content:"";position:absolute;left:50%;top:45%;width:390px;height:390px;margin:-195px 0 0 -195px;border-radius:50%;background:radial-gradient(closest-side,var(--tml-white) 0%,color-mix(in srgb,var(--tml-white) 85%,transparent) 40%,color-mix(in srgb,var(--tml-white) 35%,transparent) 70%,transparent 100%);filter:blur(10px);z-index:0;pointer-events:none}
.tml-cp-phone:hover{transform:rotate(0) translateY(-6px)}
.tml-cp-frame{z-index:1;display:flex;flex-direction:column;height:220px;border:7px solid var(--tml-ink);border-bottom:0;border-radius:30px 30px 0 0;background:var(--tml-wa-wall);overflow:hidden;position:relative;box-shadow:0 0 0 3px color-mix(in srgb,var(--tml-white) 90%,transparent),0 0 20px 9px var(--tml-white),0 0 54px 22px color-mix(in srgb,var(--tml-white) 80%,transparent)}
.tml-cp-notch{position:absolute;top:5px;left:50%;width:62px;height:14px;margin-left:-31px;border-radius:var(--tml-r-pill);background:var(--tml-ink);z-index:2}
.tml-cp-top{display:flex;align-items:center;gap:8px;padding:22px 10px 6px;background:var(--tml-wa-bar);color:var(--tml-white);font-size:11px}
.tml-cp-top .tml-pa{width:28px;height:28px}
.tml-cp-top .tml-pa .tml-i{width:16px;height:16px}
.tml-cp-who{min-width:0}
.tml-cp-who b{display:block;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tml-cp-who small{opacity:.8}
.tml-cp-wall{flex:1;display:flex;flex-direction:column;gap:6px;padding:8px 7px;font-size:11px;line-height:1.35}
.tml-cp-day{align-self:center;padding:2px 8px;border-radius:7px;background:var(--tml-wa-in);color:var(--tml-wa-meta);font-size:10px}
.tml-cp-msg{display:block;max-width:88%;padding:7px 10px;border-radius:9px;box-shadow:0 1px .5px color-mix(in srgb,var(--tml-black) 13%,transparent)}
.tml-cp-me{align-self:flex-end;background:var(--tml-wa-out);border-bottom-right-radius:3px}
.tml-cp-them{align-self:flex-start;background:var(--tml-wa-in);border-bottom-left-radius:3px}
.tml-cp-typing{display:flex;align-self:flex-start;gap:4px;padding:9px 11px;border-radius:9px;background:var(--tml-wa-in)}
.tml-cp-typing i{width:5px;height:5px;border-radius:50%;background:var(--tml-wa-meta);animation:tml-dot 1s infinite}
.tml-cp-typing i:nth-child(2){animation-delay:.15s}.tml-cp-typing i:nth-child(3){animation-delay:.3s}
.tml-cp-bar{display:none}
.tml-cp-tap{position:absolute;z-index:2;left:50%;top:44%;display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:var(--tml-r-pill);background:var(--tml-whatsapp);color:var(--tml-white);font-size:12px;font-weight:700;white-space:nowrap;box-shadow:var(--tml-shadow-fab);transform:translate(-50%,0) scale(.9);opacity:0;transition:opacity .3s,transform .3s var(--tml-ease)}
.tml-cp-tap .tml-i{width:15px;height:15px}
.tml-cp-phone:hover .tml-cp-tap,.tml-cp-phone:focus-visible .tml-cp-tap{opacity:1;transform:translate(-50%,0) scale(1)}
.tml .tml-cp :focus-visible{outline:2px solid var(--tml-leaf-2);outline-offset:3px}
/* Chat plays once the panel is up: message, typing dots, reply. */
.tml-cp .tml-cp-msg,.tml-cp .tml-cp-typing{opacity:0;transform:translateY(10px)}
.tml-cp.is-on .tml-cp-me{animation:tml-cp-in .45s var(--tml-ease) .9s forwards}
.tml-cp.is-on .tml-cp-typing{animation:tml-cp-in .3s var(--tml-ease) 1.5s forwards,tml-cp-out .2s 2.6s forwards}
.tml-cp.is-on .tml-cp-them{animation:tml-cp-in .45s var(--tml-ease) 2.7s forwards}
@keyframes tml-cp-in{to{opacity:1;transform:none}}
@keyframes tml-cp-out{to{opacity:0;height:0;padding:0;margin-top:-7px}}

/* Doctor: cut-out photo. */
.tml-cp-doc{position:relative;align-self:end;display:grid;justify-items:center}
.tml .tml-cp-doc .tml-cp-photo{position:relative;z-index:1;display:block;width:auto;height:240px;max-width:100%;object-fit:contain;object-position:bottom;filter:drop-shadow(0 0 3px var(--tml-white)) drop-shadow(0 0 16px var(--tml-white)) drop-shadow(0 0 36px var(--tml-white))}
.tml-cp-glow{position:absolute;z-index:0;left:50%;bottom:-60px;width:430px;height:430px;margin-left:-215px;border-radius:50%;background:radial-gradient(closest-side,var(--tml-white) 0%,color-mix(in srgb,var(--tml-white) 85%,transparent) 40%,color-mix(in srgb,var(--tml-white) 35%,transparent) 70%,transparent 100%);filter:blur(10px);pointer-events:none}
.tml-cp-note{position:absolute;right:0;bottom:6px;font-size:10px;color:var(--tml-soft)}
.tml-cp-badge{position:absolute;left:-30px;bottom:26px;display:flex;align-items:center;gap:10px;padding:9px 13px;border-radius:var(--tml-r-md);background:var(--tml-card);color:var(--tml-ink);box-shadow:var(--tml-shadow-float);font-size:12px;line-height:1.2}
.tml-cp-badge b{display:block;font-size:13px}
.tml-cp-badge small{color:var(--tml-soft)}
/* Phone and doctor rise a little after the panel. */
.tml-cp .tml-cp-doc,.tml-cp .tml-cp-phone{opacity:0}
.tml-cp.is-on .tml-cp-phone{animation:tml-cp-pop .7s var(--tml-ease) .25s forwards}
.tml-cp.is-on .tml-cp-doc{animation:tml-cp-pop .7s var(--tml-ease) .4s forwards}
@keyframes tml-cp-pop{from{opacity:0;translate:0 40px}to{opacity:1;translate:0 0}}

@media (max-width:1180px){
	.tml-cp-in{grid-template-columns:1.4fr .8fr .8fr;padding:0 28px;gap:12px}
}
@media (max-width:900px){
	.tml-cp-in{grid-template-columns:1.3fr 1fr}
	.tml-cp-phone{display:none}
}
@media (max-width:640px){
	/* Text and its local glow, then the doctor beside it, then a full-width button row. */
	.tml-cp-in{grid-template-columns:1fr 112px;grid-template-rows:auto;align-items:start;padding:0 16px 14px;gap:0 8px}
	.tml-cp-txt{display:flex;grid-column:1;grid-row:1;flex-direction:column;align-self:start;padding:0 0 16px}
	.tml-cp-kick{align-self:start}
	.tml .tml-cp h2{font-size:21px;margin:8px 0 6px}
	.tml-cp-txt p{font-size:13.5px;margin:0 0 12px}
	.tml-cp-act{gap:8px 16px}
	.tml .tml-cp-go{flex:1 1 100%;font-size:14.5px;min-height:44px;padding:8px 14px}
	.tml-cp-call{font-size:14px}
	.tml-cp-glow{width:360px;height:360px;margin-left:-180px}
	.tml-cp-phone::before{width:330px;height:330px;margin:-165px 0 0 -165px}
	.tml-cp-doc{grid-column:2;grid-row:1;align-self:end;margin-bottom:8px}
	.tml .tml-cp-doc .tml-cp-photo{height:190px}
	.tml-cp-note{right:auto;left:50%;bottom:-6px;transform:translateX(-50%);white-space:nowrap;font-size:9px}
	.tml-cp-badge{display:none}
	.tml .tml-cp-x{right:-6px;top:0;width:36px;height:36px}
}
@media (prefers-reduced-motion:reduce){
	.tml-cp,.tml-cp-phone{transition:none}
	.tml-cp .tml-cp-msg,.tml-cp .tml-cp-doc,.tml-cp .tml-cp-phone{opacity:1;transform:none;animation:none}
	.tml-cp .tml-cp-typing{display:none}
}
