/* The call's right panel, the same on the TA call and the client call (Nicolas, 21 October: "TAR and Chat must
   coordinate with Design Review to design the same panel, to present the cards, in the bottom half of the right panel,
   in cards, and questions and notes on the top half"). Spec: design/call-panel-events-spec.md. Owned by Chat; the TA
   call (Therapist/index.html) links this file and uses the same classes, so neither side keeps its own copy.

   Markup:
     .ce-halves                       the panel: two boxes, half each
       .ce-box.ce-top > .ce-h + ...   questions (+ TA notes), input at its foot
       .ce-box.ce-bottom > .ce-h + .ce-list > .ce-card[data-state=added|waiting|aside]
         .ce-card > .ce-r1 (TA: .ce-tick) .ce-state (TA: .ce-send) | .ce-title | .ce-meta
       .ce-box.ce-bottom > .ce-open > .ce-r1 (.ce-back + .ce-state) | .ce-otitle | .ce-meta | .ce-quote | .ce-acts
     Video frame top bar, after the other person's name: .ce-fw.q-red|q-blue|q-green|q-yellow|body (this session's feelings, newest last).
     No emotion words in the event cards (Nicolas, 21 October 20:12Z). */
.ce-halves{display:flex;flex-direction:column;gap:12px;height:100%;min-height:0}
.ce-halves>.ce-box,.ce-box{flex:0 0 calc(50% - 6px);min-height:0;display:flex;flex-direction:column;border:1px solid #e4ddd3;border-radius:12px;padding:12px 14px;background:#fffdf9;overflow:hidden}
.ce-box:only-child{flex:1 1 auto}
.ce-h{flex:none;margin:0 0 10px!important;padding:0 0 8px;border-bottom:1px solid #eee6db;font:700 14px "Nunito Sans",sans-serif!important;letter-spacing:0!important;text-transform:none!important;color:#2b2724}
.ce-list{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:auto;scrollbar-width:none}
.ce-list::-webkit-scrollbar,.ce-open::-webkit-scrollbar{display:none}

/* One event per row, full width. Cards never shrink, so many events scroll instead of squashing together. */
.ce-card{--ce:#c9563d;flex:0 0 auto;display:flex;flex-direction:column;align-items:stretch;gap:3px;width:100%;height:auto!important;min-height:0!important;margin:0;padding:10px 12px 10px 14px;border:0!important;border-left:4px solid var(--ce)!important;border-radius:8px;background:#f8f3ec!important;color:#2b2724!important;text-align:left;font:inherit;cursor:pointer;box-shadow:none}
.ce-card[data-state=added]{--ce:#4f9a4d}.ce-card[data-state=aside]{--ce:#9a948c}
.ce-card:hover{background:#f2ebe1!important}
.ce-r1{display:flex;align-items:center;gap:8px;min-height:20px}
.ce-state{flex:1;min-width:0;font:700 12px/1.3 "Nunito Sans",sans-serif;font-style:normal;color:var(--ce)}
.ce-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font:700 15px/1.3 "Nunito Sans",sans-serif;overflow-wrap:anywhere}
.ce-meta{font:13px/1.35 "Nunito Sans",sans-serif;color:#7a736b}
/* TA only: the tick and Send on the first row; Send is quiet until ticked. */
.ce-tick{flex:none;width:18px;height:18px;margin:0;accent-color:#4f9a4d;cursor:pointer}
.ce-send{flex:none;height:28px!important;min-height:0!important;padding:0 12px!important;border:1px solid #d6cbbd!important;border-radius:7px!important;background:#fff!important;color:#6f6862!important;font:800 12px "Nunito Sans",sans-serif!important;cursor:pointer}
.ce-send.ready{border-color:#91d9c1!important;background:#91d9c1!important;color:#16352c!important}

/* The opened event, inside the bottom half; the questions stay on top. */
.ce-open{--ce:#c9563d;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:8px;overflow:auto;scrollbar-width:none}
.ce-open[data-state=added]{--ce:#4f9a4d}.ce-open[data-state=aside]{--ce:#9a948c}
.ce-back{flex:none;height:auto!important;min-height:0!important;padding:0!important;border:0!important;background:none!important;color:#3d6f60!important;font:700 13px "Nunito Sans",sans-serif!important;cursor:pointer;box-shadow:none!important}
.ce-open .ce-state{text-align:right}
.ce-otitle{margin:2px 0 0;font:700 22px/1.25 "Nunito Sans",sans-serif;color:#2b2724;overflow-wrap:anywhere}
.ce-quote{flex:1 0 auto;margin:2px 0;padding:10px 14px;border-left:3px solid var(--ce);border-radius:8px;background:#f8f3ec;font:italic 16px/1.6 "Nunito Sans",sans-serif;white-space:pre-wrap;overflow-wrap:anywhere}
.ce-acts{flex:none;display:flex;flex-direction:column;gap:8px;margin-top:auto;padding-top:4px}
.ce-acts button{width:100%;height:44px!important;min-height:0!important;border-radius:10px!important;font:800 15px "Nunito Sans",sans-serif!important;cursor:pointer;box-shadow:none!important}
.ce-acts .ce-quiet{border:1px solid #d6cbbd!important;background:#fff!important;color:#2b2724!important}
.ce-acts .ce-go{border:1px solid #91d9c1!important;background:#91d9c1!important;color:#16352c!important}
.ce-acts .ce-go:disabled{border-color:#d6cbbd!important;background:#fff!important;color:#9a948c!important;cursor:default}

/* Client only: the transcript is the list's last card. */
.ce-card.ce-file{--ce:#91d9c1;cursor:default;flex-direction:row;align-items:center;gap:10px}
.ce-card.ce-file.off{--ce:#9a948c}
.ce-card.ce-file>span{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ce-get{flex:none;height:32px!important;min-height:0!important;padding:0 14px!important;border:1px solid #91d9c1!important;border-radius:8px!important;background:#91d9c1!important;color:#16352c!important;font:800 13px "Nunito Sans",sans-serif!important;cursor:pointer}

/* Dark: the app black, cards #2c2a28, colours kept (Design Principles, dark-mode checklist). */
html[data-theme="dark"] .ce-box{background:#1f1e1d;border-color:#3a3633}
html[data-theme="dark"] .ce-h{border-color:#3a3633;color:#ece8e1}
html[data-theme="dark"] .ce-card,html[data-theme="dark"] .ce-quote{background:#2c2a28!important;color:#ece8e1!important}
html[data-theme="dark"] .ce-card:hover{background:#34312e!important}
html[data-theme="dark"] .ce-card,html[data-theme="dark"] .ce-open{--ce:#e9806a}
html[data-theme="dark"] .ce-card[data-state=added],html[data-theme="dark"] .ce-open[data-state=added]{--ce:#8fcf8c}
html[data-theme="dark"] .ce-card[data-state=aside],html[data-theme="dark"] .ce-open[data-state=aside]{--ce:#a9a29a}
html[data-theme="dark"] .ce-card.ce-file{--ce:#91d9c1}
html[data-theme="dark"] .ce-meta{color:#b9b2a9}
html[data-theme="dark"] .ce-otitle{color:#ece8e1}
html[data-theme="dark"] .ce-back{color:#91d9c1!important}
html[data-theme="dark"] .ce-send,html[data-theme="dark"] .ce-acts .ce-quiet,html[data-theme="dark"] .ce-acts .ce-go:disabled{background:#2c2a28!important;border-color:#4a4540!important;color:#d9d4cc!important}
html[data-theme="dark"] .ce-send.ready,html[data-theme="dark"] .ce-acts .ce-go:not(:disabled),html[data-theme="dark"] .ce-get{background:#91d9c1!important;border-color:#91d9c1!important;color:#16352c!important}
/* Titles In Title Case, whatever the event was saved with (Nicolas's UI rule). */
.ce-title,.ce-otitle{text-transform:capitalize}
html[data-theme="dark"] .ce-top .cc-q{border-color:#3a3633}
/* Design Review, 21 October: the top box's list absorbs the height and its input sits at the foot; the bottom box's
   header carries the count, since the list's scroll bar is hidden, and the list fades out while more is below. */
.ce-top .cc-qs,.ce-top .ce-grow{flex:1 1 auto;min-height:0;overflow:auto;scrollbar-width:none}
.ce-top .cc-qs::-webkit-scrollbar,.ce-top .ce-grow::-webkit-scrollbar{display:none}
.ce-top .cc-qin{flex:none;margin-top:10px}
.ce-n{font-weight:400;font-size:13px;color:#7a736b}
html[data-theme="dark"] .ce-n{color:#b9b2a9}
.ce-list.more{-webkit-mask-image:linear-gradient(#000 calc(100% - 36px),transparent);mask-image:linear-gradient(#000 calc(100% - 36px),transparent)}
html[data-theme="dark"] .ce-top .cc-qin{border:1px solid #3a3734!important;box-shadow:none!important}
/* For a list written as ul/li (the TA call) and a meta line written as p (TAR, 21 October). */
ul.ce-list{margin:0;padding:0;list-style:none}
.ce-open p.ce-meta{margin:0}
/* The session's feelings on the video frame, beside the other person's name: Mood Meter colours, rounded rectangles. */
.ce-fw{display:inline-flex;align-items:center;height:28px;padding:0 10px;border-radius:6px;font:600 14px/1 system-ui,-apple-system,sans-serif;white-space:nowrap;color:#2b2724;background:#e4ddd3}
.ce-fw.q-red{background:#e7aaa0}.ce-fw.q-blue{background:#aecadd}.ce-fw.q-green{background:#bbd4b8}.ce-fw.q-yellow{background:#edda8d}
html[data-theme="dark"] .ce-fw{color:#1f1e1d!important}
/* A cross on the top right of each word, to delete it (Nicolas, 27 October). */
.ce-fw:has(.ce-fx){position:relative;margin:6px 6px 0 0}
.ce-fx{position:absolute;top:-7px;right:-7px;width:18px;height:18px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:50%;border:1px solid #ffffff59;background:#1f1e1d;color:#fff;font:600 13px/1 system-ui,-apple-system,sans-serif;cursor:pointer}
.ce-fx::before{content:"\00d7"}
.ce-fx:hover{background:#d06f56;border-color:#d06f56}
.ce-fx:focus-visible{outline:2px solid #91d9c1;outline-offset:1px}
html[data-theme="dark"] .ce-fx{background:#1f1e1d!important;color:#fff!important;border-color:#ffffff59!important}
html[data-theme="dark"] .ce-fx:hover{background:#d06f56!important;border-color:#d06f56!important}
/* Phones (Phones thread, 22 October; Nicolas: "a Phones layout"): the panel sits under the video and the page scrolls,
   so neither half is cut to a fixed height: every question and every event card shows, and an opened event keeps its
   words and its buttons in view. Its own scroll and fade only on computers. */
@media (max-width:820px){
  .cc-side:has(>.ce-halves:not(.hidden)){height:auto!important;min-height:0}
  .ce-halves{height:auto}
  .ce-halves>.ce-box,.ce-box{flex:0 0 auto}
  .ce-top .cc-qs,.ce-top .ce-grow,.ce-list,.ce-open{flex:0 0 auto;overflow:visible}
  .ce-list.more{-webkit-mask-image:none;mask-image:none}
  .ce-acts{margin-top:4px}
}

/* The chat panel's header, the same on both calls (Nicolas, 22 October: the small MM and BT icons were "too small and
   somewhat confusing. So I want big buttons, and even the arrow should be in a button"): Chat, Mood Meter and Body
   Tracking as three big buttons, each with its line icon and name, the one showing aqua; on Nicolas's call the arrow
   that closes the panel is a fourth button of the same height. The buttons keep their colours in dark mode
   (atelier-dark.css paints every button #252c2e). */
.cc-cm .cc-ch.ml-hd,.cv-cc .cv-cch.ml-hd{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:stretch;justify-content:stretch;min-height:0;padding:10px 12px;margin:0}
.cv-cc .cv-cch.ml-hd4{grid-template-columns:repeat(3,minmax(0,1fr)) 44px}
.ml-btn{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;height:62px;min-width:0;min-height:0;margin:0;padding:6px 4px;border:1px solid #d6cbbd;border-radius:10px;background:#fff;color:#2b2724;cursor:pointer;box-shadow:none;font:700 13px/1.15 "Nunito Sans",sans-serif;text-align:center}
.ml-btn i{display:flex;font-style:normal}
.ml-btn svg{width:24px;height:24px}
.ml-btn span{max-width:100%;white-space:nowrap}   /* every label on one line (Design Review, 22 October) */
.ml-btn:hover{border-color:#91d9c1}
.ml-btn[aria-pressed=true]{background:#91d9c1;border-color:#91d9c1;color:#1f3d35}
.ml-btn.ml-arrow{padding:6px 0}
.ml-btn.ml-arrow svg{width:26px;height:26px}
/* While the other person moves the Mood Meter or Body Tracking: a dot on its button and a light line of its own above the
   feelings (Design Review, 22 October: never over the chips); the line keeps its room when empty so nothing jumps. */
.ml-dot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:#2f8f72}
.ml-dot[hidden]{display:none}
[data-cc-moodhost],.cv-ccmb{position:relative}
.ml-who{flex:none;align-self:center;width:max-content;margin:0 auto 6px;padding:0 10px;border-radius:8px;background:#e3f5ee;border:1px solid #91d9c1;color:#1f3d35;font:700 12px/20px "Nunito Sans",sans-serif;white-space:nowrap;pointer-events:none}
.ml-who[hidden]{display:block;visibility:hidden}
.cv-ccmb:has(> .ml-who){padding-top:8px}   /* the line takes the room the top padding had */
/* On her call the Mood Meter takes the height under the line, so the line never pushes it into a scroll. */
.cc-cmood:has(> .ml-who){display:flex;flex-direction:column}
.cc-cmood > .ml-who{margin-top:6px}
.cc-cmood > .ml-who + .cc-mm-wrap{height:auto;flex:1 1 0;min-height:0}
html[data-theme="dark"] .ml-btn{background:#2c2a28!important;border-color:#4a4540!important;color:#ece8e1!important}
html[data-theme="dark"] .ml-btn[aria-pressed=true]{background:#91d9c1!important;border-color:#91d9c1!important;color:#1f3d35!important}
html[data-theme="dark"] .ml-btn:hover{border-color:#91d9c1!important}
html[data-theme="dark"] .ml-dot{background:#91d9c1}
html[data-theme="dark"] .ml-who{background:#23332d;border-color:#91d9c1;color:#d9f2e8}
@media (max-width:820px){.ml-btn{height:56px;font-size:12px}}
