/* Shared nested opportunity flow for create-visit and create-todo sheets. */
body .phone :is(#create-visit, #create-todo) > .drawer-titlebar > .visit-opportunity-back {
  position: absolute;
  left: 0;
}

body .phone :is(#create-visit, #create-todo) > .drawer-titlebar > .visit-opportunity-back[hidden],
body .phone :is(#create-visit, #create-todo) > :is(.box, .primary)[hidden],
body .phone :is(#create-visit, #create-todo) > .visit-opportunity-page[hidden],
body .phone .visit-customer-dialog[hidden],
body .phone .visit-customer-dialog-backdrop[hidden] {
  display: none !important;
}

body .phone :is(#create-visit, #create-todo, #create-opportunity) > .visit-opportunity-page {
  padding-bottom: 0;
}

body .phone :is(#create-visit, #create-todo, #create-opportunity) .visit-opportunity-form {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body .phone :is(#create-visit, #create-todo, #create-opportunity) .visit-opportunity-form > .form-row {
  width: 100%;
  margin: 0 0 18px;
}

body .phone :is(#create-visit, #create-todo, #create-opportunity) .visit-new-customer-link {
  width: auto;
  min-height: 28px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--system-blue);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body .phone :is(#create-visit, #create-todo, #create-opportunity) .visit-opportunity-intro {
  min-height: 230px;
  resize: vertical;
}

body .phone :is(#create-visit, #create-todo, #create-opportunity) .visit-opportunity-submit {
  position: sticky;
  bottom: 0;
  z-index: 2;
  width: 100%;
  margin: 12px 0 0;
}

body .phone .visit-customer-dialog-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(23, 35, 51, 0.42);
}

body .phone .visit-customer-dialog {
  top: auto;
  right: 18px;
  bottom: 28px;
  left: 18px;
  z-index: 41;
  max-height: calc(100% - 56px);
  overflow-y: auto;
  transform: none;
  padding: 20px;
}

body .phone .visit-customer-dialog .form-row {
  margin-top: 16px;
}

body .phone .visit-customer-dialog .cache-dialog-actions > button {
  min-height: 44px;
}

body .phone .visit-customer-dialog .record-form-error {
  margin: 14px 0 0;
}

body .phone .visit-created-customer-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body .phone .visit-created-customer-option > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body .phone .visit-created-customer-badge {
  flex: 0 0 auto;
}
