.share-dialog {
  display: flex;
  flex-direction: column;
  min-width: 420px;
  max-width: 90vw;
}

.share-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;

  h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;

  &:hover {
    background: rgba(0, 0, 0, 0.06);
  }
}

.share-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 24px 20px;
}

.share-loading,
.share-empty {
  font-size: 14px;
  opacity: 0.7;
  padding: 8px 0;
}

.share-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.share-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3f51b5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}

.share-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.share-name {
  font-size: 14px;
  font-weight: 600;
}

.share-perms {
  display: flex;
  gap: 6px;
}

.perm-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  opacity: 0.6;

  &.on {
    background: rgba(63, 81, 181, 0.15);
    color: #3f51b5;
    opacity: 1;
  }
}

.add-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}

.field-input {
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  outline: none;
  flex: 1 1 180px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.add-toggle {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.share-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.btn {
  font-size: 14px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
  }
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;

  &:hover {
    background: rgba(0, 0, 0, 0.06);
  }
}

.btn-primary {
  background: #3f51b5;
  color: white;

  &:hover {
    background: #303f9f;
  }
}
