/* ==========================================================
   UCD USER EDITOR 2.0
   Compact side panel
   ========================================================== */

#ucd-user-editor-2 {
  position: fixed;
  inset: 0;
  z-index: 999999;
  pointer-events: none;
}

#ucd-user-editor-2.is-open {
  pointer-events: auto;
}

.ucd-user-editor-2-overlay {
  position: absolute;
  inset: 0;

  background: rgba(15,23,42,.08);

  opacity: 0;
  transition: opacity .16s ease;
}

#ucd-user-editor-2.is-open
.ucd-user-editor-2-overlay {
  opacity: 1;
}

/* ----------------------------------------------------------
   PANEL
   ---------------------------------------------------------- */

.ucd-user-editor-2-drawer {
  position: absolute;

  top: 92px;
  right: 22px;
  bottom: 22px;

  display: flex;
  flex-direction: column;

  width: 420px;
  max-width: calc(100vw - 44px);

  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;

  overflow: hidden;

  background: #f8fafc;

  box-shadow:
    0 20px 60px rgba(15,23,42,.24);

  transform: translateX(455px);

  transition:
    transform .18s ease;
}

#ucd-user-editor-2.is-open
.ucd-user-editor-2-drawer {
  transform: translateX(0);
}

/* ----------------------------------------------------------
   HEADER
   ---------------------------------------------------------- */

.ucd-user-editor-2-header {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 58px;

  padding: 10px 12px 9px 16px;

  border-bottom: 1px solid #e2e8f0;

  background: #ffffff;
}

.ucd-user-editor-2-header h2 {
  margin: 0;

  color: #172033;

  font-size: 15px;
  font-weight: 700;
}

.ucd-user-editor-2-header p {
  margin: 2px 0 0;

  color: #718096;

  font-size: 9.5px;
}

.ucd-user-editor-2-close {
  width: 30px;
  height: 30px;

  border: 0;
  border-radius: 6px;

  color: #475569;
  background: transparent;

  font-size: 20px;

  cursor: pointer;
}

.ucd-user-editor-2-close:hover {
  color: #0f172a;
  background: #eef2f6;
}

/* ----------------------------------------------------------
   BODY
   ---------------------------------------------------------- */

.ucd-user-editor-2-body {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: none;

  background: #f8fafc;
}

.ucd-user-editor-2-body::-webkit-scrollbar {
  display: none;
}

/* ----------------------------------------------------------
   TABS
   ---------------------------------------------------------- */

.ucd-user-editor-tabs {
  position: sticky;
  top: 0;
  z-index: 10;

  display: flex;
  gap: 2px;

  padding: 8px 12px 0;

  border-bottom: 1px solid #e2e8f0;

  background: rgba(248,250,252,.98);
}

.ucd-user-editor-tab {
  min-height: 31px;

  padding: 0 8px;

  border: 0;
  border-bottom: 2px solid transparent;

  color: #64748b;
  background: transparent;

  font-size: 9.5px;
  font-weight: 650;

  cursor: pointer;
}

.ucd-user-editor-tab:hover {
  color: #172033;
}

.ucd-user-editor-tab.is-active {
  color: #1265b0;
  border-bottom-color: #1674d1;
}

/* ----------------------------------------------------------
   PANELS
   ---------------------------------------------------------- */

.ucd-user-editor-panel {
  display: none;

  padding: 16px;
}

.ucd-user-editor-panel.is-active {
  display: block;
}

.ucd-editor-section-heading {
  margin-bottom: 14px;
}

.ucd-editor-section-heading h3 {
  margin: 0;

  color: #172033;

  font-size: 13px;
  font-weight: 700;
}

.ucd-editor-section-heading p {
  margin: 3px 0 0;

  color: #718096;

  font-size: 9.5px;
  line-height: 13px;
}

/* ----------------------------------------------------------
   FIELDS
   ---------------------------------------------------------- */

.ucd-editor-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 9px;
}

.ucd-editor-field {
  margin-top: 12px;
}

.ucd-editor-label {
  display: block;

  margin: 0 0 4px;

  color: #344054;

  font-size: 9.5px;
  font-weight: 650;
}

.ucd-editor-input {
  box-sizing: border-box;

  width: 100%;
  min-height: 33px;

  padding: 6px 8px;

  border: 1px solid #cbd5e1;
  border-radius: 6px;

  color: #172033;
  background: #ffffff;

  font-size: 10.5px;

  outline: none;
  box-shadow: none;
}

.ucd-editor-input:focus {
  border-color: #3788d8;

  box-shadow:
    0 0 0 2px rgba(55,136,216,.10);
}

.ucd-editor-note,
.ucd-editor-reset-link {
  margin-top: 5px;

  color: #64748b;

  font-size: 9px;
  line-height: 12px;
}

/* ----------------------------------------------------------
   SECURITY OPTIONS
   ---------------------------------------------------------- */

.ucd-auth-options {
  display: grid;
  gap: 7px;
}

.ucd-auth-option {
  display: flex;
  align-items: flex-start;

  gap: 8px;

  padding: 9px;

  border: 1px solid #dbe2ea;
  border-radius: 7px;

  background: #ffffff;

  cursor: pointer;
}

.ucd-auth-option strong {
  display: block;

  color: #172033;

  font-size: 10px;
}

.ucd-auth-option small {
  display: block;

  margin-top: 2px;

  color: #718096;

  font-size: 8.5px;
}

/* ----------------------------------------------------------
   CHECK ROWS
   ---------------------------------------------------------- */

.ucd-selected-count {
  display: inline-flex;

  margin-bottom: 9px;
  padding: 3px 7px;

  border-radius: 999px;

  color: #475569;
  background: #e8edf3;

  font-size: 8.5px;
  font-weight: 650;
}

.ucd-location-list,
.ucd-app-list,
.ucd-permission-list {
  display: grid;
  gap: 5px;
}

.ucd-editor-check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  min-height: 35px;

  padding: 6px 9px;

  border-bottom: 1px solid #e2e8f0;

  color: #273548;
  background: transparent;

  font-size: 9.5px;

  cursor: pointer;
}

.ucd-editor-check-row:last-child {
  border-bottom: 0;
}

.ucd-editor-check-row:hover {
  background: rgba(255,255,255,.58);
}

.ucd-editor-check-row strong {
  display: block;

  font-size: 9.5px;
}

.ucd-editor-check-row small {
  display: block;

  margin-top: 2px;

  color: #718096;

  font-size: 8.5px;
}

/* ----------------------------------------------------------
   ACTION BAR
   ---------------------------------------------------------- */

.ucd-user-editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 20;

  display: flex;
  justify-content: flex-end;

  gap: 8px;

  padding: 10px 14px;

  border-top: 1px solid #e2e8f0;

  background: rgba(255,255,255,.97);
}

.ucd-user-editor-cancel,
.ucd-user-editor-save {
  min-height: 32px;

  padding: 0 13px;

  border-radius: 6px;

  font-size: 9.5px;
  font-weight: 700;

  cursor: pointer;
}

.ucd-user-editor-cancel {
  border: 1px solid #cbd5e1;

  color: #475569;
  background: #ffffff;
}

.ucd-user-editor-save {
  border: 1px solid #1674d1;

  color: #ffffff;
  background: #1674d1;
}

.ucd-user-editor-save:hover {
  background: #0f63b7;
}

/* ----------------------------------------------------------
   LOADING
   ---------------------------------------------------------- */

.ucd-user-editor-loading,
.ucd-user-editor-error {
  padding: 30px 15px;

  color: #64748b;

  font-size: 10px;

  text-align: center;
}
