/* Timeline Painted Place (31 October): see atelier-painted-place.js. */

/* The painting fills the timeline space above the line, edge to edge, under a soft white veil, fading into the page
   at the top and both sides. */
#main .canvas-area.tlbg-on{position:relative;isolation:isolate}
/* The Full View button sits in the timeline space even with no painting (it fell onto the header's Settings and bin, 31 October). */
#main .canvas-area:has(> #fv-btn){position:relative}
#main .canvas-area.tlbg-on::before{content:"";position:absolute;left:0;right:0;top:0;height:var(--tlbg-h,70%);z-index:-1;pointer-events:none;
  background:linear-gradient(rgba(255,255,255,var(--tlbg-veil1,.62)),rgba(255,255,255,var(--tlbg-veil2,.4)) 80%,rgba(255,255,255,var(--tlbg-veil1,.62))),var(--tlbg-url) 50% 70%/cover no-repeat;
  -webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 40px),linear-gradient(to right,transparent 0,#000 32px,#000 calc(100% - 32px),transparent 100%);
  -webkit-mask-composite:source-in;mask-image:linear-gradient(to bottom,transparent 0,#000 40px),linear-gradient(to right,transparent 0,#000 32px,#000 calc(100% - 32px),transparent 100%);mask-composite:intersect}
#main .canvas-area.tlbg-on .timeline-wrap,#main .canvas-area.tlbg-on .canvas-workspace{background:transparent}
/* Moment names get a soft halo in the page's colour; dots and period bars a thin ring of it. */
#main .canvas-area.tlbg-on{--tlbg-halo:rgba(250,249,245,.92)}
#main .canvas-area.tlbg-on #timeline .event text,#main .canvas-area.tlbg-on #timeline .tick-label,#main .canvas-area.tlbg-on #timeline text{paint-order:stroke;stroke:var(--tlbg-halo);stroke-width:7px;stroke-linejoin:round}
#main .canvas-area.tlbg-on #timeline circle.disc{stroke:var(--tlbg-halo);stroke-width:4px;paint-order:stroke}
#main .canvas-area.tlbg-on #timeline g.event rect[fill^="url"]{stroke:var(--tlbg-halo);stroke-width:2px;paint-order:stroke}

/* With a picture on, the timeline space stays light even in dark mode; the header and the side panel stay dark. */
html[data-theme="dark"] #main .canvas-area.tlbg-on{--paper:#fafaf7;--ink:#242423;--muted:#6b6b67;--line:#deded9;--accent:#bc664a;color-scheme:light;color:var(--ink);background:#fafaf7}
html[data-theme="dark"] #main .canvas-area.tlbg-on button:not(.mood-cell):not(.mood-neighbor):not(.mood-word-chip):not([data-mood-quadrant]):not(.body-chip):not(#fv-btn){color:var(--ink);border-color:var(--line);background-color:rgba(255,255,255,.85)}
html[data-theme="dark"] #main .canvas-area.tlbg-on button:not(#fv-btn):hover{background-color:#eeeee9}
html[data-theme="dark"] #main .canvas-area.tlbg-on #timeline .draft-ring:not(rect){fill:#fafaf7}
html[data-theme="dark"] #main .canvas-area.tlbg-on #timeline pattern[id^="future-"] path{stroke:#242423;stroke-opacity:.12}
html[data-theme="dark"] #main .canvas-area.tlbg-on #timeline .event.is-selected .event-title-label text{fill:#bc664a}

/* Full View: a small button at the top right of the timeline space. */
#fv-btn{position:absolute;top:24px;right:38px;z-index:9;width:40px;height:40px;min-height:0;padding:0;border-radius:8px;border:1px solid var(--line,#deded9);background:rgba(255,255,255,.85);color:var(--ink,#242423);display:grid;place-items:center}
#fv-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#fv-btn:hover{background:#eeeee9}
#fv-btn.on,#fv-btn.on:hover{background:#e3f5ef;border-color:#23866f;color:#23866f}
html[data-theme="dark"] #main .canvas-area:not(.tlbg-on) #fv-btn{background:#252c2e;border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] #main .canvas-area:not(.tlbg-on) #fv-btn.on{background:rgba(145,217,193,.16);border-color:#91d9c1;color:#91d9c1}
html.soyl-phone-tl #fv-btn,html.soyl-viewer #fv-btn{display:none}
/* The top row of the timeline space (density bar, thread chips) stops short of the button, so nothing sits under it
   (DE, 31 October). */
#main .canvas-area:has(> #fv-btn) .timeline-density-controls{margin-right:78px}
/* The open search's header icon in dark mode: the aqua tint of the other on states, not a peach fill (DE, 31 October). */
html[data-theme="dark"] body header.atelier-brand-header .header-actions #search-events:is(.search-retained,.primary){background:rgba(145,217,193,.16)!important;border:1px solid #91d9c1!important;color:#91d9c1!important}
/* It hides the side panel and editor, and the previews below the line; the whole page is the timeline. */
body.tl-full-view #main{grid-template-columns:minmax(0,1fr)!important}
body.tl-full-view #main>:not(.canvas-area){display:none!important}
body.tl-full-view #feeling-graphs,body.tl-full-view #density-detail,body.tl-full-view #media-preview-panel{display:none!important}

/* A Places moment's editor row: the place, Paint / Paint Again, Paint From My Photo, Remove The Painting. */
#eventForm .pp-row{display:grid;grid-template-columns:minmax(0,1fr) auto 44px 44px;gap:8px;align-items:center;margin:10px 0}
#eventForm .pp-row svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
#eventForm .pp-place{display:flex;align-items:center;gap:8px;height:44px;min-width:0;margin:0;padding:0 10px;border:1.5px solid #91d9c1;border-radius:8px;background:#fff;color:var(--ink);font-size:15px}
#eventForm .pp-place input{flex:1;min-width:0;height:100%;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;outline:none;font:inherit;color:inherit}
#eventForm .pp-paint{display:flex;align-items:center;gap:6px;height:44px;padding:0 12px;border:1px solid #91d9c1;border-radius:8px;background:rgba(145,217,193,.32);color:var(--ink,#242423);cursor:pointer;font:600 14px system-ui,sans-serif;white-space:nowrap}
#eventForm .pp-paint small{font-size:12px;font-weight:400;opacity:.75}
#eventForm .pp-paint:disabled{opacity:.55}
#eventForm .pp-icon{display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--ink);cursor:pointer}
#eventForm .pp-icon svg{width:20px;height:20px}
#eventForm .pp-icon[aria-disabled="true"]{opacity:.45;cursor:default}
#eventForm .pp-remove{grid-column:4}
html[data-theme="dark"] #eventForm .pp-place{background:transparent;color:#efe9e2}
html[data-theme="dark"] #eventForm .pp-paint{color:#f3eee6!important;border-color:#91d9c1!important;background:rgba(145,217,193,.32)!important}
html[data-theme="dark"] #eventForm .pp-icon{color:#efe9e2;border-color:#3d4648;background:transparent!important}
/* The Threads field leaves Basics where the place row comes in (threads have their own panel, MU "A Painting For Each
   Place Moment"), so a Places moment's editor still fits one screen. */
#eventForm:has(#pp-row) #thread-field{display:none}

/* Timelines panel: the picture button beside each colour, and its two rows (MU "Painted From A Place"). */
.timeline-item .tl-icon.tl-pic{overflow:hidden}
.timeline-item .tl-icon.tl-pic.has-pic{padding:0}
.timeline-item .tl-icon.tl-pic img{width:100%;height:100%;object-fit:cover;display:block}
.timeline-item .tl-icon.tl-pic.open{outline:2px solid #91d9c1;outline-offset:1px}
#timeline-list>.timeline-item.pic-open{max-height:none}
.tl-pic-rows svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tl-place-row{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:10px;padding:10px 0 0;align-items:center}
.tl-place-row .tl-place{display:flex;align-items:center;gap:10px;height:44px;margin:0;padding:0 12px;border:1.5px solid #91d9c1;border-radius:8px;background:#fff;color:var(--ink);font-size:15px;min-width:0}
.tl-place-row .tl-place input{flex:1;min-width:0;height:100%;border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;outline:none;font:inherit;color:inherit}
.tl-place-row .tl-paint{display:flex;align-items:center;gap:8px;height:44px;padding:0 14px;border:1px solid #91d9c1;border-radius:8px;background:rgba(145,217,193,.32);color:var(--ink,#242423);cursor:pointer;font:600 15px system-ui,sans-serif;white-space:nowrap}
.tl-place-row .tl-paint small{font-size:12px;font-weight:400;opacity:.75}
.tl-place-row .tl-paint:disabled{opacity:.55}
.tl-pic-row{display:grid;grid-template-columns:112px minmax(0,1fr) 40px;gap:10px;align-items:center;padding:10px 0 2px}
.tl-pic-row .tl-thumb{height:56px;border-radius:10px;border:2px solid #23866f;background:#fff center/cover no-repeat;position:relative}
.tl-pic-row .tl-thumb i{position:absolute;right:-6px;top:-6px;width:20px;height:20px;border-radius:50%;background:#91d9c1;display:grid;place-items:center}
.tl-pic-row .tl-thumb i svg{width:12px;height:12px;stroke:#1f3d35;stroke-width:2.4}
.tl-place-row .tl-own{height:44px;margin:0;border-radius:10px;border:1px solid var(--line);display:grid;place-items:center;color:var(--ink);background:transparent;cursor:pointer}
.tl-pic-row .tl-strength{display:flex;align-items:center;gap:8px;margin:0;color:var(--ink);min-width:0}
.tl-pic-row .tl-strength input{flex:1;min-width:0;-webkit-appearance:none;appearance:none;height:8px!important;min-height:0!important;padding:0!important;border:0!important;box-shadow:none!important;border-radius:4px;margin:0;background:linear-gradient(90deg,#91d9c1 0 var(--v,50%),var(--line) var(--v,50%) 100%)}
.tl-pic-row .tl-strength input::-webkit-slider-thumb{-webkit-appearance:none;width:20px;height:20px;border-radius:50%;background:#91d9c1;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.tl-pic-row .tl-strength input::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:#91d9c1;border:2px solid #fff}
.tl-pic-row .tl-bin{width:40px;height:40px;min-height:0;padding:0;border-radius:8px;border:1px solid var(--line);display:grid;place-items:center;color:var(--ink);background:transparent}
html[data-theme="dark"] .tl-place-row .tl-place{background:transparent;color:#efe9e2}
html[data-theme="dark"] .tl-place-row .tl-paint{color:#f3eee6!important;border-color:#91d9c1!important;background:rgba(145,217,193,.32)!important}
html[data-theme="dark"] .tl-pic-row .tl-thumb{border-color:#91d9c1}
html[data-theme="dark"] .tl-place-row .tl-own,html[data-theme="dark"] .tl-pic-row .tl-bin{color:#efe9e2;border-color:#3d4648;background:transparent!important}
html[data-theme="dark"] .tl-pic-row .tl-strength{color:#efe9e2}
html[data-theme="dark"] .tl-pic-row .tl-strength input::-webkit-slider-thumb{border-color:#1f2427}

/* The rest of the Timelines panel, from DE's review of the build (31 October; Nicolas's ULK on the panel). */
#new-timeline label[for="timeline-name"]{display:none}
#timeline-list .timeline-item .timeline-delete-button[data-timeline-delete]{display:grid;place-items:center;background:transparent!important;border:1px solid #d06f56!important;color:#d06f56!important}
#timeline-list .timeline-item .timeline-delete-button[data-timeline-delete]:hover:not(:disabled){background:rgba(208,111,86,.1)!important}
#timeline-list .timeline-item .timeline-delete-button[data-timeline-delete]:disabled{opacity:.4}
#timeline-list .timeline-item .timeline-delete-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#timeline-list .timeline-item .tl-only.on[aria-pressed=true]{background-color:#e3f5ef!important;border-color:#23866f!important;color:#23866f!important}
html[data-theme="dark"] #timeline-list .timeline-item .tl-only.on[aria-pressed=true]{background-color:rgba(145,217,193,.16)!important;border-color:#91d9c1!important;color:#91d9c1!important}
html[data-theme="dark"] .tl-filter-bar span{color:#b8b5ae}
html[data-theme="dark"] body header.atelier-brand-header .header-actions #manage-timelines.primary{background:rgba(145,217,193,.16)!important;border:1px solid #91d9c1!important;color:#91d9c1!important}
.tl-pic-row .tl-bin,html[data-theme="dark"] .tl-pic-row .tl-bin{color:#d06f56;border-color:#d06f56;background:transparent!important}
.tl-pic-row .tl-bin:hover{background:rgba(208,111,86,.1)!important}
/* Paint is the green button of its row (Nicolas, 31 October: "a green light"): aqua tint with a border at rest, filled on hover
   (DE: Submit stays the one filled button of the editor); greyed only while it cannot paint. */
#eventForm .pp-paint:not(:disabled):hover,.tl-place-row .tl-paint:not(:disabled):hover,html[data-theme="dark"] #eventForm .pp-paint:not(:disabled):hover,html[data-theme="dark"] .tl-place-row .tl-paint:not(:disabled):hover{background:#91d9c1!important;color:#1f1e1d!important}
#eventForm .pp-paint:disabled,.tl-place-row .tl-paint:disabled{background:transparent!important;color:var(--muted,#6f6f68)!important;border-color:var(--line,#deded9)!important;opacity:1}
#eventForm .pp-row:not(:has(.pp-remove)){grid-template-columns:minmax(0,1fr) auto 44px}
#eventForm .pp-paint.is-painting,.tl-place-row .tl-paint.is-painting{background:#91d9c1!important;color:#1f1e1d!important;border-color:#91d9c1!important}

/* Paint Atmosphere (Nicolas, 2 November; MU /mnt/project-files/Timeline/atmosphere/, DE-reviewed): the four states under
   the Paint row, a swatch and its word, the picked one in the aqua tint. */
.pp-atmo[hidden]{display:none}
.pp-atmo{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:-4px 0 4px}
.pp-atmo button{display:flex;align-items:center;justify-content:center;gap:6px;height:36px;min-height:0;padding:0 4px;border:1px solid var(--line,#e2ddd3);border-radius:8px;background:var(--paper,#fffdf8);color:var(--ink,#242423);font:500 12px system-ui,sans-serif;cursor:pointer}
.pp-atmo button i{flex:none;width:16px;height:16px;border-radius:50%;display:block;box-shadow:inset 0 0 0 1px rgba(0,0,0,.08)}
.pp-atmo button.on{background:rgba(145,217,193,.32);border-color:#91d9c1;font-weight:600}
.pp-atmo button:disabled{opacity:.55;cursor:default}
html[data-theme="dark"] .pp-atmo button.on{background:rgba(145,217,193,.32)!important;border-color:#91d9c1!important;color:#f3eee6!important}
html[data-theme="dark"] .pp-atmo button i{box-shadow:0 0 0 1px rgba(243,238,230,.45)}
/* The versions over the painting, top left (the painted space stays light in dark mode too). */
#pp-versions{position:absolute;left:16px;top:16px;z-index:5;display:flex;gap:10px;max-width:calc(100% - 96px);overflow-x:auto;scrollbar-width:none;padding:8px 10px;border-radius:10px;background:rgba(255,253,248,.88);border:1px solid #e2ddd3}
#pp-versions button,html[data-theme="dark"] #main .canvas-area.tlbg-on #pp-versions button{flex:none;display:flex;flex-direction:column;align-items:center;gap:2px;min-height:0;padding:0;border:0;background:none;color:#242423;font:500 12px system-ui,sans-serif;cursor:pointer}
#pp-versions img{width:56px;height:32px;object-fit:cover;border-radius:5px;border:2px solid transparent;display:block}
#pp-versions button.on img{border-color:#91d9c1}
#pp-versions small{font-size:12px;opacity:.7;font-weight:400}
body.tl-full-view #pp-versions{display:none}

/* Phones (Nicolas, 7 November): the finished painting full screen, at the screen's full height and panned sideways
   from its middle, with Re-Paint and Accept along the bottom (main buttons at the bottom, full width). */
#pp-big{position:fixed;inset:0;z-index:2147481000;background:#faf9f5;display:flex;flex-direction:column}
/* A swipe past the painting's end stays in the painting, never the browser's Back (Polish P4, 8 November). */
#pp-big .pp-big-pic{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
#pp-big .pp-big-pic::-webkit-scrollbar{display:none}
#pp-big .pp-big-pic img{display:block;height:100%;width:auto;max-width:none}
#pp-big.is-painting .pp-big-pic img{opacity:.55;transition:opacity .3s}
#pp-big .pp-big-bar{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))}
#pp-big .pp-big-bar>*{display:flex;align-items:center;justify-content:center;gap:8px;height:52px;min-height:0;margin:0;padding:0 12px;border-radius:10px;font:600 15px system-ui,sans-serif;white-space:nowrap;cursor:pointer}
#pp-big .pp-big-bar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
#pp-big .pp-big-bar small{font-size:12px;font-weight:400;opacity:.75}
#pp-big .pp-big-again{border:1px solid #91d9c1;background:rgba(145,217,193,.32);color:#242423}
#pp-big .pp-big-again:is(:disabled,[aria-disabled="true"]){background:transparent;border-color:#deded9;color:#6f6f68;cursor:default;opacity:1}
#pp-big.is-painting .pp-big-again{background:#91d9c1;border-color:#91d9c1;color:#1f1e1d}
#pp-big .pp-big-ok{border:1px solid #91d9c1;background:#91d9c1;color:#1f1e1d}
html[data-theme="dark"] #pp-big{background:#1f1e1d}
html[data-theme="dark"] #pp-big .pp-big-again{color:#f3eee6;border-color:#91d9c1;background:rgba(145,217,193,.32)}
html[data-theme="dark"] #pp-big .pp-big-again:is(:disabled,[aria-disabled="true"]){background:transparent;border-color:#3d4648;color:#9a968f}
html[data-theme="dark"] #pp-big.is-painting .pp-big-again,html[data-theme="dark"] #pp-big .pp-big-ok{background:#91d9c1;border-color:#91d9c1;color:#1f1e1d}
/* A message (a failed Re-Paint) shows over the painting, at the top, clear of Re-Paint and Accept (Polish P5, 8 November). */
body:has(#pp-big) #toast{z-index:2147481100;top:calc(20px + env(safe-area-inset-top,0px));bottom:auto}
/* The small painting that takes the pin's place in the Paint row on a phone, and opens it full screen. */
#eventForm .pp-place .pp-thumb{flex:none;width:30px;height:20px;min-height:0;margin:0;padding:0;border:1px solid #91d9c1;border-radius:4px;background:#fff center/cover no-repeat;cursor:pointer}
html.soyl-phone-tl .tl-pic-row .tl-thumb{cursor:pointer}
