/* A customer can change the cards (build v13, builder "controls"). The look of flow-ui.js.
   Nothing here shows at rest: the control lives in the card panel, the row in the name menu shows only after a change,
   the question in the guide line shows once. Same family as "Change the message" (whatif.css) and the ready-made
   rows of the + menu (steps.css). */

/* ---------------------------------------------------------------- the control under the plain sentence */
.fl-slot{margin:var(--s-2) 0 0 calc(-1 * var(--s-2))}
.fl-use{display:inline-flex;align-items:center;gap:var(--s-2);padding:var(--s-1) var(--s-2);border-radius:var(--r-sm);
  font:var(--type-menu-item);color:var(--text-2);transition:color var(--d-1) var(--ease-out),background-color var(--d-1) var(--ease-out)}
.fl-use:hover{color:var(--text-1);background:var(--obs-wash)}
.fl-use[aria-expanded="true"]{color:var(--text-1)}
.fl-use svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;flex:none}
.fl-use .fl-chev{width:12px;height:12px;stroke:var(--text-3);margin-left:calc(-1 * var(--s-1));transition:transform var(--d-2) var(--ease-out)}
.fl-use[aria-expanded="true"] .fl-chev{transform:rotate(180deg)}
.fl-use[aria-disabled="true"]{color:var(--text-3);cursor:default}
.fl-use[aria-disabled="true"]:hover{background:none;color:var(--text-3)}
/* "Use something else" and "Change the message" never share a row: this one sits under the sentence, that one under
   its preview. The note under it keeps its own spacing. */
.fl-slot + .plain-note{margin-top:var(--s-2)}

/* ---------------------------------------------------------------- the list, in place (no second glass layer) */
.fl-pop{overflow:hidden;margin:var(--s-2) 0 0 var(--s-2);padding:var(--s-2) 0;border-top:1px solid var(--obs-hairline);border-bottom:1px solid var(--obs-hairline)}
.fl-cap{font:var(--type-label-caps);letter-spacing:.06em;text-transform:uppercase;color:var(--text-3);margin:var(--s-1) 0 var(--s-2)}
.fl-menu{display:flex;flex-direction:column;gap:2px;margin:0 calc(-1 * var(--s-2))}
.fl-row{display:grid;grid-template-columns:2rem 1fr auto;column-gap:var(--s-3);align-items:center;min-height:3.5rem;width:100%;
  padding:var(--s-2);border-radius:var(--r-md);text-align:left;color:var(--text-1);transition:background-color var(--d-1) var(--ease-out)}
.fl-row:hover,.fl-row:focus-visible{background:var(--obs-wash)}
.fl-row:focus-visible{outline-offset:-2px}
.fl-row[aria-checked="true"]{background:rgba(255,255,255,.035);box-shadow:inset 0 0 0 1px var(--obs-hairline)}
.fl-row[aria-checked="true"]:hover,.fl-row[aria-checked="true"]:focus-visible{background:var(--obs-wash)}
.fl-tile{width:2rem;height:2rem;border-radius:var(--r-sm);display:grid;place-content:center;background:var(--obs-well);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tint) 30%,transparent),0 0 16px -8px var(--tint);transition:box-shadow var(--d-2) var(--ease-out)}
.fl-row:hover .fl-tile,.fl-row:focus-visible .fl-tile{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tint) 55%,transparent),0 0 20px -6px var(--tint)}
.fl-tile svg{width:18px;height:18px;display:block}
.fl-tile .glyph-stroke{stroke:color-mix(in srgb,var(--tint) 75%,#fff);stroke-opacity:1;stroke-width:1.75}
.fl-tile .glyph-fill{fill:var(--tint);fill-opacity:.16}
.fl-words{display:flex;flex-direction:column;min-width:0}
.fl-words b{font:550 .875rem/1.25rem var(--font-sans);letter-spacing:-.005em;color:var(--text-1)}
.fl-words small{font:var(--type-menu-desc);color:var(--text-3);text-wrap:pretty}
.fl-now{display:inline-flex;align-items:center;gap:var(--s-1);font:var(--type-menu-desc);color:var(--text-3);padding-right:var(--s-1)}
.fl-now svg,.fl-check{width:14px;height:14px;fill:none;stroke:var(--text-2);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.fl-sep{display:block;height:1px;margin:var(--s-2) var(--s-2);background:var(--obs-hairline)}
/* a choice that cannot work with the current source: quieter, its reason instead of its line, no hover wash */
.fl-row.fl-unavail{cursor:default}
.fl-row.fl-unavail:hover{background:none}
.fl-row.fl-unavail:focus-visible{background:rgba(255,255,255,.025)}
.fl-unavail .fl-tile{opacity:.45;box-shadow:inset 0 0 0 1px var(--obs-hairline)}
.fl-unavail .fl-words b{color:var(--text-3);font-weight:500}
.fl-unavail .fl-why{color:var(--text-3);font-style:normal}
.fl-unavail .fl-why::before{content:"";display:inline-block;width:5px;height:5px;margin:0 .375rem .125rem 0;border-radius:50%;background:var(--text-3);opacity:.6;vertical-align:middle}

/* Remove: quieter, not red (Undo exists) */
.fl-remove .fl-words b{color:var(--text-2);font-weight:500}
.fl-tile-plain{--tint:var(--text-3);box-shadow:inset 0 0 0 1px var(--obs-hairline);background:none}
.fl-remove:hover .fl-tile-plain,.fl-remove:focus-visible .fl-tile-plain{box-shadow:inset 0 0 0 1px var(--obs-hairline-hi)}
.fl-tile-plain svg{width:14px;height:14px;fill:none;stroke:var(--text-2);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.fl-remove:hover .fl-words b,.fl-remove:focus-visible .fl-words b{color:var(--text-1)}

/* the panel's foot fades while the open list goes on below it (it scrolls; nothing is cut through) */
.insp-scroll.fl-more{-webkit-mask-image:linear-gradient(#000 calc(100% - 2.5rem),transparent);mask-image:linear-gradient(#000 calc(100% - 2.5rem),transparent)}

/* the panel head while it changes: the old icon turns out on top of the new one */
#insp-tile{position:relative}
#insp-tile svg.fl-old-glyph{position:absolute;left:50%;top:50%;margin:-12px 0 0 -12px;pointer-events:none}

/* ---------------------------------------------------------------- the toast: a second quiet action, 44 px targets on touch */
.toast .fl-toast-back{position:relative;color:var(--text-2);margin-left:var(--s-1)}
.toast .fl-toast-back::before{content:"";position:absolute;left:calc(-1 * var(--s-2));top:30%;bottom:30%;width:1px;background:var(--obs-hairline-hi)}
.toast .fl-toast-back:hover{color:var(--text-1)}
@media (pointer:coarse){
  .fl-use{min-height:2.75rem}
  .toast.glass{height:auto;min-height:3rem;padding-top:2px;padding-bottom:2px}
  .toast.glass > span{text-wrap:balance}
  .toast.glass:has(> span:first-child){border-radius:var(--r-lg)} /* a sentence that wraps sits in a soft box, not a stretched pill */
  .toast .undo{min-height:2.75rem;padding:0 var(--s-3)}
}

/* ---------------------------------------------------------------- "Back to the original" in the name menu */
.mi.fl-back{grid-template-columns:2rem 1fr;column-gap:var(--s-3);padding:var(--s-2) var(--s-3) var(--s-2) var(--s-2);text-align:left;margin-top:2px}
.fl-back-icon{width:2rem;height:2rem;display:grid;place-content:center;border-radius:.625rem;box-shadow:inset 0 0 0 1px var(--obs-hairline)}
.fl-back-icon svg{width:14px;height:14px;fill:none;stroke:var(--text-2);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.fl-back-t{font:500 .875rem/1.25rem var(--font-sans);color:var(--text-2)}
.mi.fl-back:hover .fl-back-t,.mi.fl-back:focus-visible .fl-back-t{color:var(--text-1)}
.mi.fl-back .mi-desc{grid-column:auto}
/* phones: the same row in the More menu, as plain as its neighbours */
.menu-more .mi.fl-back{grid-template-columns:1fr;padding:var(--s-2) var(--s-3);margin-top:0}
.menu-more .fl-back-icon{display:none}
.menu-more .fl-back-t{color:var(--text-1)}

/* ---------------------------------------------------------------- the guide line's question (once per visit) */
.f10-say .fl-ask{pointer-events:auto;display:inline;padding:0 .125rem;margin:0 -.125rem;border-radius:var(--r-xs);font:inherit;font-weight:600;color:var(--text-1);
  text-decoration:underline;text-decoration-color:rgba(255,255,255,.28);text-underline-offset:4px;text-decoration-thickness:1px;cursor:pointer;
  transition:text-decoration-color var(--d-2) var(--ease-out)}
.f10-say .fl-ask:hover{text-decoration-color:rgba(255,255,255,.8)}
@media (pointer:coarse){
  .f10-say .fl-ask{display:inline-flex;align-items:center;min-height:2.75rem;vertical-align:middle}
}

/* ---------------------------------------------------------------- the toast never sits on the open card panel (build v14: the
   linked change's sentence is longer): beside a side panel it centres in the free area, as the canvas does. The place is
   chosen when the toast is shown (flow-ui.js .fl-side) and kept while it is up, so its buttons never move under the pointer */
@media (min-width:901px),(min-width:601px) and (orientation:landscape){
  .toast.glass.fl-side{right:var(--inspector-reserve);max-width:calc(100vw - var(--inspector-reserve) - 1.5rem);height:auto;min-height:2.5rem;padding-top:.25rem;padding-bottom:.25rem}
  .toast.glass.fl-side > span{text-wrap:balance}
}

/* [controls v15] "Back to the original" is a plain item after "About this example", like Rename and Duplicate */
#menu-title .mi.fl-back{grid-template-columns:1fr;padding:var(--s-2) var(--s-3);margin-top:0}
#menu-title .fl-back-icon{display:none}
#menu-title .fl-back-t{font:var(--type-menu-item);color:var(--text-1)}
