/* A single team composer: personal role, contacts and addition share one surface. */
.composer-v3 {
  --composer-control: #fff;
  --composer-control-line: #e2e4e9;
  --composer-control-hover: #fafbfc;
  --entry-error-border: #b98186;
  --entry-error-text: #9e6067;
}
:root[data-theme='dark'] .composer-v3 {
  --composer-control: #242426;
  --composer-control-line: #3c3c42;
  --composer-control-hover: #2a2a2e;
  --entry-error-border: #ad7c83;
  --entry-error-text: #d5a1a8;
}
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  :where(input:not([type='checkbox']):not([type='radio']), textarea, .pick) {
  background: var(--composer-control);
  border: 1px solid var(--composer-control-line);
  color: var(--text);
  box-shadow: 0 1px 2px #17274002;
  transition:
    background 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.composer-v3 #case-form .editor-section:not(.notebook) .pick:hover {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: transparent;
}
.composer-v3 #case-form .editor-section:not(.notebook) .pick {
  min-height: 44px;
  border-radius: 24px;
  font-weight: 500;
}
.composer-v3 #case-form .editor-section:not(.notebook) .pick[aria-expanded='true'] {
  color: var(--blue);
  background: var(--blue-bg);
  border-color: transparent;
  box-shadow: none;
}
.composer-v3 #case-form .pick > svg:last-child {
  transition: transform 160ms ease;
}
.composer-v3 #case-form .pick[aria-expanded='true'] > svg:last-child {
  transform: rotate(180deg);
}
.composer-v3 #case-form .editor-section:not(.notebook) .procedure-editor-top input {
  border-color: transparent;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  padding-inline: 8px;
}
.composer-v3 #case-form .editor-section:not(.notebook) .procedure-editor-top input:hover {
  border-color: var(--composer-control-line);
  background: var(--composer-control);
}
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  .procedure-editor.is-empty
  .procedure-editor-top
  input:not([aria-invalid='true']) {
  min-height: 54px;
  padding-inline: 16px;
  border-radius: 16px;
  border-color: color-mix(in srgb, var(--blue) 20%, var(--composer-control-line));
  background: var(--composer-control);
  box-shadow: 0 2px 8px #17274004;
}
.composer-v3 .procedure-editor.is-empty .procedure-editor-top input::placeholder {
  font-size: 17px;
  color: var(--muted);
  letter-spacing: -0.015em;
}
.composer-v3 #case-form .editor-section:not(.notebook) .gesture-classification .pick {
  width: auto;
  min-height: 32px;
  padding: 5px 10px;
  gap: 10px;
  font-size: 12px;
}
.composer-v3 #case-form .editor-section:not(.notebook) :is(input, textarea, .pick):focus-visible {
  background: var(--composer-control);
  border-color: var(--action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 10%, transparent);
  outline: none;
}
.composer-v3 #case-form .editor-section:not(.notebook) [aria-invalid='true'],
.composer-v3 #case-form .editor-section:not(.notebook) [aria-invalid='true']:focus-visible {
  border-color: var(--entry-error-border);
  box-shadow: none;
}
.composer-v3 #case-form .editor-section:not(.notebook) [aria-invalid='true']:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--entry-error-border) 10%, transparent);
}
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  .procedure-editor-top
  input[aria-invalid='true'] {
  border-color: var(--entry-error-border);
  box-shadow: none;
}
.composer-v3 #case-form :is(.shared-participation, .gesture-participation-fields) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}
.composer-v3 #case-form .team-chips > .team-self {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin: 0;
  min-width: 0;
  min-height: 48px;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--action) 26%, var(--composer-control-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--action) 4%, var(--composer-control));
}
.composer-v3 #case-form .team-self > label {
  margin: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.composer-v3 #case-form .editor-section:not(.notebook) .team-self > .pick {
  width: auto;
  min-width: 0;
  min-height: 32px;
  max-width: 185px;
  padding: 5px 7px;
  border: 0;
  background: transparent;
  color: var(--action);
  font-size: 13px;
  box-shadow: none;
}
.composer-v3 #case-form .team-self > .field-error {
  display: none;
}
.composer-v3 #case-form .team-self.entry-error-field {
  flex-wrap: wrap;
}
.composer-v3 #case-form .team-self > .entry-field-error {
  flex-basis: 100%;
}
.composer-v3 #case-form .editor-section:not(.notebook) .team-self > .pick[aria-invalid='true'] {
  border: 1px solid var(--entry-error-border);
  box-shadow: none;
}
/* The gesture is the primary writing surface, not another filter control. */
@property --gesture-beam-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.composer-v3 .procedure-editor.is-composing .procedure-editor-top > .field {
  gap: 0;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 23px;
  background:
    linear-gradient(var(--composer-control), var(--composer-control)) padding-box,
    conic-gradient(
        from var(--gesture-beam-angle),
        #dbe5f3 0deg 220deg,
        #68b6ff 260deg,
        #3478f6 290deg,
        #8364ed 320deg,
        #dbe5f3 360deg
      )
      border-box;
  box-shadow:
    0 5px 22px #386bd00a,
    0 1px 3px #17274006;
  animation: gesture-search-beam 5s linear infinite;
  transition: box-shadow 200ms ease;
}
.composer-v3 .procedure-editor.is-composing .procedure-editor-top > .field:focus-within {
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--blue) 5%, transparent),
    0 9px 28px #386bd00d;
}
:root[data-theme='dark']
  .composer-v3
  .procedure-editor.is-composing
  .procedure-editor-top
  > .field {
  background:
    linear-gradient(var(--composer-control), var(--composer-control)) padding-box,
    conic-gradient(
        from var(--gesture-beam-angle),
        #414b63 0deg 220deg,
        #59b4ff 260deg,
        #5389ff 290deg,
        #a58aff 320deg,
        #414b63 360deg
      )
      border-box;
}
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  .procedure-editor.is-composing
  .procedure-editor-top
  > .field
  input,
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  .procedure-editor.is-composing
  .procedure-editor-top
  > .field
  input:not([aria-invalid='true']),
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  .procedure-editor.is-composing
  .procedure-editor-top
  > .field
  input:focus-visible {
  height: 64px;
  min-height: 64px;
  padding: 16px 20px;
  border: 0;
  border-radius: 18px;
  outline: none;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.025em;
}
.composer-v3 .procedure-editor.is-composing .procedure-editor-top input::placeholder {
  font-size: 20px;
  font-weight: 450;
  color: color-mix(in srgb, var(--text) 56%, var(--composer-control));
  opacity: 1;
}
.composer-v3 .procedure-editor-top input::-webkit-contacts-auto-fill-button {
  visibility: hidden;
  display: none !important;
  pointer-events: none;
}
.composer-v3
  .procedure-editor.is-composing
  .procedure-editor-top
  > .field:has(input[aria-invalid='true']) {
  border-color: var(--entry-error-border);
  background: var(--composer-control);
  animation: none;
}
.composer-v3 .procedure-editor-top .suggestions {
  top: calc(100% + 8px);
  border-radius: 18px;
  padding: 7px;
  max-height: 290px;
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow:
    0 18px 45px #17274018,
    0 2px 6px #17274008;
}
.composer-v3 .procedure-editor-top .suggestions button {
  min-height: 55px;
  padding: 11px 13px;
  border-radius: 12px;
  gap: 16px;
  font-size: 14px;
}
.composer-v3 .procedure-editor-top .suggestions strong {
  font-size: 15px;
  font-weight: 550;
  line-height: 1.35;
}
.composer-v3 .procedure-editor-top .suggestions small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.composer-v3 .procedure-editor-top .suggestions svg {
  width: 16px;
  flex-shrink: 0;
  color: var(--blue);
}
@keyframes gesture-search-beam {
  to {
    --gesture-beam-angle: 360deg;
  }
}
@media (prefers-reduced-motion: reduce) {
  .composer-v3 .procedure-editor.is-composing .procedure-editor-top > .field {
    animation: none;
  }
}
.composer-v3 #case-form .shared-participation {
  padding-top: 20px;
}
.composer-v3 #case-form .team-editor {
  width: 100%;
  min-width: 0;
  container-type: inline-size;
}
.composer-v3 #case-form .team-editor-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 10px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.composer-v3 #case-form .team-editor-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.composer-v3 #case-form .team-chips {
  display: flex;
  flex-flow: row wrap;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
}
.composer-v3 #case-form .team-member {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--composer-control-line);
  border-radius: 14px;
  background: var(--composer-control);
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.composer-v3 #case-form .team-member:focus-within {
  border-color: var(--action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 8%, transparent);
}
.composer-v3 #case-form .team-contact-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 28px;
  border-radius: 9px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.composer-v3 #case-form .team-contact-name {
  display: block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 220px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.composer-v3 #case-form .editor-section:not(.notebook) .team-member > .pick {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: auto;
  max-width: 160px;
  min-width: 0;
  min-height: 32px;
  padding: 5px 7px;
  gap: 6px;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 12px;
}
.composer-v3 #case-form .editor-section:not(.notebook) .team-member > .pick:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-radius: 7px;
}
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  .team-member[data-role]:not([data-role=''])
  > .pick {
  color: var(--blue);
  font-weight: 550;
}
.composer-v3 #case-form .editor-section:not(.notebook) .team-member > .pick:hover {
  color: var(--action);
  background: color-mix(in srgb, var(--action) 5%, transparent);
}
.composer-v3 #case-form .team-member > .icon-button {
  flex: 0 0 24px;
  width: 24px;
  height: 28px;
  min-height: 28px;
  border: 0;
  background: none;
  color: var(--muted);
  border-radius: 8px;
}
.composer-v3 #case-form .team-member > .icon-button:hover {
  color: var(--red);
  background: var(--red-bg);
}
.composer-v3 #case-form .team-member > .icon-button svg {
  width: 13px;
  height: 13px;
}
.composer-v3 #case-form .team-add-search {
  position: relative;
  flex: 0 1 245px;
  width: 245px;
  min-width: 180px;
  max-width: 100%;
  margin: 0;
}
.composer-v3 #case-form .team-add-search > svg {
  position: absolute;
  z-index: 1;
  left: 14px;
  top: 15px;
  width: 17px;
  height: 17px;
  color: var(--action);
  pointer-events: none;
}
.composer-v3 #case-form .team-add-search .field {
  margin: 0;
  width: 100%;
}
.composer-v3 #case-form .team-add-search .field > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.composer-v3 #case-form .team-add-search input {
  padding-left: 40px;
  min-height: 48px;
  height: 48px;
  font-size: 13px;
}
.composer-v3 #case-form .team-add-search input:not(:focus) {
  border-style: dashed;
  box-shadow: none;
}
.composer-v3 #case-form .team-add-search .field-error {
  display: none;
}
.composer-v3 #case-form .gesture-participation-fields > .button {
  align-self: flex-start;
}
@media (max-width: 760px) {
  .composer-v3 #case-form .team-chips > .team-self {
    min-height: 52px;
    padding-block: 5px;
  }
  .composer-v3 #case-form .editor-section:not(.notebook) .team-self > .pick {
    min-height: 40px;
  }
  .composer-v3 #case-form .team-add-search {
    flex-basis: 100%;
    width: 100%;
  }
  .composer-v3 #case-form .team-add-search input {
    font-size: 16px;
  }
  .composer-v3 #case-form .team-member > .pick {
    min-height: 40px;
  }
  .composer-v3 #case-form .team-member > .icon-button {
    min-height: 40px;
  }
}
/* The V1 segmented control: a quiet track and a crisp, raised selection. */
.composer-v3 #case-form .scheduling-options,
.composer-v3 #case-form .access-technique > .technique-selector {
  padding: 3px;
  gap: 2px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--composer-control) 97%, var(--text));
  border: 1px solid var(--composer-control-line);
  box-shadow: none;
}
.composer-v3 #case-form .scheduling-option,
.composer-v3 #case-form .technique-selector > button {
  min-height: 38px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  transition:
    color 0.18s,
    border-color 0.18s,
    background 0.18s;
}
.composer-v3 #case-form .technique-selector > button {
  font-size: 12px;
  min-height: 36px;
  padding: 8px 10px;
  gap: 5px;
}
.composer-v3 #case-form .scheduling-option:hover,
.composer-v3 #case-form .technique-selector > button:hover {
  color: var(--action);
  background: color-mix(in srgb, var(--action) 4%, var(--composer-control));
}
.composer-v3 #case-form .scheduling-option[aria-pressed='true'],
.composer-v3 #case-form .technique-selector > button[aria-pressed='true'] {
  color: var(--text);
  background: var(--composer-control);
  box-shadow: 0 1px 4px #00000012;
}
:root[data-theme='dark'] .composer-v3 #case-form .scheduling-option[aria-pressed='true'],
:root[data-theme='dark'] .composer-v3 #case-form .technique-selector > button[aria-pressed='true'] {
  background: #414147;
  box-shadow: 0 1px 4px #00000035;
}
.composer-v3 #case-form .scheduling-option.urgent[aria-pressed='true'],
.composer-v3 #case-form .scheduling-option.urgent:hover {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 6%, var(--surface));
}
.composer-v3 #case-form .access-technique:has(.technique-selector) > .pick {
  border-radius: 24px;
}
.composer-v3 #case-form .access-technique > .technique-selector {
  margin-top: 0;
}
.composer-v3
  #case-form
  .editor-section:not(.notebook)
  :is(.team-self, .team-member)
  > .pick[aria-expanded='true'] {
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: 16px;
}
.composer-v3 #case-form .scheduling-option:focus-visible,
.composer-v3 #case-form .technique-selector > button:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 3px;
}
.composer-v3 #case-form .gesture-participation-toggle {
  background: transparent;
  border-radius: 0;
}
.composer-v3 #case-form .gesture-participation.is-open {
  padding: 8px 14px 14px;
  background: color-mix(in srgb, var(--blue) 2%, var(--surface));
  border-radius: 0 12px 12px 0;
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--blue) 24%, var(--line));
}
.composer-v3 #case-form .gesture-participation-fields {
  padding-top: 8px;
}
@media (max-width: 760px) {
  .composer-v3 #case-form .scheduling-option,
  .composer-v3 #case-form .technique-selector > button {
    min-height: 44px;
  }
  .composer-v3 #case-form .team-contact-avatar {
    display: none;
  }
  .composer-v3 #case-form .team-contact-name {
    max-width: 155px;
  }
  .composer-v3 #case-form .team-member {
    gap: 6px;
    padding: 5px 7px;
  }
  .composer-v3 #case-form .editor-section:not(.notebook) .team-member > .pick {
    max-width: 130px;
    min-height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .composer-v3 #case-form :is(input, textarea, .pick) {
    transition: none !important;
  }
}
