/* Rail-standard shell for the retained client-editor DOM. */
#clientInfoPanel {
  position: fixed;
  left: var(--client-editor-left);
  top: var(--client-editor-top);
  transform: none;
  display: grid;
  grid-template-columns: 200px 800px;
  grid-template-rows: minmax(0, 1fr) 50px;
  width: 1000px;
  height: 475px;
  max-height: calc(100vh - 106px);
  overflow: hidden;
  z-index: 1300;
  border: 0;
  border-radius: 3px;
  background: #f2f2f2;
  box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.5);
  padding: 0;
  visibility: hidden;
}

#clientInfoPanel[data-client-editor-positioned="true"] {
  visibility: visible;
}

/* The edited card remains above the backdrop so it stays crisp as context. */
.app.modal-active #clientList .client-list-item.active {
  position: relative;
  z-index: 1301;
  filter: none;
  -webkit-filter: none;
}

#clientInfoPanel .editor-modal-header {
  display: none;
}

#clientInfoPanel .client-economic-master-tab-group {
  display: none !important;
}

#clientInfoPanel .client-edit-tabbar {
  position: static;
  grid-column: 1;
  grid-row: 1 / 3;
  z-index: 2;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  justify-items: start;
  row-gap: 25px;
  padding: 25px;
  margin: 0;
  background: #203220;
  border: 0;
  border-radius: 3px 0 0 3px;
}

#clientInfoPanel .client-edit-tab-group {
  width: 150px;
  display: grid;
  grid-template-rows: 25px 0;
  align-content: start;
  overflow: hidden;
  transition: grid-template-rows 520ms cubic-bezier(0.2, 0.85, 0.22, 1);
}

#clientInfoPanel .client-edit-tab-group.is-expanded {
  grid-template-rows: 25px var(--client-edit-subrow-height);
}

#clientInfoPanel .client-edit-tabbar .client-edit-primary-tab.btn.subtle {
  position: relative;
  width: 150px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 25px;
  justify-content: flex-start;
  text-align: left;
  text-indent: 0;
  overflow: hidden;
  transition: color 140ms ease, font-weight 140ms ease, text-indent 220ms cubic-bezier(0.2, 0.85, 0.22, 1);
}

#clientInfoPanel .client-edit-tabbar .client-edit-primary-tab.btn.subtle::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 25px;
  border-radius: 3px;
  background: #e1c16e;
  opacity: 0;
  transform: translateY(-50%) scaleY(0.35) scaleX(0.72);
  transform-origin: center;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.85, 0.22, 1);
}

#clientInfoPanel .client-edit-tabbar .client-edit-primary-tab.btn.subtle:hover,
#clientInfoPanel .client-edit-tabbar .client-edit-primary-tab.btn.subtle.toggle-active {
  color: #e1c16e;
}

#clientInfoPanel .client-edit-tabbar .client-edit-primary-tab.btn.subtle.toggle-active {
  font-weight: 600;
  text-indent: 15px;
}

#clientInfoPanel .client-edit-tabbar .client-edit-primary-tab.btn.subtle.toggle-active::before {
  opacity: 1;
  transform: translateY(-50%) scaleY(1) scaleX(1);
  animation: employeeRailFirstMenuPillPop 260ms cubic-bezier(0.18, 1.35, 0.32, 1);
}

#clientInfoPanel .client-edit-subrow {
  width: 150px;
  min-height: var(--client-edit-subrow-height);
  max-height: 0;
  display: grid;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transform-origin: top center;
  transition: max-height 520ms cubic-bezier(0.2, 0.85, 0.22, 1), opacity 420ms ease, transform 520ms cubic-bezier(0.2, 0.85, 0.22, 1);
}

#clientInfoPanel .client-edit-tab-group.is-expanded .client-edit-subrow {
  max-height: var(--client-edit-subrow-height);
  opacity: 1;
  transform: translateY(0);
}

#clientInfoPanel .client-edit-subgrid {
  display: grid;
  grid-template-rows: repeat(var(--client-edit-submode-count), 25px);
  align-content: start;
  width: 135px;
  margin-left: 15px;
  padding-top: 25px;
  box-sizing: border-box;
}

#clientInfoPanel .client-edit-subtab.btn.subtle {
  width: 135px;
  height: 25px;
  min-height: 25px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 25px;
  justify-content: flex-start;
  text-align: left;
}

#clientInfoPanel .client-edit-subtab.btn.subtle:hover,
#clientInfoPanel .client-edit-subtab.btn.subtle.toggle-active {
  color: #e1c16e;
  font-weight: 600;
}

#clientInfoPanel .client-edit-tabbody {
  grid-column: 2;
  grid-row: 1 / 3;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 25px;
  gap: 25px;
  min-height: 0;
  overflow: hidden;
  padding: 25px;
  background: #f2f2f2;
}

#clientInfoPanel .client-edit-pane {
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 750px);
  gap: 25px;
  align-content: start;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0;
}

#clientInfoPanel .client-edit-pane[data-client-edit-pane="stam"] .client-stam-pane:not(.hidden) {
  display: grid;
  grid-template-columns: minmax(0, 750px);
  gap: 25px;
  align-content: start;
}

#clientInfoPanel .client-edit-pane.hidden,
#clientInfoPanel .client-stam-pane.hidden {
  display: none !important;
}

#clientInfoPanel .client-inline-field {
  display: grid;
  grid-template-columns: 100px 225px;
  gap: 25px;
  align-items: center;
  min-height: 25px;
  width: 350px;
}

#clientInfoPanel .client-inline-field > label,
#clientInfoPanel .client-inline-field > .subscription-history-heading {
  min-height: 25px;
  display: flex;
  align-items: center;
  margin: 0;
  color: #000001;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

#clientInfoPanel .client-inline-field .field-wrap {
  width: 225px;
  min-width: 0;
  max-width: 225px;
}

/* Retained domain panes use the wide content standard. */
#clientInfoPanel .client-edit-pane[data-client-edit-pane="subscription"] .client-inline-field,
#clientInfoPanel .client-edit-pane[data-client-edit-pane="meetings"] .client-inline-field,
#clientInfoPanel .client-edit-pane[data-client-edit-pane="tasks"] .client-inline-field {
  width: 750px;
  grid-template-columns: 175px minmax(0, 550px);
  gap: 25px;
}

#clientInfoPanel .client-edit-pane[data-client-edit-pane="subscription"] .client-inline-field .field-wrap,
#clientInfoPanel .client-edit-pane[data-client-edit-pane="meetings"] .client-inline-field .field-wrap,
#clientInfoPanel .client-edit-pane[data-client-edit-pane="tasks"] .client-inline-field .field-wrap {
  width: 550px;
  max-width: 550px;
}

#clientInfoPanel .client-1720-details-fields {
  display: grid;
  grid-template-columns: 350px;
  gap: 25px;
  align-content: start;
}

#clientInfoPanel .client-integration-pane {
  display: grid;
  grid-template-columns: 750px;
  gap: 25px;
  align-content: start;
}

#clientInfoPanel .client-integration-pane .client-integration-field {
  width: 750px;
  grid-template-columns: 175px 550px;
  gap: 25px;
}

#clientInfoPanel .client-integration-pane .client-integration-field .field-wrap {
  width: 550px;
  max-width: 550px;
}

#clientInfoPanel .client-integration-token-controls {
  display: grid;
  grid-template-columns: 450px 75px;
  gap: 25px;
  align-items: center;
}

#clientInfoPanel .client-integration-note,
#clientInfoPanel .client-integration-actions {
  width: 750px;
  margin: 0;
}

#clientInfoPanel .client-integration-note {
  min-height: 25px;
  font-size: 12px;
  line-height: 1.4;
}

#clientInfoPanel .client-integration-actions {
  display: flex;
  justify-content: flex-end;
}

#clientInfoPanel .client-subscription-legacy-fields {
  display: none !important;
}

/* The e-conomic summary is the only displayed subscription source. */
#clientInfoPanel #clientEconomicSubscriptionsList {
  display: none;
}

#clientInfoPanel .client-subscription-summary {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #faf8f1;
  overflow: hidden;
}

#clientInfoPanel .client-subscription-summary-rows,
#clientInfoPanel .client-subscription-summary-total {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#clientInfoPanel .client-subscription-summary-row {
  min-height: 25px;
  padding: 0 12px;
  align-items: center;
  font-size: 12px;
}

#clientInfoPanel .client-subscription-summary-total {
  border-top: 1px solid #d9d9d9;
}

#clientInfoPanel input,
#clientInfoPanel select,
#clientInfoPanel textarea {
  width: 100%;
  min-height: 25px;
  box-sizing: border-box;
  border: 0;
  border-radius: 3px;
  background: #ffffff;
  color: #000001;
  font-size: 12px;
  font-weight: 400;
  box-shadow: none;
}

#clientInfoPanel input,
#clientInfoPanel select {
  height: 25px;
  padding: 0 8px;
}

#clientInfoPanel input:focus,
#clientInfoPanel select:focus,
#clientInfoPanel textarea:focus {
  outline: none;
  box-shadow: none;
}

#clientInfoPanel .form-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

#clientInfoPanel .client-edit-actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 25px;
  height: 25px;
  margin: 0;
  padding: 0;
  background: #f2f2f2;
}

@media (max-width: 980px) {
  #clientInfoPanel {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(1000px, calc(100vw - 40px));
    height: min(475px, calc(100vh - 40px));
    visibility: visible;
  }
}

@media (max-width: 980px) {
  #clientInfoPanel {
    grid-template-columns: 175px minmax(0, 1fr);
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
  }

  #clientInfoPanel .client-edit-tabbar {
    padding: 25px 12px;
  }

  #clientInfoPanel .client-edit-pane,
  #clientInfoPanel .client-edit-pane[data-client-edit-pane="stam"] .client-stam-pane:not(.hidden) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Align subscription labels to the top of their read-only projection. */
#clientInfoPanel .client-edit-pane[data-client-edit-pane="subscription"] .client-inline-field {
  align-items: start;
}

#clientInfoPanel .client-edit-pane[data-client-edit-pane="subscription"] .client-inline-field > label {
  align-self: start;
  justify-content: flex-start;
  text-align: left;
}

#clientInfoPanel .client-subscription-summary-row {
  display: flex;
  justify-content: space-between;
  text-align: left;
}

#clientInfoPanel .client-subscription-summary-row > :first-child {
  margin-right: auto;
  text-align: left;
}
