/* Timeline Media Bubble and Cards (31 October): see atelier-media-bubble.js. */

/* The bubble: white in both themes, rounded, its point down to the dot through a thin white stem. */
#tlmb-bubble{position:fixed;z-index:26;filter:drop-shadow(0 6px 12px rgba(31,30,29,.16));color:#242423;font-family:inherit;font-size:14px;line-height:1.3;color-scheme:light}
#tlmb-bubble .tlmb-box{position:absolute;inset:0;background:#fff;border:1px solid #e3e2dd;border-radius:14px;display:grid;grid-template-columns:var(--tlmb-pad,40px) minmax(0,1fr) var(--tlmb-pad,40px);grid-template-rows:var(--tlmb-top,16px) minmax(0,1fr) 44px}
#tlmb-bubble .tlmb-tip{position:absolute;bottom:-16px;left:calc(var(--tlmb-tip,50%) - 12px);width:24px;height:17px;overflow:visible}
.tlmb-stem{position:fixed;z-index:25;width:2px;background:#fff;border-radius:1px;box-shadow:0 0 0 1px rgba(31,30,29,.14);pointer-events:none}
#tlmb-bubble svg{display:block}
#tlmb-bubble .tlmb-media{grid-column:2;grid-row:2;position:relative;border-radius:6px;overflow:hidden;background:#f4f3ef;min-height:0}
/* The arrows sit in the white margins, never on the media. */
#tlmb-bubble .tlmb-arrow{grid-row:2;align-self:center;justify-self:center;width:28px;height:28px;min-height:0;padding:0;margin:0;border:0!important;border-radius:8px;background:transparent!important;color:#3a3937!important;display:grid;place-items:center;opacity:1}
#tlmb-bubble .tlmb-arrow:hover:not(:disabled){background:#f2f1ec!important}
#tlmb-bubble .tlmb-arrow:disabled{color:#c9c7c0!important;cursor:default}
#tlmb-bubble .tlmb-prev{grid-column:1}
#tlmb-bubble .tlmb-next{grid-column:3}
#tlmb-bubble .tlmb-arrow svg,#tlmb-bubble .tlmb-open svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
#tlmb-bubble .tlmb-open svg{stroke-width:1.8}
/* A map's open icon: the right margin, at the top, off the map. */
#tlmb-bubble .tlmb-open{grid-column:3;grid-row:2;align-self:start;justify-self:center;width:28px;height:28px;border-radius:8px;display:grid;place-items:center;color:#3a3937;text-decoration:none}
#tlmb-bubble .tlmb-open:hover{background:#f2f1ec}
#tlmb-bubble .tlmb-foot{grid-column:2;grid-row:3;display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
#tlmb-bubble .tlmb-name{display:flex;align-items:baseline;gap:8px;min-width:0;white-space:nowrap;overflow:hidden}
#tlmb-bubble .tlmb-name b{font-weight:600;font-size:14px;color:#242423;overflow:hidden;text-overflow:ellipsis;min-width:0}
#tlmb-bubble .tlmb-name time{font-size:13px;color:#6b6a66;flex:none}
#tlmb-bubble .tlmb-dots{display:flex;gap:6px;flex:none}
#tlmb-bubble .tlmb-dots i{width:8px;height:8px;border-radius:50%;background:#d6d4cd}
#tlmb-bubble .tlmb-dots i.on{background:#23866f}

/* What sits in the box. */
#tlmb-bubble .tlmb-media img{display:block;width:100%;height:100%;object-fit:contain}
#tlmb-bubble .tlmb-media video,#tlmb-bubble .tlmb-media iframe{display:block;width:100%;height:100%;border:0;background:#f4f3ef}
#tlmb-bubble .tlmb-wait{height:100%;display:grid;place-items:center;align-content:center;gap:6px;padding:12px;text-align:center;color:#6b6a66;font-size:12px}
#tlmb-bubble .tlmb-wait svg{width:28px;height:28px;fill:none;stroke:#9b9993;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
#tlmb-bubble .tlmb-poster{position:relative;height:100%;display:grid;place-items:center;align-content:center;gap:8px;background:#eef4f1}
#tlmb-bubble .tlmb-poster img{position:absolute;inset:0;object-fit:cover}
#tlmb-bubble .tlmb-play{position:relative;width:44px;height:44px;min-height:0;padding:0;margin:0;border:0!important;border-radius:50%;background:transparent!important;filter:drop-shadow(0 0 0 #fff) drop-shadow(0 1px 3px rgba(31,30,29,.18))}
#tlmb-bubble .tlmb-play svg{width:44px;height:44px}
#tlmb-bubble .tlmb-play:focus-visible{outline:2px solid #23866f;outline-offset:2px}
#tlmb-bubble .tlmb-cap{position:relative;max-width:92%;font-size:13px;font-weight:500;color:#3a3937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tlmb-bubble .tlmb-voice{height:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:0 14px;background:#f2f8f5}
#tlmb-bubble .tlmb-voice audio{display:none}
#tlmb-bubble .tlmb-bars{display:flex;align-items:center;gap:3px;height:56%;min-width:0}
#tlmb-bubble .tlmb-bars i{flex:1 1 0;max-width:5px;min-width:2px;border-radius:2px;background:#b9d9cd}
#tlmb-bubble .tlmb-bars i.on{background:#23866f}
#tlmb-bubble .tlmb-time{min-width:30px;font-size:12px;color:#6b6a66;text-align:right}
#tlmb-bubble .tlmb-file,#tlmb-bubble .tlmb-web,#tlmb-bubble .tlmb-stones{height:100%;display:grid;place-items:center;align-content:center;gap:8px;padding:10px;text-decoration:none;color:#3a3937}
#tlmb-bubble .tlmb-file svg{height:min(110px,62%);width:auto;filter:drop-shadow(0 2px 4px rgba(31,30,29,.08))}
#tlmb-bubble .tlmb-web{background:#f2f8f5}
#tlmb-bubble .tlmb-web svg{width:34px;height:34px;fill:none;stroke:#23866f;stroke-width:1.6}
#tlmb-bubble .tlmb-web b{font-size:14px;font-weight:600;max-width:92%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#tlmb-bubble .tlmb-stones{padding:0;gap:0;grid-template-rows:minmax(0,1fr) auto;background:#e9dfcf}
#tlmb-bubble .tlmb-stones svg{width:100%;height:100%}
#tlmb-bubble .tlmb-stones .tlmb-cap{padding:4px 0 8px}
#tlmb-bubble .tlmb-drawn-map{position:relative;display:block;height:100%;text-decoration:none}
#tlmb-bubble .tlmb-drawn-map svg{position:absolute;inset:0;width:100%;height:100%}
#tlmb-bubble .tlmb-drawn-map .tlmb-cap{position:absolute;left:8px;bottom:8px;padding:3px 8px;border-radius:6px;background:rgba(255,255,255,.92)}

/* The cards below the line (heart on): one sideways row, as in Timelines For Writers. */
body.tlmb-cards-on #feeling-graphs,body.tlmb-cards-on #media-preview-panel,body.tlmb-cards-on #density-detail{display:none!important}
#tlmb-cards{position:absolute;left:0;right:0;z-index:3;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
  -webkit-mask-image:linear-gradient(to right,transparent 0,#000 28px,#000 calc(100% - 28px),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 28px,#000 calc(100% - 28px),transparent 100%)}
#tlmb-cards::-webkit-scrollbar{display:none}
#tlmb-cards .tlmb-rail{display:flex;gap:12px;height:100%;padding:6px 50%;width:max-content;box-sizing:border-box}
#tlmb-cards .tlmb-card{width:232px;height:108px;flex:none;box-sizing:border-box;padding:11px 14px 10px;border:1px solid #e3e2dd;border-radius:12px;background:#fff;color:#242423;display:grid;grid-template-rows:auto 5px minmax(0,1fr);gap:8px;cursor:pointer;text-align:left;transition:border-color .2s,box-shadow .2s}
#tlmb-cards .tlmb-card.draft{border-style:dashed}
#tlmb-cards .tlmb-card.sel{border-color:#23866f;box-shadow:0 0 0 1px #23866f}
#tlmb-cards .tlmb-card.hint:not(.sel){border-color:#91d9c1;box-shadow:0 0 0 1px #91d9c1}
#tlmb-cards .tlmb-card:focus-visible{outline:2px solid #91d9c1;outline-offset:2px}
#tlmb-cards .tlmb-card-t{font-size:14px;font-weight:700;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tlmb-cards .tlmb-card-bar{display:block;border-radius:3px}
#tlmb-cards .tlmb-card-bt{display:flex;align-items:flex-end;gap:8px;min-width:0;min-height:0}
#tlmb-cards .tlmb-card-w{flex:1;min-width:0;font-size:13px;line-height:1.3;color:#6b6a66;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#tlmb-cards .tlmb-card-end{display:flex;align-items:center;gap:6px;flex:none;color:#23866f}
#tlmb-cards .tlmb-feel{display:block;width:10px;height:10px;border-radius:50%}
#tlmb-cards .tlmb-card-media{display:flex;align-items:center;gap:3px}
#tlmb-cards .tlmb-card-media svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#tlmb-cards .tlmb-card-media b{font-size:13px;font-weight:600}
/* The dashed aqua link from the line to the selected card. */
#tlmb-link{position:absolute;z-index:3;width:2px;pointer-events:none;background:repeating-linear-gradient(to bottom,#23866f 0 3px,transparent 3px 7px)}

/* Dark mode: the cards turn dark (the bubble stays white). On a painting the timeline space stays light, so do they. */
html[data-theme="dark"] body:not(.tlbg-light) #tlmb-cards .tlmb-card{background:#22292b;border-color:#3a4346;color:var(--ink,#f3eee6)}
html[data-theme="dark"] body:not(.tlbg-light) #tlmb-cards .tlmb-card-w{color:var(--muted,#b8b5ae)}
html[data-theme="dark"] body:not(.tlbg-light) #tlmb-cards .tlmb-card-end{color:#91d9c1}
html[data-theme="dark"] body:not(.tlbg-light) #tlmb-cards .tlmb-card.sel{border-color:#91d9c1;box-shadow:0 0 0 1px #91d9c1}
html[data-theme="dark"] body:not(.tlbg-light) #tlmb-link{background:repeating-linear-gradient(to bottom,#91d9c1 0 3px,transparent 3px 7px)}

/* The phone timeline, the viewer, the home page demo and Session Review keep what they have. */
:is(html.soyl-phone-tl,html.soyl-viewer,html.soyl-demo,html.soyl-review) :is(#tlmb-bubble,.tlmb-stem,#tlmb-cards,#tlmb-link){display:none!important}
