/* Team member and extension management (people.js). */

.person-actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.person-edit {
  gap: 6px;
  opacity: 0.75;
  transition: opacity 200ms var(--ease-out, ease), transform 160ms var(--ease-out, ease);
}
tbody tr:hover .person-edit,
.person-edit:focus-visible {
  opacity: 1;
}
.person-edit > .icon {
  width: 15px;
  height: 15px;
}
.greeting-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1eefe;
  color: #4a35c0;
  font-size: 10px;
  font-weight: 600;
  vertical-align: middle;
}
.greeting-chip > .icon {
  width: 12px;
  height: 12px;
}

dialog.person-modal {
  max-width: 560px;
}
.person-form {
  display: grid;
  gap: 4px;
}
.person-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: linear-gradient(150deg, #f4f1ff, #fbfaff);
  border: 1px solid #ebe6fd;
}
.person-hero strong {
  display: block;
  font-size: 15px;
  color: #14172b;
}
.person-hero p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #6b6f8c;
}
.person-hero .ext {
  margin-left: auto;
}
.person-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(150deg, #7a63e8, #4a35c0);
  color: #fff;
  font-weight: 650;
  font-size: 15px;
  box-shadow: 0 6px 16px #5843ce40;
  animation: pop-in 360ms var(--ease-spring, ease) both;
}

/* Segmented tabs */
.person-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: #f1f1f8;
}
.person-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5b5f7a;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 200ms, color 200ms, box-shadow 200ms;
}
.person-tabs button > .icon {
  width: 15px;
  height: 15px;
}
.person-tabs button:hover {
  color: #14172b;
}
.person-tabs button[aria-selected="true"] {
  background: #fff;
  color: #4a35c0;
  box-shadow: 0 1px 3px #1b1a4a1f;
}
.person-tabs .danger-tab[aria-selected="true"] {
  color: #c4283a;
}
.person-pane {
  animation: rise-in 260ms var(--ease-out, ease) both;
}
.person-number {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fafafd;
  border: 1px dashed #dcdcec;
}
.person-number > .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #8a8ea8;
}
.person-number strong {
  font-size: 13px;
}
.person-number p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #8a8ea8;
  line-height: 1.5;
}

/* Greeting tools */
.person-form textarea[name="voicemailGreeting"] {
  min-height: 120px;
  line-height: 1.55;
  font-size: 14px;
}
.greeting-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: -8px 0 4px;
}
.greeting-count {
  margin-right: auto;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: #8a8ea8;
}
.greeting-count.near {
  color: #b45309;
}
.greeting-tools .button > .icon {
  width: 15px;
  height: 15px;
}

/* Delete */
.danger-zone {
  padding: 16px;
  border-radius: 14px;
  background: #fff7f7;
  border: 1px solid #fde2e4;
}
.danger-zone h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: #9f1d2c;
}
.danger-zone p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #6b4a50;
}
.danger-zone .button.danger {
  background: #fff;
  color: #c4283a;
  border: 1px solid #f3b8bf;
}
.danger-zone .button.danger.armed {
  background: #d92f45;
  border-color: #d92f45;
  color: #fff;
  animation: pop-in 260ms var(--ease-spring, ease);
}
.person-form .form-error.shake {
  animation: shake 420ms var(--ease-out, ease);
}

@media (max-width: 700px) {
  .person-edit > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .person-tabs button {
    font-size: 12px;
  }
}

.person-form .person-actions[hidden] {
  display: none;
}
.person-form input,
.person-form select {
  font-size: 14px;
}

/* Phones: name, extension and Manage only, no sideways scrolling */
@media (max-width: 700px) {
  #people-results .table-wrap {
    overflow-x: visible;
  }
  #people-results table {
    min-width: 0;
    width: 100%;
    table-layout: auto;
  }
  #people-results .department-col,
  #people-results .status-col {
    display: none;
  }
  #people-results td,
  #people-results th {
    padding-left: 12px;
    padding-right: 12px;
  }
  #people-results .person {
    min-width: 0;
  }
  #people-results .person p {
    overflow-wrap: anywhere;
  }
}
