.typed-summary {
  white-space: nowrap;
}

:is(#import-phones, #open-templates) {
  transition: background-color .1s, border-color .1s, color .1s;
}

:is(#import-phones, #open-templates):is(:hover, :focus-visible) {
  background-color: var(--blue-hover);
  border-color: var(--blue-hover);
  color: white;
}

.phone-upload-glyph {
  display: inline-block;
  vertical-align: -2px;
  width: 14px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("素材/云上传.svg") center / contain no-repeat;
  mask: url("素材/云上传.svg") center / contain no-repeat;
}

.phone-import-instructions {
  margin: 0 0 14px;
  padding: 8px 16px 8px 38px;
  border-radius: var(--radius-control);
  background: #f8f9fc;
  color: #205cc6;
  font-size: var(--dialog-body);
  line-height: var(--dialog-line);
}

.phone-import-instructions li + li {
  margin-top: 2px;
}

.phone-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(210px, 24vh, 264px);
  padding: 24px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: #f2f6ff;
  color: #505966;
  font: 400 var(--dialog-body)/var(--dialog-line) var(--font-ui);
  cursor: pointer;
}

.phone-dropzone img {
  width: 48px;
  height: auto;
  margin-bottom: 16px;
}

.phone-dropzone > * {
  pointer-events: none;
}

.phone-upload-action {
  margin-top: 10px;
  min-width: 112px;
}

.phone-dropzone:is(:hover, :focus-visible, .is-dragging) {
  border-color: #9bb9fa;
  background: #edf3ff;
}

.phone-dropzone:is(:hover, :focus-visible, .is-dragging) .phone-upload-action {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
}

.phone-dropzone.is-dragging {
  border: 1px dashed var(--blue);
}

.phone-dropzone:disabled {
  cursor: progress;
}

.phone-dropzone:disabled .phone-upload-action {
  opacity: .7;
}

.phone-import-dialog .recipient-import-status {
  font-size: var(--dialog-body);
  line-height: var(--dialog-line);
  overflow-wrap: anywhere;
}

.phone-import-template {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 18px;
  color: #606266;
}

.phone-import-template > span {
  flex: 1 1 18rem;
  min-width: 0;
}

.phone-import-template a {
  margin-inline-start: auto;
}

@media (max-width: 560px) {
  .phone-import-instructions { padding: 8px 10px 8px 30px; }
  .phone-dropzone { min-height: 184px; padding: 16px 12px; }
  .phone-dropzone img { width: 40px; margin-bottom: 8px; }
  .phone-import-template { margin-top: 12px; }
}

#open-phone-details {
  margin-inline-start: 8px;
}

.phone-count-flight {
  position: fixed;
  z-index: 5;
  pointer-events: none;
  color: var(--blue);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#phone-entry-feedback:not(:empty) {
  position: fixed;
  z-index: 10;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px 18px;
  border: 1px solid #cce6c0;
  border-radius: 4px;
  background: #f0f9eb;
  color: #367526;
  font-size: 15px;
  line-height: 22px;
  pointer-events: none;
}

#phone-entry-feedback[data-kind="duplicate"]:not(:empty) {
  border-color: #dcdfe6;
  background: #f4f4f5;
  color: #606266;
}

.sms-dialog.phone-dialog[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  height: min(640px, 76dvh);
  overflow: hidden;
}

.phone-dialog-toolbar,
.phone-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-dialog-toolbar {
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}

.phone-search {
  min-width: 0;
}

.phone-search input {
  width: 300px;
  flex: 1 1 auto;
}

.phone-dialog :is(.phone-danger, .phone-actions button) {
  height: var(--dialog-control);
  font-size: inherit;
}

.phone-danger,
.phone-close {
  background: white;
  white-space: nowrap;
  cursor: pointer;
}

.phone-danger {
  border-color: #de4949;
  background: #ee4949;
  color: #fff;
}

.phone-danger:not(:disabled):hover {
  background: #de4949;
}

.phone-close {
  border-color: #dcdfe6;
  color: #606266;
}

.phone-close:hover {
  color: var(--blue);
  border-color: var(--blue);
}

#copy-typed-phones:not(:disabled) {
  cursor: pointer;
}

.phone-dialog button:disabled {
  opacity: .55;
  cursor: default;
}

.phone-table .text-action {
  min-width: var(--dialog-control);
  min-height: var(--dialog-control);
  text-align: left;
}

.phone-actions {
  flex-wrap: wrap;
  margin-top: 18px;
}

#phone-copy-status {
  margin-inline-end: auto;
  color: #606266;
}

.phone-copy-fallback {
  margin-top: 8px;
  padding: 6px 8px;
  resize: vertical;
}

@media (max-width: 560px) {
  .sms-dialog.phone-dialog[open] {
    height: min(640px, calc(100dvh - var(--dialog-gutter)));
  }

  .phone-dialog-toolbar {
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-bottom: 12px;
  }

  .phone-search {
    flex-basis: 100%;
  }

  .sms-dialog .phone-search .dialog-primary,
  .phone-dialog-toolbar .phone-danger {
    min-width: 64px;
    padding-inline: 12px;
  }

  .phone-search input {
    width: 0;
    padding-inline: 12px;
  }

  .phone-table th:nth-child(1) { width: 45%; }
  .phone-table th:nth-child(2) { width: 31%; }

  .phone-pages {
    gap: 4px;
  }

  .phone-pages,
  .phone-actions {
    margin-top: 12px;
  }
}

@media (max-height: 480px) {
  .sms-dialog.phone-dialog[open] {
    grid-template-rows: auto auto minmax(108px, 1fr) auto auto;
    height: calc(100dvh - var(--dialog-gutter));
    overflow-y: auto;
  }

  .phone-dialog-toolbar {
    margin-block: 4px 8px;
  }

  .phone-pages,
  .phone-actions {
    margin-top: 8px;
  }
}
